Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterMage()
- type Mage
- func (mage *Mage) AddPartyBuffs(partyBuffs *proto.PartyBuffs)
- func (mage *Mage) AddRaidBuffs(raidBuffs *proto.RaidBuffs)
- func (mage *Mage) ApplyTalents()
- func (mage *Mage) GetCharacter() *core.Character
- func (mage *Mage) GetMage() *Mage
- func (mage *Mage) Initialize()
- func (mage *Mage) OnEncounterStart(sim *core.Simulation)
- func (mage *Mage) Reset(sim *core.Simulation)
- type MageAgent
Constants ¶
const ( DDBC_FireVulnerability int = iota DDBC_WintersChill DDBC_FirePower DDBC_Total )
The slots on the mage's attack table against a target for what raises only its own attacks there: one per FromCaster parse, and Fire Power.
const ( FireSpellMaxTimeUntilResult = 750 * time.Millisecond MageSpellFlagNone int64 = 0 MageSpellArcaneBlast int64 = 1 << iota MageSpellArcaneExplosion MageSpellArcanePower MageSpellArcaneMissilesCast MageSpellArcaneMissilesTick MageSpellArcaneWrath MageSpellBlastWave MageSpellBlizzard MageSpellColdSnap MageSpellConeOfCold MageSpellEvocation MageSpellFireBlast MageSpellFireball MageSpellFireballDot MageSpellFlamestrike MageSpellFlamestrikeDot MageSpellFrostArmor MageSpellIceArmor MageSpellFrostbolt MageSpellFrostNova MageSpellIceBarrier MageSpellIceBlock MageSpellIceLance MageSpellIgnite MageSpellMageArmor MageSpellManaGems MageSpellPresenceOfMind MageSpellPyroblast MageSpellPyroblastDot MageSpellScorch MageSpellManaGem MageSpellCombustion MageSpellFrostfireBolt MageSpellFrostfireBoltDot MageSpellLast MageSpellsAll = MageSpellLast<<1 - 1 MageSpellFrost = MageSpellFrostbolt | MageSpellBlizzard | MageSpellFrostNova | MageSpellConeOfCold | MageSpellIceLance MageSpellFire = MageSpellFireball | MageSpellCombustion | MageSpellFireBlast | MageSpellFlamestrike | MageSpellIgnite | MageSpellPyroblast | MageSpellScorch MageSpellsAllDamaging = MageSpellArcaneBlast | MageSpellArcaneExplosion | MageSpellArcaneMissilesTick | MageSpellArcaneWrath | MageSpellBlizzard | MageSpellBlastWave | MageSpellConeOfCold | MageSpellFireBlast | MageSpellFireball | MageSpellFireballDot | MageSpellFlamestrike | MageSpellFlamestrikeDot | MageSpellFrostbolt | MageSpellFrostfireBolt | MageSpellFrostfireBoltDot | MageSpellFrostNova | MageSpellIceLance | MageSpellPyroblast | MageSpellPyroblastDot | MageSpellScorch MageSpellInstantCast = MageSpellArcaneMissilesCast | MageSpellArcaneMissilesTick | MageSpellFireBlast | MageSpellArcaneExplosion | MageSpellPyroblastDot | MageSpellFireballDot | MageSpellCombustion | MageSpellConeOfCold | MageSpellIceLance | MageSpellManaGems | MageSpellPresenceOfMind MageSpellExtraResult = MageSpellArcaneMissilesTick | MageSpellBlizzard )
Variables ¶
var ItemSetArcanistRegalia = core.NewItemSet(core.ItemSet{ Name: "Arcanist Regalia", ID: 201, Bonuses: map[int32]core.ApplySetBonus{ 3: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() spelldata.ParseEffects(&mage.Character, setBonusAura, arcanistSpellDamage) }, 5: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() spelldata.ParseEffects(&mage.Character, setBonusAura, arcanistPiercing) }, 8: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() spelldata.ParseEffects(&mage.Character, setBonusAura, arcanistThreat) }, }, })
TODO: items 16795-16802 have no ItemSparse rows in the game files, so the set cannot be worn yet.
var ItemSetEnigmaVestments = core.NewItemSet(core.ItemSet{ Name: "Enigma Vestments", ID: 503, Bonuses: map[int32]core.ApplySetBonus{ 5: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() answer := mage.RegisterAura(spelldata.AuraConfig(enigmaAnswer)) spelldata.ParseEffects(&mage.Character, answer, enigmaAnswer) trigger := spelldata.ProcTrigger(&mage.Character, enigmaResistProc, func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) { answer.Activate(sim) answer.AddStack(sim) }) trigger.Name = "Enigma Vestments - 5PC" trigger.Callback = core.CallbackOnSpellHitDealt trigger.Outcome = core.OutcomeMiss trigger.RequireDamageDealt = false setBonusAura.AttachProcTrigger(trigger) }, }, })
(3) Set: a chance for Blizzard not to be interrupted, which the sim never does.
var ItemSetFrostfireRegalia = core.NewItemSet(core.ItemSet{ Name: "Frostfire Regalia", ID: 526, Slots: shared.TierThreeSlots, Bonuses: map[int32]core.ApplySetBonus{ 2: shared.ParsedSetBonus(frostfireEvocation), 6: func(agent core.Agent, setBonusAura *core.Aura) { character := agent.GetCharacter() taken := frostfireVulnDebuff.EffectN(1) var takenSchools []stats.SchoolIndex for school := core.SpellSchoolHoly; school <= core.SpellSchoolArcane; school <<= 1 { if taken.Misc&int32(school) != 0 { takenSchools = append(takenSchools, school.SchoolIndex()) } } debuffs := character.NewEnemyAuraArray(func(target *core.Unit) *core.Aura { aura := target.RegisterAura(spelldata.AuraConfig(frostfireVulnDebuff, spelldata.Label(frostfireVulnDebuff.Name+character.Label))) aura.ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) { for _, i := range takenSchools { target.PseudoStats.SchoolBonusSpellDamage[i] += taken.BaseValue() } }).ApplyOnExpire(func(_ *core.Aura, _ *core.Simulation) { for _, i := range takenSchools { target.PseudoStats.SchoolBonusSpellDamage[i] -= taken.BaseValue() } }) consume := spelldata.ProcTrigger(character, frostfireVulnDebuff, func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) { aura.Deactivate(sim) }) consume.Name = "Elemental Vulnerability - Consume" + character.Label consume.TriggerImmediately = true return aura.AttachProcTrigger(consume) }) trigger := spelldata.ProcTrigger(character, frostfireVulnerability, func(sim *core.Simulation, _ *core.Spell, result *core.SpellResult) { debuffs.Get(result.Target).Activate(sim) }) trigger.Name = "Frostfire Regalia - 6PC" trigger.Callback = core.CallbackOnSpellHitDealt trigger.Outcome = core.OutcomeLanded trigger.RequireDamageDealt = false trigger.RequireDamageComponent = true setBonusAura.AttachProcTrigger(trigger) }, 8: func(agent core.Agent, setBonusAura *core.Aura) { character := agent.GetCharacter() buff := character.RegisterAura(spelldata.AuraConfig(frostfireNotThereBuff)) threatEffect := frostfireNotThereBuff.EffectN(1) var schools []stats.SchoolIndex for school := core.SpellSchoolHoly; school <= core.SpellSchoolArcane; school <<= 1 { if threatEffect.Misc&int32(school) != 0 { schools = append(schools, school.SchoolIndex()) } } var held [stats.SchoolLen]float64 buff.ApplyOnGain(func(_ *core.Aura, _ *core.Simulation) { for _, i := range schools { held[i] = character.PseudoStats.SchoolThreatMultiplier[i] character.PseudoStats.SchoolThreatMultiplier[i] *= core.MultiplierFromPercent(threatEffect.BaseValue()) } }).ApplyOnExpire(func(_ *core.Aura, _ *core.Simulation) { for _, i := range schools { character.PseudoStats.SchoolThreatMultiplier[i] = held[i] } }) consume := spelldata.ProcTrigger(character, frostfireNotThereBuff, func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) { buff.Deactivate(sim) }) consume.Name = "Not There - Consume" consume.Callback = core.CallbackOnSpellHitDealt consume.Outcome = core.OutcomeLanded consume.RequireDamageDealt = false consume.RequireDamageComponent = true consume.TriggerImmediately = true buff.AttachProcTrigger(consume) trigger := spelldata.ProcTrigger(character, frostfireNotThere, func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) { buff.Activate(sim) }) trigger.Name = "Frostfire Regalia - 8PC" trigger.Callback = core.CallbackOnSpellHitDealt trigger.Outcome = core.OutcomeLanded trigger.RequireDamageDealt = false trigger.RequireDamageComponent = true setBonusAura.AttachProcTrigger(trigger) }, }, })
Tier 3
(4) Set: Adaptive Warding raises a resistance when Mage Armor is struck by a spell, which a boss fight does not test.
var ItemSetIllusionistsAttire = core.NewItemSet(core.ItemSet{ Name: "Illusionist's Attire", ID: 482, Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() spelldata.ParseEffects(&mage.Character, setBonusAura, illusionistSpellDamage) }, 5: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() spelldata.ParseEffects(&mage.Character, setBonusAura, illusionistFlamestrike) }, }, })
(3) Set: Arcane Intellect and Arcane Brilliance cost less, and the sim casts neither.
var ItemSetManaflareRegalia = core.NewItemSet(core.ItemSet{ ID: 2098, Name: "Manaflare Regalia", Slots: []proto.ItemSlot{ proto.ItemSlot_ItemSlotShoulder, proto.ItemSlot_ItemSlotHands, proto.ItemSlot_ItemSlotLegs, proto.ItemSlot_ItemSlotFeet, }, Bonuses: map[int32]core.ApplySetBonus{ 2: shared.ParsedSetBonus(manaflareHit), 3: shared.ParsedSetBonus(manaflareCounterspell), 4: shared.ParsedSetBonus(manaflareElementals), 5: func(agent core.Agent, setBonusAura *core.Aura) { agent.(MageAgent).GetMage().manaflareAura = setBonusAura }, }, })
Tier 1
The ItemSet row lists six pieces, but the game files ship only the shoulders, hands, legs and feet, so the 5-piece bonus cannot be worn yet and no test wears it.
var ItemSetNetherwindRegalia = core.NewItemSet(core.ItemSet{ Name: "Netherwind Regalia", ID: 210, Bonuses: map[int32]core.ApplySetBonus{ 8: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() instant := netherwindFocusBuff.EffectN(1).ClassFlags buff := mage.RegisterAura(spelldata.AuraConfig(netherwindFocusBuff)) spelldata.ParseEffects(&mage.Character, buff, netherwindFocusBuff) buff.AttachProcTrigger(core.ProcTrigger{ Name: "Netherwind Focus - Consume", ClassFlags: instant, Callback: core.CallbackOnCastComplete, TriggerImmediately: true, Handler: func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) { buff.Deactivate(sim) }, }) trigger := spelldata.ProcTrigger(&mage.Character, netherwindFocusProc, func(sim *core.Simulation, _ *core.Spell, _ *core.SpellResult) { buff.Activate(sim) }) trigger.Name = "Netherwind Regalia - 8PC" trigger.ExtraCondition = func(_ *core.Simulation, spell *core.Spell, _ *core.SpellResult) bool { return spellData.ArcaneMissiles.Contains(spell) || spellData.Fireball.Contains(spell) || spellData.Frostbolt.Contains(spell) } setBonusAura.AttachProcTrigger(trigger) }, }, })
TODO: items 16818 and 16912-16918 have no ItemSparse rows in the game files, so the set cannot be worn yet.
(5) Set: a larger radius on Arcane Explosion, Flamestrike and Blizzard, which a single target does not test.
var ItemSetZanzilsConcentration = core.NewItemSet(core.ItemSet{ Name: "Zanzil's Concentration", ID: 462, Bonuses: map[int32]core.ApplySetBonus{ 2: func(agent core.Agent, setBonusAura *core.Aura) { mage := agent.(MageAgent).GetMage() spelldata.ParseEffects(&mage.Character, setBonusAura, zanzilSpellHit) spelldata.ParseEffects(&mage.Character, setBonusAura, zanzilSpellDamage) }, }, })
TODO: items 19893 and 19905 have no ItemSparse rows in the game files, so the set cannot be worn yet.
var TalentTreeSizes = [3]int{18, 17, 18}
Functions ¶
func RegisterMage ¶
func RegisterMage()
Types ¶
type Mage ¶
type Mage struct {
core.Character
ClassSpellScaling float64
Talents *proto.MageTalents
Options *proto.MageOptions
ArcaneChargesAura *core.Aura
ClearCasting *core.Aura
MissileBarrageAura *core.Aura
PresenceOfMindAura *core.Aura
ArcanePowerAura *core.Aura
FingersOfFrostAura *core.Aura
ImprovedScorchAuras core.AuraArray
WintersChillAuras core.AuraArray
Ignite *core.Spell
// contains filtered or unexported fields
}
func (*Mage) AddPartyBuffs ¶
func (mage *Mage) AddPartyBuffs(partyBuffs *proto.PartyBuffs)
func (*Mage) AddRaidBuffs ¶
func (*Mage) ApplyTalents ¶
func (mage *Mage) ApplyTalents()
func (*Mage) GetCharacter ¶
func (*Mage) Initialize ¶
func (mage *Mage) Initialize()
func (*Mage) OnEncounterStart ¶
func (mage *Mage) OnEncounterStart(sim *core.Simulation)
func (*Mage) Reset ¶
func (mage *Mage) Reset(sim *core.Simulation)
Source Files
¶
- arcane_blast.go
- arcane_charge.go
- arcane_explosion.go
- arcane_missiles.go
- arcane_power.go
- arcane_wrath.go
- armors.go
- blast_wave.go
- blink.go
- blizzard.go
- cold_snap.go
- combustion.go
- cone_of_cold.go
- defensives.go
- evocation.go
- fire_blast.go
- fireball.go
- flamestrike.go
- frost_nova.go
- frostbolt.go
- frostfire_bolt.go
- ice_barrier.go
- ice_block.go
- ice_lance.go
- item_weapons.go
- items.go
- mage.go
- mana_gems.go
- presence_of_mind.go
- pyroblast.go
- scorch.go
- spell_data_auto_gen.go
- talents.go
- talents_arcane.go
- talents_fire.go
- talents_frost.go