Documentation
¶
Index ¶
- Constants
- Variables
- type Stance
- type Warrior
- func (warrior *Warrior) AddPartyBuffs(partyBuffs *proto.PartyBuffs)
- func (warrior *Warrior) ApplyTalents()
- func (warrior *Warrior) CanBloodthirst(sim *core.Simulation) bool
- func (warrior *Warrior) CanDemoralizingShout(sim *core.Simulation) bool
- func (warrior *Warrior) CanDevastate(sim *core.Simulation) bool
- func (warrior *Warrior) CanExecute() bool
- func (warrior *Warrior) CanMortalStrike(sim *core.Simulation) bool
- func (warrior *Warrior) CanRevenge(sim *core.Simulation) bool
- func (warrior *Warrior) CanShieldBlock(sim *core.Simulation) bool
- func (warrior *Warrior) CanShieldSlam(sim *core.Simulation) bool
- func (warrior *Warrior) CanSlam() bool
- func (warrior *Warrior) CanSunderArmor(sim *core.Simulation) bool
- func (warrior *Warrior) CanThunderClap(sim *core.Simulation) bool
- func (warrior *Warrior) CanThunderClapIgnoreStance(sim *core.Simulation) bool
- func (warrior *Warrior) CanWhirlwind(sim *core.Simulation) bool
- func (warrior *Warrior) CastSlam(sim *core.Simulation, target *core.Unit) bool
- func (warrior *Warrior) DequeueHSOrCleave(sim *core.Simulation)
- func (warrior *Warrior) GetCharacter() *core.Character
- func (warrior *Warrior) Initialize()
- func (warrior *Warrior) QueueHSOrCleave(sim *core.Simulation)
- func (warrior *Warrior) RegisterHSOrCleave(useCleave bool, rageThreshold float64)
- func (warrior *Warrior) RegisterRecklessnessCD()
- func (warrior *Warrior) RegisterShieldWallCD()
- func (warrior *Warrior) Reset(sim *core.Simulation)
- func (warrior *Warrior) ShouldBerserkerRage(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldDemoralizingShout(sim *core.Simulation, filler bool, maintainOnly bool) bool
- func (warrior *Warrior) ShouldHamstring(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldOverpower(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldQueueHSOrCleave(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldRampage(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldShout(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldThunderClap(sim *core.Simulation, filler bool, maintainOnly bool, ignoreStance bool) bool
- func (warrior *Warrior) StanceMatches(other Stance) bool
- func (warrior *Warrior) TryHSOrCleave(sim *core.Simulation, mhSwingSpell *core.Spell) *core.Spell
- type WarriorAgent
- type WarriorInputs
Constants ¶
View Source
const ShoutExpirationThreshold = time.Second * 3
Variables ¶
View Source
var ItemSetBoldArmor = core.NewItemSet(core.ItemSet{ Name: "Bold Armor", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { }, 4: func(agent core.Agent) { }, }, })
View Source
var ItemSetDestroyerArmor = core.NewItemSet(core.ItemSet{ Name: "Destroyer Armor", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() procAura := warrior.RegisterAura(core.Aura{ Label: "Destroyer 2pc Proc", ActionID: core.ActionID{SpellID: 37522}, Duration: time.Second * 6, MaxStacks: 1, OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.BlockValue, 100) }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.BlockValue, -100) }, OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, spellEffect *core.SpellEffect) { if spellEffect.Outcome.Matches(core.OutcomeBlock) { aura.RemoveStack(sim) } }, }) warrior.RegisterAura(core.Aura{ Label: "Destroyer 2pc", 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 == warrior.ShieldBlock { procAura.Activate(sim) procAura.SetStacks(sim, 1) } }, }) }, 4: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() procAura := warrior.NewTemporaryStatsAura("Destroyer 4pc Proc", core.ActionID{SpellID: 37525}, stats.Stats{stats.MeleeHaste: 200}, time.Second*10) warrior.RegisterAura(core.Aura{ Label: "Destroyer 4pc", Duration: core.NeverExpires, OnReset: func(aura *core.Aura, sim *core.Simulation) { aura.Activate(sim) }, OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, spellEffect *core.SpellEffect) { if spellEffect.Landed() && sim.RandomFloat("Destroyer 4pc") < 0.07 { procAura.Activate(sim) } }, }) }, }, })
View Source
var ItemSetDestroyerBattlegear = core.NewItemSet(core.ItemSet{ Name: "Destroyer Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() procAura := warrior.NewTemporaryStatsAura("Destroyer 2pc Proc", core.ActionID{SpellID: 37528}, stats.Stats{stats.AttackPower: 100}, time.Second*5) warrior.RegisterAura(core.Aura{ Label: "Destroyer 2pc", 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 == warrior.Overpower { procAura.Activate(sim) } }, }) }, 4: func(agent core.Agent) { }, }, })
View Source
var ItemSetOnslaughtArmor = core.NewItemSet(core.ItemSet{ Name: "Onslaught Armor", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { }, 4: func(agent core.Agent) { }, }, })
View Source
var ItemSetOnslaughtBattlegear = core.NewItemSet(core.ItemSet{ Name: "Onslaught Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { }, 4: func(agent core.Agent) { }, }, })
View Source
var ItemSetWarbringerArmor = core.NewItemSet(core.ItemSet{ Name: "Warbringer Armor", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { }, 4: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() procAura := warrior.RegisterAura(core.Aura{ Label: "Warbringer 4pc Proc", ActionID: core.ActionID{SpellID: 37516}, Duration: core.NeverExpires, OnGain: func(aura *core.Aura, sim *core.Simulation) { aura.Unit.PseudoStats.DamageDealtMultiplier *= 1.1 }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { aura.Unit.PseudoStats.DamageDealtMultiplier /= 1.1 }, OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, spellEffect *core.SpellEffect) { if spellEffect.Damage > 0 { aura.Deactivate(sim) } }, }) warrior.RegisterAura(core.Aura{ Label: "Warbringer 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, spellEffect *core.SpellEffect) { if spell == warrior.Revenge { procAura.Activate(sim) } }, }) }, }, })
View Source
var ItemSetWarbringerBattlegear = core.NewItemSet(core.ItemSet{ Name: "Warbringer Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { }, 4: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() rageMetrics := warrior.NewRageMetrics(core.ActionID{SpellID: 37519}) warrior.RegisterAura(core.Aura{ Label: "Warbringer 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, spellEffect *core.SpellEffect) { if spellEffect.Outcome.Matches(core.OutcomeDodge | core.OutcomeParry) { warrior.AddRage(sim, 2, rageMetrics) } }, }) }, }, })
View Source
var SunderArmorActionID = core.ActionID{SpellID: 25225}
Functions ¶
This section is empty.
Types ¶
type Warrior ¶
type Warrior struct {
core.Character
Talents proto.WarriorTalents
WarriorInputs
// Current state
Stance Stance
RevengeValidUntil time.Duration
Shout *core.Spell
BattleStance *core.Spell
DefensiveStance *core.Spell
BerserkerStance *core.Spell
BerserkerRage *core.Spell
Bloodthirst *core.Spell
DemoralizingShout *core.Spell
Devastate *core.Spell
Execute *core.Spell
Hamstring *core.Spell
MortalStrike *core.Spell
Overpower *core.Spell
Rampage *core.Spell
Revenge *core.Spell
ShieldBlock *core.Spell
ShieldSlam *core.Spell
Slam *core.Spell
SunderArmor *core.Spell
SunderArmorDevastate *core.Spell
ThunderClap *core.Spell
Whirlwind *core.Spell
HeroicStrikeOrCleave *core.Spell
HSOrCleaveQueueAura *core.Aura
HSRageThreshold float64
BattleStanceAura *core.Aura
DefensiveStanceAura *core.Aura
BerserkerStanceAura *core.Aura
DemoralizingShoutAura *core.Aura
BloodFrenzyAuras []*core.Aura
ExposeArmorAura *core.Aura // Warriors don't cast this but they need to check it.
RampageAura *core.Aura
SunderArmorAura *core.Aura
ThunderClapAura *core.Aura
// contains filtered or unexported fields
}
func NewWarrior ¶
func NewWarrior(character core.Character, talents proto.WarriorTalents, inputs WarriorInputs) *Warrior
func (*Warrior) AddPartyBuffs ¶
func (warrior *Warrior) AddPartyBuffs(partyBuffs *proto.PartyBuffs)
func (*Warrior) ApplyTalents ¶
func (warrior *Warrior) ApplyTalents()
func (*Warrior) CanBloodthirst ¶
func (warrior *Warrior) CanBloodthirst(sim *core.Simulation) bool
func (*Warrior) CanDemoralizingShout ¶
func (warrior *Warrior) CanDemoralizingShout(sim *core.Simulation) bool
func (*Warrior) CanDevastate ¶
func (warrior *Warrior) CanDevastate(sim *core.Simulation) bool
func (*Warrior) CanExecute ¶
func (*Warrior) CanMortalStrike ¶
func (warrior *Warrior) CanMortalStrike(sim *core.Simulation) bool
func (*Warrior) CanRevenge ¶
func (warrior *Warrior) CanRevenge(sim *core.Simulation) bool
func (*Warrior) CanShieldBlock ¶
func (warrior *Warrior) CanShieldBlock(sim *core.Simulation) bool
func (*Warrior) CanShieldSlam ¶
func (warrior *Warrior) CanShieldSlam(sim *core.Simulation) bool
func (*Warrior) CanSunderArmor ¶
func (warrior *Warrior) CanSunderArmor(sim *core.Simulation) bool
func (*Warrior) CanThunderClap ¶
func (warrior *Warrior) CanThunderClap(sim *core.Simulation) bool
func (*Warrior) CanThunderClapIgnoreStance ¶
func (warrior *Warrior) CanThunderClapIgnoreStance(sim *core.Simulation) bool
func (*Warrior) CanWhirlwind ¶
func (warrior *Warrior) CanWhirlwind(sim *core.Simulation) bool
func (*Warrior) DequeueHSOrCleave ¶
func (warrior *Warrior) DequeueHSOrCleave(sim *core.Simulation)
func (*Warrior) GetCharacter ¶
func (*Warrior) Initialize ¶
func (warrior *Warrior) Initialize()
func (*Warrior) QueueHSOrCleave ¶
func (warrior *Warrior) QueueHSOrCleave(sim *core.Simulation)
func (*Warrior) RegisterHSOrCleave ¶
func (*Warrior) RegisterRecklessnessCD ¶
func (warrior *Warrior) RegisterRecklessnessCD()
func (*Warrior) RegisterShieldWallCD ¶
func (warrior *Warrior) RegisterShieldWallCD()
func (*Warrior) Reset ¶
func (warrior *Warrior) Reset(sim *core.Simulation)
func (*Warrior) ShouldBerserkerRage ¶
func (warrior *Warrior) ShouldBerserkerRage(sim *core.Simulation) bool
func (*Warrior) ShouldDemoralizingShout ¶
func (*Warrior) ShouldHamstring ¶
func (warrior *Warrior) ShouldHamstring(sim *core.Simulation) bool
func (*Warrior) ShouldOverpower ¶
func (warrior *Warrior) ShouldOverpower(sim *core.Simulation) bool
func (*Warrior) ShouldQueueHSOrCleave ¶
func (warrior *Warrior) ShouldQueueHSOrCleave(sim *core.Simulation) bool
func (*Warrior) ShouldRampage ¶
func (warrior *Warrior) ShouldRampage(sim *core.Simulation) bool
func (*Warrior) ShouldShout ¶
func (warrior *Warrior) ShouldShout(sim *core.Simulation) bool
func (*Warrior) ShouldThunderClap ¶
func (*Warrior) StanceMatches ¶
func (*Warrior) TryHSOrCleave ¶
Returns true if the regular melee swing should be used, false otherwise.
type WarriorAgent ¶
type WarriorAgent interface {
GetWarrior() *Warrior
}
Agent is a generic way to access underlying warrior on any of the agents.
type WarriorInputs ¶
Source Files
¶
- berserker_rage.go
- bloodrage.go
- bloodthirst.go
- deep_wounds.go
- demoralizing_shout.go
- devastate.go
- execute.go
- hamstring.go
- heroic_strike_cleave.go
- items.go
- mortal_strike.go
- overpower.go
- rampage.go
- recklessness.go
- revenge.go
- shield_block.go
- shield_slam.go
- shield_wall.go
- shouts.go
- slam.go
- stances.go
- sunder_armor.go
- sweeping_strikes.go
- talents.go
- thunder_clap.go
- warrior.go
- whirlwind.go
Click to show internal directories.
Click to hide internal directories.