Documentation
¶
Index ¶
- Constants
- Variables
- type Stance
- type Warrior
- func (warrior *Warrior) AddPartyBuffs(_ *proto.PartyBuffs)
- func (warrior *Warrior) AddRaidBuffs(raidBuffs *proto.RaidBuffs)
- func (warrior *Warrior) ApplyTalents()
- func (warrior *Warrior) GetCharacter() *core.Character
- func (warrior *Warrior) Initialize()
- 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 ( MarshalsPlateGauntlets = 16484 GeneralsPlateGauntlets = 16548 LifegivingGem = 19341 RageOfMugamba = 19577 GrileksCharmOfMight = 19951 DiamondFlask = 20130 )
View Source
const ( SpellCode_WarriorNone int32 = iota SpellCode_WarriorBloodthirst SpellCode_WarriorDeepWounds SpellCode_WarriorExecute SpellCode_WarriorMortalStrike SpellCode_WarriorOverpower SpellCode_WarriorRend SpellCode_WarriorRevenge SpellCode_WarriorShieldSlam SpellCode_WarriorSlam SpellCode_WarriorStanceBattle SpellCode_WarriorStanceBerserker SpellCode_WarriorStanceDefensive SpellCode_WarriorWhirlwind )
View Source
const ( ArmsTree = 0 FuryTree = 1 ProtTree = 2 )
View Source
const RevengeRanks = 6
View Source
const ShoutExpirationThreshold = time.Second * 3
View Source
const (
SpellFlagOffensive = core.SpellFlagAgentReserved1
)
Variables ¶
View Source
var ItemSetBattleGearOfMight = core.NewItemSet(core.ItemSet{ Name: "Battlegear of Might", Bonuses: map[int32]core.ApplyEffect{ 3: func(agent core.Agent) { character := agent.GetCharacter() character.AddStat(stats.BlockValue, 30) }, 5: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() actionID := core.ActionID{SpellID: 21838} rageMetrics := warrior.NewRageMetrics(actionID) core.MakeProcTriggerAura(&warrior.Unit, core.ProcTrigger{ ActionID: actionID, Name: "Battlegear of Might - Rage", Callback: core.CallbackOnSpellHitTaken, ProcMask: core.ProcMaskMelee, ProcChance: 0.20, Handler: func(sim *core.Simulation, spell *core.Spell, _ *core.SpellResult) { warrior.AddRage(sim, 1, rageMetrics) }, }) }, 8: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() warrior.RegisterAura(core.Aura{ Label: "Enhanced Sunder Armor", OnInit: func(aura *core.Aura, sim *core.Simulation) { warrior.SunderArmor.ThreatMultiplier *= 1.15 warrior.SunderArmor.FlatThreatBonus *= 1.15 }, }) }, }, })
View Source
var ItemSetBattleGearOfWrath = core.NewItemSet(core.ItemSet{ Name: "Battlegear of Wrath", Bonuses: map[int32]core.ApplyEffect{ 3: func(agent core.Agent) { }, 5: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() var affectedSpells []*core.Spell warriorsWrathAura := warrior.RegisterAura(core.Aura{ ActionID: core.ActionID{SpellID: 21887}, Label: "Warrior's Wrath", Duration: time.Second * 10, OnInit: func(aura *core.Aura, sim *core.Simulation) { for _, spell := range warrior.Spellbook { if spell.Cost != nil && spell.Cost.CostType() == core.CostTypeRage && !spell.Flags.Matches(core.SpellFlagHelpful) { affectedSpells = append(affectedSpells, spell) } } }, OnGain: func(aura *core.Aura, sim *core.Simulation) { for _, spell := range affectedSpells { spell.Cost.FlatModifier -= 5 } }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { for _, spell := range affectedSpells { spell.Cost.FlatModifier += 5 } }, OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) { if slices.Contains(affectedSpells, spell) { aura.Deactivate(sim) } }, }) core.MakePermanent(warrior.RegisterAura(core.Aura{ Label: "Warrior's Wrath Trigger", OnCastComplete: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell) { if slices.Contains(affectedSpells, spell) { if sim.Proc(0.2, "Warrior's Wrath Trigger") { warriorsWrathAura.Activate(sim) } } }, })) }, 8: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() actionID := core.ActionID{SpellID: 23548} parryAura := warrior.RegisterAura(core.Aura{ ActionID: actionID, Label: "Parry", Duration: time.Second * 10, OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.Parry, 100*core.ParryRatingPerParryChance) }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.AddStatDynamic(sim, stats.Parry, -100*core.ParryRatingPerParryChance) }, OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { aura.Deactivate(sim) }, }) core.MakePermanent(warrior.RegisterAura(core.Aura{ Label: "Parry Trigger Aura", OnSpellHitTaken: func(aura *core.Aura, sim *core.Simulation, spell *core.Spell, result *core.SpellResult) { if result.DidBlock() && sim.Proc(0.04, "Parry Proc") { parryAura.Activate(sim) } }, })) }, }, })
View Source
var ItemSetBattlegearOfHeroism = core.NewItemSet(core.ItemSet{ Name: "Battlegear of Heroism", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { c := agent.GetCharacter() c.AddResistances(8) }, 4: func(agent core.Agent) { c := agent.GetCharacter() actionID := core.ActionID{SpellID: 27419} healthMetrics := c.NewHealthMetrics(core.ActionID{SpellID: 27419}) core.MakeProcTriggerAura(&c.Unit, core.ProcTrigger{ ActionID: actionID, Name: "Warrior's Resolve", 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, 133), healthMetrics) }, }) }, 6: func(agent core.Agent) { c := agent.GetCharacter() c.AddStats(stats.Stats{ stats.AttackPower: 40, stats.RangedAttackPower: 40, }) }, 8: func(agent core.Agent) { c := agent.GetCharacter() c.AddStat(stats.Armor, 200) }, }, })
View Source
var ItemSetChampionsBattlearmor = core.NewItemSet(core.ItemSet{ Name: "Champion's Battlearmor", 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 ItemSetConquerorsBattleGear = core.NewItemSet(core.ItemSet{ Name: "Conqueror's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 3: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() core.MakePermanent(warrior.RegisterAura(core.Aura{ Label: "Conqueror Shout Bonus", OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.BattleShout.Cost.Multiplier -= 35 }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.BattleShout.Cost.Multiplier += 35 }, })) }, 5: func(agent core.Agent) { }, }, })
View Source
var ItemSetDreadnaughtsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Dreadnaught's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { }, 4: func(agent core.Agent) { }, 6: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() core.MakePermanent(warrior.RegisterAura(core.Aura{ Label: "Increased Hit Chance", OnGain: func(aura *core.Aura, sim *core.Simulation) { warrior.SunderArmor.BonusHitRating += 5 warrior.HeroicStrike.BonusHitRating += 5 warrior.Revenge.BonusHitRating += 5 if warrior.Talents.ShieldSlam { warrior.ShieldSlam.BonusHitRating += 5 } }, OnExpire: func(aura *core.Aura, sim *core.Simulation) { warrior.SunderArmor.BonusHitRating -= 5 warrior.HeroicStrike.BonusHitRating -= 5 warrior.Revenge.BonusHitRating -= 5 if warrior.Talents.ShieldSlam { warrior.ShieldSlam.BonusHitRating -= 5 } }, })) }, 8: func(agent core.Agent) { }, }, })
View Source
var ItemSetFieldMarshalsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Field Marshal's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { c := agent.GetCharacter() c.AddStat(stats.Stamina, 20) }, 4: func(agent core.Agent) { }, 6: func(agent core.Agent) { c := agent.GetCharacter() c.AddStats(stats.Stats{ stats.AttackPower: 40, stats.RangedAttackPower: 40, }) }, }, })
View Source
var ItemSetLieutenantCommandersBattlearmor = core.NewItemSet(core.ItemSet{ Name: "Lieutenant Commander's Battlearmor", 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 ItemSetVindicatorsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Vindicator's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() warrior.AddStat(stats.Block, 2) }, 3: func(agent core.Agent) { }, 5: func(agent core.Agent) { warrior := agent.(WarriorAgent).GetWarrior() warrior.RegisterAura(core.Aura{ Label: "Improved Whirlwind", OnInit: func(aura *core.Aura, sim *core.Simulation) { warrior.Whirlwind.Cost.FlatModifier -= 3 }, }) }, }, })
View Source
var ItemSetWarlordsBattlegear = core.NewItemSet(core.ItemSet{ Name: "Warlord's Battlegear", Bonuses: map[int32]core.ApplyEffect{ 2: func(agent core.Agent) { c := agent.GetCharacter() c.AddStat(stats.Stamina, 20) }, 4: func(agent core.Agent) { }, 6: func(agent core.Agent) { c := agent.GetCharacter() c.AddStats(stats.Stats{ stats.AttackPower: 40, stats.RangedAttackPower: 40, }) }, }, })
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}
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 AnyStance = BattleStance | DefensiveStance | BerserkerStance )
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
// Enrage Auras
BerserkerRageAura *core.Aura
BloodrageAura *core.Aura
EnrageAura *core.Aura
LastAMTick time.Duration
BattleShout *WarriorSpell
BattleStanceSpells []*WarriorSpell
DefensiveStanceSpells []*WarriorSpell
BerserkerStanceSpells []*WarriorSpell
Stances []*WarriorSpell
BattleStance *WarriorSpell
DefensiveStance *WarriorSpell
BerserkerStance *WarriorSpell
Bloodrage *WarriorSpell
BerserkerRage *WarriorSpell
Bloodthirst *WarriorSpell
DeathWish *WarriorSpell
DemoralizingShout *WarriorSpell
Execute *WarriorSpell
MortalStrike *WarriorSpell
Overpower *WarriorSpell
Rend *WarriorSpell
Revenge *WarriorSpell
ShieldBlock *WarriorSpell
ShieldSlam *WarriorSpell
Slam *WarriorSpell
SunderArmor *WarriorSpell
Devastate *WarriorSpell
ThunderClap *WarriorSpell
Whirlwind *WarriorSpell
DeepWounds *WarriorSpell
ConcussionBlow *WarriorSpell
Hamstring *WarriorSpell
HeroicStrike *WarriorSpell
HeroicStrikeQueue *WarriorSpell
Cleave *WarriorSpell
CleaveQueue *WarriorSpell
BattleStanceAura *core.Aura
DefensiveStanceAura *core.Aura
BerserkerStanceAura *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) 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 ¶
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 {
QueueDelay int32
StanceSnapshot bool
Stance proto.WarriorStance
}
type WarriorSpell ¶
type WarriorSpell struct {
*core.Spell
StanceMask Stance
// contains filtered or unexported fields
}
func (*WarriorSpell) CanCast ¶
func (ws *WarriorSpell) CanCast(sim *core.Simulation, target *core.Unit) bool
func (*WarriorSpell) GetStanceMask ¶
func (ws *WarriorSpell) GetStanceMask() Stance
Returns the StanceMask accounting for a possible override
func (*WarriorSpell) IsReady ¶
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
- pummel.go
- recklessness.go
- rend.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.