shaman

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DDBC_T12P2 int = iota
	DDBC_FrostbranWeapon

	DDBC_Total
)

Damage Done By Caster setup

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 (
	SpellMaskNone               int64 = 0
	SpellMaskFireElementalTotem int64 = 1 << iota
	SpellMaskEarthElementalTotem
	SpellMaskFlameShockDirect
	SpellMaskFlameShockDot
	SpellMaskLavaBurst
	SpellMaskLavaBurstOverload
	SpellMaskLavaLash
	SpellMaskLightningBolt
	SpellMaskLightningBoltOverload
	SpellMaskChainLightning
	SpellMaskChainLightningOverload
	SpellMaskEarthShock
	SpellMaskLightningShield
	SpellMaskThunderstorm
	SpellMaskFireNova
	SpellMaskMagmaTotem
	SpellMaskSearingTotem
	SpellMaskPrimalStrike
	SpellMaskStormstrike
	SpellMaskEarthShield
	SpellMaskFulmination
	SpellMaskFrostShock
	SpellMaskUnleashFrost
	SpellMaskUnleashFlame
	SpellMaskEarthquake
	SpellMaskFlametongueWeapon

	SpellMaskFlameShock = SpellMaskFlameShockDirect | SpellMaskFlameShockDot
	SpellMaskFire       = SpellMaskFlameShock | SpellMaskLavaBurst | SpellMaskLavaBurstOverload | SpellMaskLavaLash | SpellMaskFireNova | SpellMaskUnleashFlame
	SpellMaskNature     = SpellMaskLightningBolt | SpellMaskLightningBoltOverload | SpellMaskChainLightning | SpellMaskChainLightningOverload | SpellMaskEarthShock | SpellMaskThunderstorm | SpellMaskFulmination
	SpellMaskFrost      = SpellMaskUnleashFrost | SpellMaskFrostShock
	SpellMaskOverload   = SpellMaskLavaBurstOverload | SpellMaskLightningBoltOverload | SpellMaskChainLightningOverload
)
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 ItemSetRagingElementsBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Battlegear of the Raging Elements",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_DamageDone_Flat,
				FloatValue: .10,
				ClassMask:  SpellMaskLavaLash | SpellMaskStormstrike,
			})
		},
		4: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_BonusCrit_Rating,
				FloatValue: 10 * core.CritRatingPerCritChance,
				ClassMask:  SpellMaskLightningBolt,
			})
		},
	},
})

T11 enh (2) Set: Increases damage done by your Lava Lash and Stormstrike abilities by 10%. (4) Set: Increases the critical strike chance of your Lightning Bolt spell by 10%.

View Source
var ItemSetRagingElementsRegalia = core.NewItemSet(core.ItemSet{
	Name: "Regalia of the Raging Elements",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_BonusCrit_Rating,
				FloatValue: 10 * core.CritRatingPerCritChance,
				ClassMask:  SpellMaskFlameShock,
			})
		},
		4: func(agent core.Agent) {
			character := agent.GetCharacter()
			character.AddStaticMod(core.SpellModConfig{
				Kind:       core.SpellMod_CastTime_Pct,
				FloatValue: -0.1,
				ClassMask:  SpellMaskLightningBolt,
			})
		},
	},
})

T11 elem (2) Set: Increases the critical strike chance of your Flame Shock spell by 10%. (4) Set: Reduces the cast time of your Lightning Bolt spell by 10%.

View Source
var ItemSetSpiritwalkersRegalia = core.NewItemSet(core.ItemSet{
	Name: "Spiritwalker's 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:     "Time Rupture",
				ActionID:  core.ActionID{SpellID: 105821},
				Duration:  4 * time.Second,
				MaxStacks: 3,
				OnStacksChange: func(aura *core.Aura, sim *core.Simulation, oldStacks, newStacks int32) {
					changedHaste := (newStacks - oldStacks) * 250
					shaman.AddStatDynamic(sim, stats.SpellHaste, float64(changedHaste))
				},
			})
			shaman.RegisterAura(core.Aura{
				Label:    "Spiritwalker's Regalia 4P",
				Duration: core.NeverExpires,
				OnReset: func(aura *core.Aura, sim *core.Simulation) {
					aura.Activate(sim)
				},
				OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) {
					if spell.ClassSpellMask&SpellMaskOverload > 0 {
						procAura.Activate(sim)
						procAura.AddStack(sim)
					}
				},
			})
		},
	},
})

T13 elem (2) Set: Elemental Mastery also grants you 2000 mastery rating 15 sec. (4) Set: Each time Elemental Overload triggers, you gain 250 haste rating for 4 sec, stacking up to 3 times.

View Source
var ItemSetVolcanicRegalia = core.NewItemSet(core.ItemSet{
	Name: "Volcanic Regalia",
	Bonuses: map[int32]core.ApplyEffect{
		2: func(agent core.Agent) {
			shaman := agent.(ShamanAgent).GetShaman()
			shaman.RegisterAura(core.Aura{
				Label:    "Volcanic Regalia 2P",
				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.ClassSpellMask != SpellMaskLightningBolt || !sim.Proc(0.3, "Volcanic Regalia 2P") || shaman.FireElementalTotem == nil {
						return
					}
					shaman.FireElementalTotem.CD.Reduce(4 * time.Second)
				},
			})
		},
		4: func(agent core.Agent) {

		},
	},
})

T12 elem (2) Set: Your Lightning Bolt has a 30% chance to reduce the remaining cooldown on your Fire Elemental Totem by 4 sec. (4) Set: Your Lava Surge talent also makes Lava Burst instant when it triggers.

View Source
var StormstrikeActionID = core.ActionID{SpellID: 17364}
View Source
var TalentTreeSizes = [3]int{19, 19, 20}

Functions

func Tier12StormstrikeBonus

func Tier12StormstrikeBonus(sim *core.Simulation, spell *core.Spell, attackTable *core.AttackTable) float64

Types

type EarthElemental

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

func (*EarthElemental) ExecuteCustomRotation

func (earthElemental *EarthElemental) ExecuteCustomRotation(sim *core.Simulation)

func (*EarthElemental) GetPet

func (earthElemental *EarthElemental) GetPet() *core.Pet

func (*EarthElemental) Initialize

func (earthElemental *EarthElemental) Initialize()

func (*EarthElemental) Reset

func (earthElemental *EarthElemental) Reset(_ *core.Simulation)

type FireElemental

type FireElemental struct {
	core.Pet

	FireBlast *core.Spell
	FireNova  *core.Spell

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

func (*FireElemental) ExecuteCustomRotation

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

func (*FireElemental) GetPet

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

func (*FireElemental) Initialize

func (fireElemental *FireElemental) Initialize()

func (*FireElemental) Reset

func (fireElemental *FireElemental) Reset(_ *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 {
	Shield  proto.ShamanShield
	ImbueMH proto.ShamanImbue
	ImbueOH proto.ShamanImbue
}

Which buffs this shaman is using.

type Shaman

type Shaman struct {
	core.Character

	ClassSpellScaling float64

	ThunderstormInRange bool // flag if thunderstorm will be in range.

	Talents   *proto.ShamanTalents
	SelfBuffs SelfBuffs

	Totems          *proto.ShamanTotems
	TotemElements   *proto.TotemSet
	TotemsAncestors *proto.TotemSet
	TotemsSpirits   *proto.TotemSet

	// The expiration time of each totem (earth, air, fire, water).
	TotemExpirations [4]time.Duration

	LightningBolt         *core.Spell
	LightningBoltOverload *core.Spell

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

	LavaBurst         *core.Spell
	LavaBurstOverload *core.Spell
	FireNova          *core.Spell
	LavaLash          *core.Spell
	Stormstrike       *core.Spell
	PrimalStrike      *core.Spell

	LightningShield     *core.Spell
	LightningShieldAura *core.Aura
	Fulmination         *core.Spell

	Earthquake   *core.Spell
	Thunderstorm *core.Spell

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

	FeralSpirit  *core.Spell
	SpiritWolves *SpiritWolves

	FireElemental      *FireElemental
	FireElementalTotem *core.Spell

	EarthElemental      *EarthElemental
	EarthElementalTotem *core.Spell

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

	UnleashElements *core.Spell
	UnleashLife     *core.Spell
	UnleashFlame    *core.Spell
	UnleashFrost    *core.Spell
	UnleashWind     *core.Spell

	MaelstromWeaponAura *core.Aura
	SearingFlames       *core.Spell

	AncestralAwakening *core.Spell
	HealingSurge       *core.Spell
	GreaterHealingWave *core.Spell
	HealingWave        *core.Spell
	ChainHeal          *core.Spell
	Riptide            *core.Spell
	EarthShield        *core.Spell
	// 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) AddRaidBuffs

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

func (*Shaman) ApplyEarthlivingImbueToItem

func (shaman *Shaman) ApplyEarthlivingImbueToItem(item *core.Item)

func (*Shaman) ApplyFlametongueImbue

func (shaman *Shaman) ApplyFlametongueImbue(procMask core.ProcMask)

func (*Shaman) ApplyFlametongueImbueSwap added in v0.0.21

func (shaman *Shaman) ApplyFlametongueImbueSwap(procMask core.ProcMask)

func (*Shaman) ApplyFlametongueImbueToItem

func (shaman *Shaman) ApplyFlametongueImbueToItem(item *core.Item)

func (*Shaman) ApplyGlyphs

func (shaman *Shaman) ApplyGlyphs()

func (*Shaman) ApplyTalents

func (shaman *Shaman) ApplyTalents()

func (*Shaman) BloodlustActionID

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

func (*Shaman) FrostbrandDebuffAura

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

func (*Shaman) GetCharacter

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

func (*Shaman) GetMentalQuicknessBonus

func (shaman *Shaman) GetMentalQuicknessBonus() float64

func (*Shaman) GetOverloadChance

func (shaman *Shaman) GetOverloadChance() float64

func (*Shaman) HasMajorGlyph

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

func (*Shaman) HasMinorGlyph

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

func (*Shaman) HasPrimeGlyph

func (shaman *Shaman) HasPrimeGlyph(glyph proto.ShamanPrimeGlyph) bool

func (*Shaman) Initialize

func (shaman *Shaman) Initialize()

func (*Shaman) NewEarthElemental

func (shaman *Shaman) NewEarthElemental(bonusSpellPower float64) *EarthElemental

func (*Shaman) NewFireElemental

func (shaman *Shaman) NewFireElemental(bonusSpellPower float64) *FireElemental

func (*Shaman) NewSpiritWolf

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

func (*Shaman) RegisterEarthlivingImbue

func (shaman *Shaman) RegisterEarthlivingImbue(procMask core.ProcMask)

func (*Shaman) RegisterFlametongueImbue

func (shaman *Shaman) RegisterFlametongueImbue(procMask core.ProcMask)

func (*Shaman) RegisterFrostbrandImbue

func (shaman *Shaman) RegisterFrostbrandImbue(procMask core.ProcMask)

func (*Shaman) RegisterHealingSpells

func (shaman *Shaman) RegisterHealingSpells()

func (*Shaman) RegisterOnItemSwapWithImbue

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

func (*Shaman) RegisterWindfuryImbue

func (shaman *Shaman) RegisterWindfuryImbue(procMask core.ProcMask)

func (*Shaman) Reset

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

func (*Shaman) StormstrikeDebuffAura

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

TODO: Confirm how this affects lightning shield

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) ExecuteCustomRotation

func (spiritWolf *SpiritWolf) ExecuteCustomRotation(_ *core.Simulation)

func (*SpiritWolf) GetPet

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

func (*SpiritWolf) Initialize

func (spiritWolf *SpiritWolf) Initialize()

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