warrior

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const ShoutExpirationThreshold = time.Second * 3

How close to running out the warrior's own shout has to be before recasting it is worth a global.

Variables

View Source
var ItemSetBattlegearOfGlory = core.NewItemSet(core.ItemSet{
	Name:  "Battlegear of Glory",
	ID:    2102,
	Slots: tierOneSlots,
	Bonuses: map[int32]core.ApplySetBonus{
		2: parsedSetBonus(battlegearGloryHaste),
		3: parsedSetBonus(battlegearGloryShoutCooldown),
		4: parsedSetBonus(battlegearGloryHumanoidPower),
		5: parsedSetBonus(battlegearGloryRecklessnessCD),
	},
})

Tier 1 - Arms/Fury

View Source
var ItemSetBattlegearOfMight = core.NewItemSet(core.ItemSet{
	Name: "Battlegear of Might",
	ID:   209,
	Bonuses: map[int32]core.ApplySetBonus{
		3: func(agent core.Agent, setBonusAura *core.Aura) {

			setBonusAura.AttachStatBuff(stats.BlockValue, mightBlockValue.EffectN(1).BaseValue())
		},
		5: func(agent core.Agent, setBonusAura *core.Aura) {
			warrior := agent.(WarriorAgent).GetWarrior()
			gain := shared.FiredSpellHandler(&warrior.Character, core.ActionID{SpellID: mightRageEnergize.ID}, mightRageProc)

			trigger := spelldata.ProcTrigger(&warrior.Character, mightRageProc, gain)
			trigger.Name = "Battlegear of Might - 5PC"

			setBonusAura.AttachProcTrigger(trigger)
		},
		8: func(agent core.Agent, setBonusAura *core.Aura) {

			setBonusAura.AttachSpellMod(core.SpellModConfig{
				ClassFlags: mightSunderThreat.EffectN(1).ClassFlags,
				Kind:       core.SpellMod_FlatThreatBonus_Pct,
				FloatValue: mightSunderThreat.EffectN(1).Percent(),
			})
		},
	},
})

TODO: items 16861-16868 have no ItemSparse rows in the game files, so the set cannot be worn yet.

View Source
var ItemSetBattlegearOfWrath = core.NewItemSet(core.ItemSet{
	Name: "Battlegear of Wrath",
	ID:   218,
	Bonuses: map[int32]core.ApplySetBonus{
		3: func(agent core.Agent, setBonusAura *core.Aura) {

			if setBonusAura.BuildPhase == core.CharacterBuildPhaseGear {
				agent.(WarriorAgent).GetWarrior().HasBsT2 = true
			}
		},
		5: func(agent core.Agent, setBonusAura *core.Aura) {
			warrior := agent.(WarriorAgent).GetWarrior()

			discounted := wrathDiscountBuff.EffectN(1).ClassFlags

			buff := warrior.RegisterAura(spelldata.AuraConfig(wrathDiscountBuff))
			spelldata.ParseEffects(&warrior.Character, buff, wrathDiscountBuff)

			buff.AttachProcTrigger(core.ProcTrigger{
				Name:               "Warrior's Wrath - Consume",
				ClassFlags:         discounted,
				Callback:           core.CallbackOnCastComplete,
				TriggerImmediately: true,
				Handler: func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
					buff.Deactivate(sim)
				},
			})

			trigger := spelldata.ProcTrigger(&warrior.Character, wrathDiscountProc,
				func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
					buff.Activate(sim)
				})
			trigger.Name = "Battlegear of Wrath - 5PC"
			trigger.ClassFlags = discounted

			setBonusAura.AttachProcTrigger(trigger)
		},
		8: func(agent core.Agent, setBonusAura *core.Aura) {
			warrior := agent.(WarriorAgent).GetWarrior()

			parry := warrior.RegisterAura(spelldata.AuraConfig(wrathParryBuff,
				spelldata.Label("Battlegear of Wrath Parry")))
			spelldata.ParseEffects(&warrior.Character, parry, wrathParryBuff)

			consume := spelldata.ProcTrigger(&warrior.Character, wrathParryBuff,
				func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
					parry.Deactivate(sim)
				})
			consume.Name = "Battlegear of Wrath - 8PC Consume"
			consume.Outcome = core.OutcomeEmpty
			consume.RequireDamageDealt = false
			consume.TriggerImmediately = true
			parry.AttachProcTrigger(consume)

			trigger := spelldata.ProcTrigger(&warrior.Character, wrathParryProc,
				func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
					parry.Activate(sim)
				})
			trigger.Name = "Battlegear of Wrath - 8PC"

			setBonusAura.AttachProcTrigger(trigger)
		},
	},
})

TODO: items 16959-16966 have no ItemSparse rows in the game files, so the set cannot be worn yet.

View Source
var ItemSetBattleplateOfGlory = core.NewItemSet(core.ItemSet{
	Name:  "Battleplate of Glory",
	ID:    2103,
	Slots: tierOneSlots,
	Bonuses: map[int32]core.ApplySetBonus{
		2: parsedSetBonus(battleplateGloryDefense),

		3: parsedSetBonus(battleplateGloryIntervene),
		4: parsedSetBonus(battleplateGloryExpertise),
		5: parsedSetBonus(battleplateGloryShieldWallCD),
	},
})

Tier 1 - Protection

View Source
var ItemSetConquerorsBattlegear = core.NewItemSet(core.ItemSet{
	Name: "Conqueror's Battlegear",
	ID:   496,
	Bonuses: map[int32]core.ApplySetBonus{
		3: func(agent core.Agent, setBonusAura *core.Aura) {
			warrior := agent.(WarriorAgent).GetWarrior()
			spelldata.ParseEffects(&warrior.Character, setBonusAura, conquerorShoutCost)
		},
		5: func(agent core.Agent, setBonusAura *core.Aura) {
			warrior := agent.(WarriorAgent).GetWarrior()
			spelldata.ParseEffects(&warrior.Character, setBonusAura, conquerorThunderClap)

			setBonusAura.AttachAdditivePseudoStatBuff(&warrior.thunderClapEffectBonus, conquerorThunderClap.EffectN(1).Percent())
		},
	},
})
View Source
var ItemSetDreadnaughtsBattlegear = core.NewItemSet(core.ItemSet{
	Name:  "Dreadnaught's Battlegear",
	ID:    523,
	Slots: shared.TierThreeSlots,
	Bonuses: map[int32]core.ApplySetBonus{
		2: func(_ core.Agent, setBonusAura *core.Aura) {

			setBonusAura.AttachSpellMod(core.SpellModConfig{
				ClassFlags: dreadnaughtRevenge.EffectN(1).ClassFlags,
				Kind:       core.SpellMod_BaseDamage_Flat,
				FloatValue: dreadnaughtRevenge.EffectN(1).BaseValue(),
			})
		},
		4: shared.ParsedSetBonus(dreadnaughtTauntHit),
		6: shared.ParsedSetBonus(dreadnaughtAbilityHit),
		8: func(agent core.Agent, setBonusAura *core.Aura) {

			character := agent.GetCharacter()

			cheatDeath := character.RegisterAura(spelldata.AuraConfig(dreadnaughtCheatDeathBuff))
			spelldata.ParseEffects(character, cheatDeath, dreadnaughtCheatDeathBuff)

			trigger := spelldata.ProcTrigger(character, dreadnaughtCheatDeath,
				func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) {
					cheatDeath.Activate(sim)
				})
			trigger.Name = "Cheat Death - Trigger"

			trigger.ExtraCondition = func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) bool {
				return character.CurrentHealthPercent() < 0.2
			}

			setBonusAura.AttachProcTrigger(trigger)
		},
	},
})

Tier 3

View Source
var SpellFlagsSweepingStrikes = spellData.SweepingStrikes.Highest().ClassFlags

The game files' SpellClassOptions for the Sweeping Strikes copy, a sim-only sub-spell that takes its parent's flags, the game files having no row for it.

View Source
var TalentTreeSizes = [3]int{17, 18, 18}

Functions

This section is empty.

Types

type Warrior

type Warrior struct {
	core.Character

	ClassSpellScaling float64

	Talents *proto.WarriorTalents

	WarriorInputs

	DemoralizingShout *core.Spell
	BattleStance      *core.Spell
	DefensiveStance   *core.Spell
	BerserkerStance   *core.Spell

	Rend                            *core.Spell
	DeepWounds                      *core.Spell
	MortalStrike                    *core.Spell
	SweepingStrikesNormalizedAttack *core.Spell

	Cleave            *core.Spell
	MockingBlow       *core.Spell
	ChallengingShout  *core.Spell
	IntimidatingShout *core.Spell
	Disarm            *core.Spell
	Taunt             *core.Spell
	VictoryRush       *core.Spell

	EnrageAura      *core.Aura
	GoreDrinkerAura *core.Aura

	SweepingStrikesAura *core.Aura
	OverpowerAura       *core.Aura

	DemoralizingShoutAuras core.AuraArray
	SunderArmorAuras       core.AuraArray
	// contains filtered or unexported fields
}

func NewWarrior

func NewWarrior(character *core.Character, options *proto.WarriorOptions, talents string, inputs WarriorInputs) *Warrior

func (*Warrior) AddPartyBuffs

func (warrior *Warrior) AddPartyBuffs(_ *proto.PartyBuffs)

func (*Warrior) AddRaidBuffs

func (warrior *Warrior) AddRaidBuffs(raidBuffs *proto.RaidBuffs)

func (*Warrior) ApplyTalents

func (warrior *Warrior) ApplyTalents()

func (*Warrior) CastNormalizedSweepingStrikesAttack

func (warrior *Warrior) CastNormalizedSweepingStrikesAttack(results core.SpellResultSlice, sim *core.Simulation)

Whirlwind's one strike a cast, against two targets or more.

func (*Warrior) GetCharacter

func (warrior *Warrior) GetCharacter() *core.Character

func (*Warrior) GetMainHandType

func (warrior *Warrior) GetMainHandType() proto.HandType

func (*Warrior) Initialize

func (warrior *Warrior) Initialize()

func (*Warrior) OnEncounterStart

func (warrior *Warrior) OnEncounterStart(sim *core.Simulation)

func (*Warrior) Reset

func (warrior *Warrior) Reset(_ *core.Simulation)

func (*Warrior) TryHSOrCleave

func (warrior *Warrior) TryHSOrCleave(sim *core.Simulation, mhSwingSpell *core.Spell) *core.Spell

type WarriorAgent

type WarriorAgent interface {
	GetWarrior() *Warrior
}

Agent is a generic way to access underlying warrior on any of the agents.

type WarriorInputs

type WarriorInputs struct {
	UseBattleShout bool
	DefaultStance  proto.WarriorStance

	StartingRage   float64
	QueueDelay     int32
	StanceSnapshot bool
	HasBsT2        bool

	HasBattleShoutRank7 bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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