Documentation ¶
Index ¶
- Constants
- Variables
- type Stance
- type Warrior
- func (warrior *Warrior) AddPartyBuffs(_ *proto.PartyBuffs)
- func (warrior *Warrior) AddRaidBuffs(raidBuffs *proto.RaidBuffs)
- func (warrior *Warrior) ApplyRunes()
- func (warrior *Warrior) ApplyTalents()
- func (warrior *Warrior) GetCharacter() *core.Character
- func (warrior *Warrior) HasRune(rune proto.WarriorRune) bool
- func (warrior *Warrior) Initialize()
- func (warrior *Warrior) IsEnraged() bool
- func (warrior *Warrior) RegisterRecklessnessCD()
- func (warrior *Warrior) RegisterShieldBlockCD()
- func (warrior *Warrior) RegisterShieldWallCD()
- func (warrior *Warrior) RegisterSpell(stanceMask Stance, config core.SpellConfig) *WarriorSpell
- func (warrior *Warrior) Reset(sim *core.Simulation)
- func (warrior *Warrior) StanceMatches(other Stance) bool
- func (warrior *Warrior) ToughnessArmorMultiplier() float64
- func (warrior *Warrior) TryHSOrCleave(sim *core.Simulation, mhSwingSpell *core.Spell) *core.Spell
- type WarriorAgent
- type WarriorInputs
- type WarriorSpell
Constants ¶
View Source
const ( DiamondFlask = 20130 Exsanguinar = 216497 )
View Source
const ( SpellFlagBattleStance = core.SpellFlagAgentReserved1 SpellFlagDefensiveStance = core.SpellFlagAgentReserved1 SpellFlagBerserkerStance = core.SpellFlagAgentReserved1 SpellFlagBloodSurge = core.SpellFlagAgentReserved4 )
View Source
const ( SpellCode_WarriorNone int32 = iota SpellCode_WarriorBloodthirst SpellCode_WarriorDevastate SpellCode_WarriorExecute SpellCode_WarriorMortalStrike SpellCode_WarriorOverpower SpellCode_WarriorRagingBlow SpellCode_WarriorRend SpellCode_WarriorRevenge SpellCode_WarriorShieldSlam SpellCode_WarriorSlam SpellCode_WarriorSlamMH SpellCode_WarriorSlamOH SpellCode_WarriorStanceBattle SpellCode_WarriorStanceBerserker SpellCode_WarriorStanceGladiator SpellCode_WarriorStanceDefensive SpellCode_WarriorWhirlwind SpellCode_WarriorWhirlwindMH SpellCode_WarriorWhirlwindOH )
View Source
const ( ArmsTree = 0 FuryTree = 1 ProtTree = 2 )
View Source
const RevengeRanks = 6
View Source
const ShoutExpirationThreshold = time.Second * 3
Variables ¶
View Source
var ItemSetBattlegearOfValor = core.NewItemSet(core.ItemSet{ Name: "Battlegear of Heroism", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { c := agent.GetCharacter() c.AddStats(stats.Stats{ stats.AttackPower: 40, stats.RangedAttackPower: 40, }) }, 4: func(agent core.Agent) { c := agent.GetCharacter() actionID := core.ActionID{SpellID: 450587} healthMetrics := c.NewHealthMetrics(core.ActionID{SpellID: 450589}) rageMetrics := c.NewRageMetrics(core.ActionID{SpellID: 450589}) core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{ ActionID: actionID, Name: "S03 - Warrior Armor Heal Trigger - Battlegear of Valor", Callback: core.CallbackOnSpellHitDealt, Outcome: core.OutcomeLanded, ProcMask: core.ProcMaskMelee, PPM: 1, Handler: func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) { c.GainHealth(sim, sim.Roll(88, 132), healthMetrics) if c.HasRageBar() { c.AddRage(sim, 10, rageMetrics) } }, }) }, 6: func(agent core.Agent) { c := agent.GetCharacter() c.AddResistances(8) }, 8: func(agent core.Agent) { c := agent.GetCharacter() c.AddStat(stats.Armor, 200) }, }, })
View Source
var ItemSetChampionsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Champion's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { c := agent.GetCharacter() c.AddStats(stats.Stats{ stats.AttackPower: 40, stats.RangedAttackPower: 40, }) }, 4: func(agent core.Agent) { }, 6: func(agent core.Agent) { c := agent.GetCharacter() c.AddStat(stats.Stamina, 20) }, }, })
View Source
var ItemSetImmoveableMight = core.NewItemSet(core.ItemSet{ Name: "Immoveable Might", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { character := agent.GetCharacter() character.AddStat(stats.BlockValue, 30) }, 4: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() warrior.AddDamageDealtRageBonus(1) warrior.AddDamageTakenRageBonus(1) }, 6: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() core.MakePermanent(warrior.RegisterAura(core.Aura{ Label: "S03 - Item - T1 - Warrior - Tank 6P Bonus", OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.defensiveStanceThreatMultiplier *= 1.10 warrior.gladiatorStanceDamageMultiplier *= 1.04 }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.defensiveStanceThreatMultiplier /= 1.10 warrior.gladiatorStanceDamageMultiplier /= 1.04 }, })) }, }, })
View Source
var ItemSetLieutenantCommandersBattlegear = core.NewItemSet(core.ItemSet{ Name: "Lieutenant Commander's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { c := agent.GetCharacter() c.AddStats(stats.Stats{ stats.AttackPower: 40, stats.RangedAttackPower: 40, }) }, 4: func(agent core.Agent) { }, 6: func(agent core.Agent) { c := agent.GetCharacter() c.AddStat(stats.Stamina, 20) }, }, })
View Source
var ItemSetUnstoppableMight = core.NewItemSet(core.ItemSet{ Name: "Unstoppable Might", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() rageMetrics := warrior.NewRageMetrics(core.ActionID{SpellID: 457652}) core.MakePermanent(warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457652}, Label: "S03 - Item - T1 - Warrior - Damage 2P Bonus Trigger", OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) { if slices.Contains(StanceCodes, spell.SpellCode) { warrior.AddRage(sim, 10, rageMetrics) } }, })) }, 4: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() battleStanceAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457706}, Label: "Echoes of Battle Stance", Duration: time.Second * 5, }) defStanceAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457699}, Label: "Echoes of Defensive Stance", Duration: time.Second * 5, }) berserkStanceAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457708}, Label: "Echoes of Berserker Stance", Duration: time.Second * 5, }) gladStanceAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457819}, Label: "Echoes of Gladiator Stance", Duration: time.Second * 5, }) warrior.newStanceOverrideExclusiveEffect(BattleStance, battleStanceAura) warrior.newStanceOverrideExclusiveEffect(DefensiveStance, defStanceAura) warrior.newStanceOverrideExclusiveEffect(BerserkerStance, berserkStanceAura) warrior.newStanceOverrideExclusiveEffect(AnyStance, gladStanceAura) core.MakePermanent(warrior.RegisterAura(core.Aura{ Label: "S03 - Item - T1 - Warrior - Damage 4P Bonus Trigger", OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) { if slices.Contains(StanceCodes, spell.SpellCode) { switch warrior.PreviousStance { case BattleStance: battleStanceAura.Activate(sim) case DefensiveStance: defStanceAura.Activate(sim) case BerserkerStance: berserkStanceAura.Activate(sim) case GladiatorStance: gladStanceAura.Activate(sim) } } }, })) }, 6: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() battleAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457816}, Label: "Battle Forecast", Duration: time.Second * 10, OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.PseudoStats.SchoolDamageDealtMultiplier[core.SpellSchoolPhysical] *= 1.10 }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.PseudoStats.SchoolDamageDealtMultiplier[core.SpellSchoolPhysical] /= 1.10 }, }) defenseAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457814}, Label: "Defense Forecast", Duration: time.Second * 10, OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.PseudoStats.DamageTakenMultiplier *= 0.90 }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.PseudoStats.DamageTakenMultiplier /= 0.90 }, }) berserkAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 457817}, Label: "Berserker Forecast", Duration: time.Second * 10, OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.MeleeCrit, 10*core.CritRatingPerCritChance) }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.MeleeCrit, -10*core.CritRatingPerCritChance) }, }) core.MakePermanent(warrior.RegisterAura(core.Aura{ Label: "S03 - Item - T1 - Warrior - Damage 6P Bonus Trigger", OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) { switch spell.SpellCode { case SpellCode_WarriorStanceBattle: battleAura.Activate(sim) case SpellCode_WarriorStanceGladiator: battleAura.Activate(sim) case SpellCode_WarriorStanceDefensive: defenseAura.Activate(sim) case SpellCode_WarriorStanceBerserker: berserkAura.Activate(sim) } }, })) }, }, })
View Source
var RevengeBaseDamage = [RevengeRanks + 1][]float64{{0, 0}, {12, 14}, {18, 22}, {25, 31}, {43, 53}, {64, 78}, {81, 99}}
View Source
var RevengeLevel = [RevengeRanks + 1]int{0, 14, 24, 34, 44, 54, 60}
View Source
var RevengeSpellId = [RevengeRanks + 1]int32{0, 6572, 6574, 7379, 11600, 11601, 25288}
View Source
var StanceCodes = []int32{SpellCode_WarriorStanceBattle, SpellCode_WarriorStanceDefensive, SpellCode_WarriorStanceBerserker, SpellCode_WarriorStanceGladiator}
View Source
var TalentTreeSizes = [3]int{18, 17, 17}
Functions ¶
This section is empty.
Types ¶
type Stance ¶
type Stance uint8
const ( BattleStance Stance = 1 << iota DefensiveStance BerserkerStance GladiatorStance AnyStance = BattleStance | DefensiveStance | BerserkerStance | GladiatorStance )
type Warrior ¶
type Warrior struct { core.Character Talents *proto.WarriorTalents WarriorInputs // Current state Stance Stance PreviousStance Stance // Used for Warrior T1 DPS 4P OverpowerAura *core.Aura BloodSurgeAura *core.Aura RampageAura *core.Aura SuddenDeathAura *core.Aura TasteForBloodAura *core.Aura // Enrage Auras BerserkerRageAura *core.Aura BloodrageAura *core.Aura ConsumedByRageAura *core.Aura EnrageAura *core.Aura FreshMeatEnrageAura *core.Aura WreckingCrewEnrageAura *core.Aura // Rune passive FocusedRageDiscount float64 LastAMTick time.Duration BattleShout *WarriorSpell BattleStanceSpells []*WarriorSpell DefensiveStanceSpells []*WarriorSpell BerserkerStanceSpells []*WarriorSpell Stances []*WarriorSpell BattleStance *WarriorSpell DefensiveStance *WarriorSpell BerserkerStance *WarriorSpell GladiatorStance *WarriorSpell Bloodrage *WarriorSpell BerserkerRage *WarriorSpell Bloodthirst *WarriorSpell DemoralizingShout *WarriorSpell Execute *WarriorSpell MortalStrike *WarriorSpell Overpower *WarriorSpell Rend *WarriorSpell Revenge *WarriorSpell ShieldBlock *WarriorSpell ShieldSlam *WarriorSpell Slam *WarriorSpell SlamMH *WarriorSpell SlamOH *WarriorSpell SunderArmor *WarriorSpell Devastate *WarriorSpell ThunderClap *WarriorSpell Whirlwind *WarriorSpell WhirlwindMH *WarriorSpell WhirlwindOH *WarriorSpell DeepWounds *WarriorSpell ConcussionBlow *WarriorSpell RagingBlow *WarriorSpell Hamstring *WarriorSpell Rampage *WarriorSpell Shockwave *WarriorSpell HeroicStrike *WarriorSpell QuickStrike *WarriorSpell Cleave *WarriorSpell BattleStanceAura *core.Aura DefensiveStanceAura *core.Aura BerserkerStanceAura *core.Aura GladiatorStanceAura *core.Aura ShieldBlockAura *core.Aura DemoralizingShoutAuras core.AuraArray SunderArmorAuras core.AuraArray ThunderClapAuras core.AuraArray // contains filtered or unexported fields }
func NewWarrior ¶
func NewWarrior(character *core.Character, talents string, inputs WarriorInputs) *Warrior
func (*Warrior) AddPartyBuffs ¶
func (warrior *Warrior) AddPartyBuffs(_ *proto.PartyBuffs)
func (*Warrior) AddRaidBuffs ¶
func (*Warrior) ApplyRunes ¶
func (warrior *Warrior) ApplyRunes()
func (*Warrior) ApplyTalents ¶
func (warrior *Warrior) ApplyTalents()
func (*Warrior) GetCharacter ¶
func (*Warrior) Initialize ¶
func (warrior *Warrior) Initialize()
func (*Warrior) RegisterRecklessnessCD ¶
func (warrior *Warrior) RegisterRecklessnessCD()
Recklessness now increases critical strike chance by 50% (was 100%) and the duration is reduced to 12 seconds, but the cooldown is reduced to 5 minutes.
func (*Warrior) RegisterShieldBlockCD ¶
func (warrior *Warrior) RegisterShieldBlockCD()
func (*Warrior) RegisterShieldWallCD ¶
func (warrior *Warrior) RegisterShieldWallCD()
TODO: Classic Update
func (*Warrior) RegisterSpell ¶ added in v0.0.17
func (warrior *Warrior) RegisterSpell(stanceMask Stance, config core.SpellConfig) *WarriorSpell
func (*Warrior) Reset ¶
func (warrior *Warrior) Reset(sim *core.Simulation)
func (*Warrior) StanceMatches ¶
func (*Warrior) ToughnessArmorMultiplier ¶
func (*Warrior) TryHSOrCleave ¶
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 { StanceSnapshot bool Stance proto.WarriorStance }
type WarriorSpell ¶ added in v0.0.17
type WarriorSpell struct { *core.Spell StanceMask Stance // contains filtered or unexported fields }
func (*WarriorSpell) CanCast ¶ added in v0.0.17
func (ws *WarriorSpell) CanCast(sim *core.Simulation, target *core.Unit) bool
func (*WarriorSpell) GetStanceMask ¶ added in v0.0.17
func (ws *WarriorSpell) GetStanceMask() Stance
Returns the StanceMask accounting for a possible override
func (*WarriorSpell) IsReady ¶ added in v0.0.17
func (ws *WarriorSpell) IsReady(sim *core.Simulation) bool
Source Files ¶
- berserker_rage.go
- bloodrage.go
- bloodthirst.go
- deep_wounds.go
- demoralizing_shout.go
- execute.go
- hamstring.go
- heroic_strike_cleave.go
- item_sets_pve.go
- item_sets_pvp.go
- items.go
- mortal_strike.go
- overpower.go
- quick_strike.go
- raging_blow.go
- rampage.go
- recklessness.go
- rend.go
- revenge.go
- runes.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.