Documentation ¶
Index ¶
- Constants
- Variables
- type Stance
- type Warrior
- func (warrior *Warrior) AddPartyBuffs(partyBuffs *proto.PartyBuffs)
- func (warrior *Warrior) AddRaidBuffs(raidBuffs *proto.RaidBuffs)
- func (warrior *Warrior) ApplyTalents()
- func (warrior *Warrior) CanBloodthirst(sim *core.Simulation) bool
- func (warrior *Warrior) CanConcussionBlow(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) CanShieldSlam(sim *core.Simulation) bool
- func (warrior *Warrior) CanShockwave(sim *core.Simulation) bool
- func (warrior *Warrior) CanSuddenDeathExecute() 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) CastExecute(sim *core.Simulation, target *core.Unit) 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) HasEnoughRageForShieldSlam() bool
- func (warrior *Warrior) HasMajorGlyph(glyph proto.WarriorMajorGlyph) bool
- func (warrior *Warrior) HasMinorGlyph(glyph proto.WarriorMinorGlyph) bool
- func (warrior *Warrior) Initialize()
- func (warrior *Warrior) QueueHSOrCleave(sim *core.Simulation)
- func (warrior *Warrior) RegisterBladestormCD()
- func (warrior *Warrior) RegisterHSOrCleave(useCleave bool, rageThreshold float64)
- func (warrior *Warrior) RegisterRecklessnessCD()
- func (warrior *Warrior) RegisterRendSpell(rageThreshold float64, healthThreshold float64)
- func (warrior *Warrior) RegisterShatteringThrowCD()
- func (warrior *Warrior) RegisterShieldBlockCD()
- 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) ShouldInstantSlam(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldOverpower(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldQueueHSOrCleave(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldRend(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldShout(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldSlam(sim *core.Simulation) bool
- func (warrior *Warrior) ShouldThunderClap(sim *core.Simulation, filler bool, maintainOnly bool, ignoreStance bool) bool
- func (warrior *Warrior) SpamExecute(spam 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 ( SpellFlagBloodsurge = core.SpellFlagAgentReserved1 ArmsTree = 0 FuryTree = 1 ProtTree = 2 )
View Source
const ShoutExpirationThreshold = time.Second * 3
Variables ¶
View Source
var DeepWoundsActionID = core.ActionID{SpellID: 12867}
View Source
var ItemSetDreadnaughtBattlegear = core.NewItemSet(core.ItemSet{ Name: "Dreadnaught 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: 61571}) procAura := warrior.RegisterAura(core.Aura{ Label: "Dreadnaught Battlegear 4pc Proc", ActionID: core.ActionID{SpellID: 61571}, Duration: time.Second * 30, OnGain: func(_ *core.Aura, sim *core.Simulation) { warrior.PseudoStats.CostReduction += 5 }, OnExpire: func(_ *core.Aura, sim *core.Simulation) { warrior.PseudoStats.CostReduction -= 5 }, OnSpellHitDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) { if !spell.ProcMask.Matches(core.ProcMaskMeleeSpecial) { return } if actualGain := spell.DefaultCast.Cost - spell.CurCast.Cost; actualGain > 0 { rageMetrics.AddEvent(5, actualGain) aura.Deactivate(sim) } }, }) warrior.RegisterAura(core.Aura{ Label: "Dreadnaught Battlegear 4pc", Duration: core.NeverExpires, ActionID: core.ActionID{SpellID: 60176}, OnReset: func(aura *core.Aura, sim *core.Simulation) { aura.Activate(sim) }, OnPeriodicDamageDealt: func(_ *core.Aura, sim *core.Simulation, _ *core.Spell, result *core.SpellResult) { if result.Landed() && sim.RandomFloat("Dreadnaught Battlegear 4pc") < 0.1 { procAura.Activate(sim) } }, }) }, }, })
View Source
var ItemSetGladiatorsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Gladiator's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { agent.GetCharacter().AddStat(stats.Resilience, 100) agent.GetCharacter().AddStat(stats.AttackPower, 50) }, 4: func(agent core.Agent) { agent.GetCharacter().AddStat(stats.AttackPower, 150) }, }, })
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 ItemSetSiegebreakerBattlegear = core.NewItemSet(core.ItemSet{ Name: "Siegebreaker Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() procAura := warrior.RegisterAura(core.Aura{ Label: "Siegebreaker Battlegear 2pc Proc", ActionID: core.ActionID{SpellID: 64937}, Duration: time.Second * 5, OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.MeleeHaste, 150) }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.MeleeHaste, -150) }, }) warrior.RegisterAura(core.Aura{ Label: "Siegebreaker Battlegear 2pc", Duration: core.NeverExpires, ActionID: core.ActionID{SpellID: 64938}, 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.ActionID.SpellID != 47450 && spell != warrior.Slam { return } if result.Landed() && sim.RandomFloat("Siegebreaker Battlegear 2pc") < 0.4 { procAura.Activate(sim) } }, }) }, 4: func(agent core.Agent) { }, }, })
View Source
var ItemSetWrynnsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Wrynn's Battlegear", AlternativeName: "Hellscream's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { }, 4: func(agent core.Agent) { }, }, })
View Source
var ItemSetYmirjarLordsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Ymirjar Lord's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() var bonusAP float64 procAura := warrior.RegisterAura(core.Aura{ Label: "Ymirjar Lord's Battlegear 2pc Proc", ActionID: core.ActionID{SpellID: 70855}, Duration: time.Second * 10, OnGain: func(aura *core.Aura, sim *core.Simulation) { bonusAP = warrior.GetStat(stats.AttackPower) * 0.16 aura.Unit.AddStatDynamic(sim, stats.AttackPower, bonusAP) }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { aura.Unit.AddStatDynamic(sim, stats.AttackPower, -bonusAP) }, }) warrior.RegisterAura(core.Aura{ Label: "Ymirjar Lord's Battlegear 2pc", Duration: core.NeverExpires, ActionID: core.ActionID{SpellID: 70854}, OnReset: func(aura *core.Aura, sim *core.Simulation) { aura.Activate(sim) }, OnPeriodicDamageDealt: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { if spell != warrior.DeepWounds { return } if result.Landed() && sim.RandomFloat("Ymirjar 2pc") < 0.03 { procAura.Activate(sim) } }, }) }, 4: func(agent core.Agent) { }, }, })
View Source
var SunderArmorActionID = core.ActionID{SpellID: 47467}
Functions ¶
This section is empty.
Types ¶
type Warrior ¶
type Warrior struct { core.Character Talents *proto.WarriorTalents WarriorInputs // Current state Stance Stance Ymirjar4pcProcAura *core.Aura 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 MortalStrike *core.Spell Overpower *core.Spell Rend *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 WhirlwindOH *core.Spell DeepWounds *core.Spell Shockwave *core.Spell ConcussionBlow *core.Spell Bladestorm *core.Spell BladestormOH *core.Spell RendDots *core.Dot DeepWoundsDots []*core.Dot DeepWoundsTickDamage []float64 DeepWoundsDamageBuffer []float64 HeroicStrikeOrCleave *core.Spell HSOrCleaveQueueAura *core.Aura HSRageThreshold float64 RendRageThresholdBelow float64 RendHealthThresholdAbove float64 BattleStanceAura *core.Aura DefensiveStanceAura *core.Aura BerserkerStanceAura *core.Aura BloodsurgeAura *core.Aura SuddenDeathAura *core.Aura SwordAndBoardAura *core.Aura ShieldBlockAura *core.Aura DemoralizingShoutAura *core.Aura BloodFrenzyAuras []*core.Aura TraumaAuras []*core.Aura ExposeArmorAura *core.Aura // Warriors don't cast this but they need to check it. AcidSpitAura *core.Aura // Warriors don't cast this but they need to check it. 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) AddRaidBuffs ¶
func (*Warrior) ApplyTalents ¶
func (warrior *Warrior) ApplyTalents()
func (*Warrior) CanBloodthirst ¶
func (warrior *Warrior) CanBloodthirst(sim *core.Simulation) bool
func (*Warrior) CanConcussionBlow ¶
func (warrior *Warrior) CanConcussionBlow(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) CanShieldSlam ¶
func (warrior *Warrior) CanShieldSlam(sim *core.Simulation) bool
func (*Warrior) CanShockwave ¶
func (warrior *Warrior) CanShockwave(sim *core.Simulation) bool
func (*Warrior) CanSuddenDeathExecute ¶
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) CastExecute ¶
func (*Warrior) DequeueHSOrCleave ¶
func (warrior *Warrior) DequeueHSOrCleave(sim *core.Simulation)
func (*Warrior) GetCharacter ¶
func (*Warrior) HasEnoughRageForShieldSlam ¶
func (*Warrior) HasMajorGlyph ¶
func (warrior *Warrior) HasMajorGlyph(glyph proto.WarriorMajorGlyph) bool
func (*Warrior) HasMinorGlyph ¶
func (warrior *Warrior) HasMinorGlyph(glyph proto.WarriorMinorGlyph) bool
func (*Warrior) Initialize ¶
func (warrior *Warrior) Initialize()
func (*Warrior) QueueHSOrCleave ¶
func (warrior *Warrior) QueueHSOrCleave(sim *core.Simulation)
func (*Warrior) RegisterBladestormCD ¶
func (warrior *Warrior) RegisterBladestormCD()
func (*Warrior) RegisterHSOrCleave ¶
func (*Warrior) RegisterRecklessnessCD ¶
func (warrior *Warrior) RegisterRecklessnessCD()
func (*Warrior) RegisterRendSpell ¶ added in v0.1.1
TODO (maybe) https://github.com/magey/wotlk-warrior/issues/23 - Rend is not benefitting from Two-Handed Weapon Specialization
func (*Warrior) RegisterShatteringThrowCD ¶ added in v0.1.1
func (warrior *Warrior) RegisterShatteringThrowCD()
func (*Warrior) RegisterShieldBlockCD ¶
func (warrior *Warrior) RegisterShieldBlockCD()
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) ShouldInstantSlam ¶
func (warrior *Warrior) ShouldInstantSlam(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) ShouldRend ¶
func (warrior *Warrior) ShouldRend(sim *core.Simulation) bool
func (*Warrior) ShouldShout ¶
func (warrior *Warrior) ShouldShout(sim *core.Simulation) bool
func (*Warrior) ShouldSlam ¶
func (warrior *Warrior) ShouldSlam(sim *core.Simulation) bool
func (*Warrior) ShouldThunderClap ¶
func (*Warrior) SpamExecute ¶
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
- concussion_blow.go
- deep_wounds.go
- demoralizing_shout.go
- devastate.go
- execute.go
- heroic_strike_cleave.go
- items.go
- mortal_strike.go
- overpower.go
- recklessness.go
- rend.go
- revenge.go
- shattering_throw.go
- shield_block.go
- shield_slam.go
- shield_wall.go
- shockwave.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.