Documentation
¶
Index ¶
- Variables
- func AbsorbBreakDamage(absorb *spelldata.Spell) (int32, bool)
- func AbsorbLinkedDamage(absorb *spelldata.Spell) []int32
- func AuraDurationUnsupported(e *spelldata.Effect) []string
- func CarriedProcUnsupported(row *spelldata.Spell) []string
- func ConsumableDamages(row *spelldata.Spell) bool
- func ConsumableRestores(row *spelldata.Spell) (power, survival bool)
- func ConsumableSpells(row *spelldata.Spell) []*spelldata.Spell
- func ConsumableUnsupported(row *spelldata.Spell) []string
- func DamageCloudOf(row *spelldata.Spell) (cloud, damage *spelldata.Spell)
- func DamageConsumableUnsupported(s *spelldata.Spell) []string
- func EnemyDebuffAuras(character *core.Character, row *spelldata.Spell, duration time.Duration, ...) core.AuraArray
- func EnergizesABar(power dbcenums.PowerType) bool
- func FiredSpellHandler(character *core.Character, actionID core.ActionID, row *spelldata.Spell) core.ProcHandler
- func FiredSpellUnsupported(row *spelldata.Spell) []string
- func GainLeechHealth(sim *core.Simulation, character *core.Character, dealt float64, ...)
- func Generated() func()
- func GetOutcome(spell *core.Spell, outcome OutcomeType) core.OutcomeApplier
- func GrantsCrit(row *spelldata.Spell) bool
- func IsSetBonusProc(row *spelldata.Spell) bool
- func ItemVersusBonus(character *core.Character, itemID int32, kind proto.VersusEffectKind, ...) *core.VersusBonus
- func LandsOnTheUser(e *spelldata.Effect) bool
- func NewGuardianOnUse(itemID int32, summonID int32, creatures map[int32]GuardianCreature)
- func NewParsedItemSet(id int32, name string, slots []proto.ItemSlot, bonuses map[int32][]int32)
- func NewParsedProfessionItemSet(id int32, name string, profession proto.Profession, slots []proto.ItemSlot, ...)
- func NewProcDamageEffect(config ProcDamageEffect)
- func NewProcStatBonusEffect(config ProcStatBonusEffect)
- func NewProcStatBonusEffectWithDamageProc(config ProcStatBonusEffect, damage DamageEffect)
- func NewProcStatBonusEffectWithVariants(config ProcStatBonusEffect, variants []ItemVariant)
- func NewSimpleStatActive(itemID int32)
- func NewSpellDataAbsorbOnUse(itemID int32)
- func NewSpellDataAbsorbProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataAuraOnUse(itemID int32)
- func NewSpellDataAuraProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataDamageOnUse(itemID int32)
- func NewSpellDataDamageProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataDebuffProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataEnergizeOnUse(itemID int32)
- func NewSpellDataEnergizeProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataEquipAura(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataExplosive(itemID int32)
- func NewSpellDataExtraAttackProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataHealOnUse(itemID int32)
- func NewSpellDataHealProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataOnUseConsumable(itemID int32)
- func NewSpellDataPeriodicDamageOnUse(itemID int32)
- func NewSpellDataProc(cfg SpellDataProc, variants []ItemVariant)
- func NewSpellDataSpeedOnUse(itemID int32)
- func NewSpellDataStatConsumable(itemID int32)
- func NewSpellDataTemporaryEnchant(itemID int32, piercing SchoolPiercing, equipSpellIDs ...int32)
- func NewStackingStatBonusCD(config StackingStatBonusCD)
- func NewStackingStatBonusEffectWithVariants(config ProcStatBonusEffect, variants []ItemVariant)
- func OnUseCast(character *core.Character, itemEffect *proto.ItemEffect) core.CastConfig
- func OneAtATimeCategory(itemEffect *proto.ItemEffect) int32
- func ParsedSetBonus(rows ...*spelldata.Spell) core.ApplySetBonus
- func RegisterItemGuardian(itemID int32, summon *spelldata.Spell, creature GuardianCreature)
- func RegisterShoot(character *core.Character)
- func RollCastTimePPM(sim *core.Simulation, character *core.Character, row *spelldata.Spell, ...) bool
- func SetBonusUnsupported(row *spelldata.Spell) []string
- func SpellCastPPMTrigger(character *core.Character, row *spelldata.Spell, handler core.ProcHandler) core.ProcTrigger
- func SpendsItsCharges(row *spelldata.Spell) bool
- func StatConsumableUnsupported(row *spelldata.Spell) []string
- func SummonGuardians(sim *core.Simulation, guardians []*Guardian, target *core.Unit)
- func TemporaryEnchantEquipSpellProcs(row *spelldata.Spell) bool
- func WearerAuraTriggers(row *spelldata.Spell) []*spelldata.Effect
- type CustomProcHandler
- type DamageEffect
- type ExtraSpellInfo
- type Guardian
- func (guardian *Guardian) CreatureStats() core.CreatureStats
- func (guardian *Guardian) ExecuteCustomRotation(sim *core.Simulation)
- func (guardian *Guardian) GetPet() *core.Pet
- func (guardian *Guardian) Initialize()
- func (guardian *Guardian) OnEncounterStart(_ *core.Simulation)
- func (guardian *Guardian) Reset(_ *core.Simulation)
- type GuardianCast
- type GuardianCreature
- type GuardianGlance
- type GuardianSwing
- type ItemVariant
- type OutcomeType
- type ProcDamageEffect
- type ProcStatBonusEffect
- type SchoolPiercing
- type SpellDataProc
- type StackingStatBonusCD
Constants ¶
This section is empty.
Variables ¶
var DamageProcExtras = map[int32]func(character *core.Character, config *core.SpellConfig){}
What an item adds to the spell its NewSpellDataDamageProc proc casts where the rows leave it to a script, by item id, given the spell's config before it registers: Pendulum of Doom's execute bonus, Sul'thraze the Lasher's delayed Shadow Lash. Hand-written code fills it from init, so the item's effect stays generated and the generator still lists the item's other effects no code simulates.
var EightPieceSlots = []proto.ItemSlot{ proto.ItemSlot_ItemSlotHead, proto.ItemSlot_ItemSlotShoulder, proto.ItemSlot_ItemSlotChest, proto.ItemSlot_ItemSlotWrist, proto.ItemSlot_ItemSlotHands, proto.ItemSlot_ItemSlotWaist, proto.ItemSlot_ItemSlotLegs, proto.ItemSlot_ItemSlotFeet, }
The eight armor slots of a crafted or dungeon set.
var EnchantProcTriggerExtras = map[int32]func(character *core.Character, trigger *core.ProcTrigger){}
The same for an enchant's generated proc, by enchant id, given the wearer: Insight rolls once per cast.
var ProcBuffDurationExtras = map[int32]time.Duration{}
How much longer than its rows state the buff of an item's generated proc lasts, by item id: Felstriker's buff counts its 3 s from the spell batch its proc would land in. Hand-written code fills it from init.
var ProcTriggerExtras = map[int32]func(trigger *core.ProcTrigger){}
What an item changes on the listener its generated proc builds, by item id, before the handler is set: Felstriker's buff goes up in the instant of the hit that procs it. Hand-written code fills it from init, so the item's effect stays generated.
var TierThreeSlots = slices.Concat(EightPieceSlots, []proto.ItemSlot{proto.ItemSlot_ItemSlotFinger1, proto.ItemSlot_ItemSlotFinger2})
A Naxxramas tier 3 set: the eight armor pieces and the ring, all worn only by the set's class.
Functions ¶
func AbsorbBreakDamage ¶
The spell dealing the damage the absorb's shield deals when it breaks early, where one is listed.
func AbsorbLinkedDamage ¶
The spells dealing damage that an absorb's row triggers or its tooltip references. The shield deals only the one AbsorbBreakDamage names; any other is damage the absorb shape does not model.
func AuraDurationUnsupported ¶
Why the aura of the effect cannot be put up: its spell states no duration.
func CarriedProcUnsupported ¶
Why the proc a stat buff carries cannot be built, or nil where it can: the buff's row fires a spell (FiredSpell) that heals the wearer, a heal over time among them only with a period and a duration to tick over, on a buff that spends no charges and a trigger the listener can hear.
func ConsumableDamages ¶
Whether a consumable's spell deals damage to enemies: a hit or a damage over time of its own, or a cloud's.
func ConsumableRestores ¶
Whether the parts of a consumable's spell the builder models restore power, and whether they heal or absorb.
func ConsumableSpells ¶
The consumable's on-use spell and each spell it triggers on the user: food puts its Well Fed buff up that way. A periodic trigger with a value hands its amount to every effect of the spell it triggers: Nutritious Food states Well Fed's Strength that way.
func ConsumableUnsupported ¶
Why the consumable builders cannot run the spell, or nil where they can. A spell that damages enemies has to be one the damage builders run (DamageConsumableUnsupported), with nothing beside it on the user. Otherwise every effect has to land on the user and be a heal, an absorb, a gain of mana, rage or energy, damage to the user, or an aura the parser attaches, and the spell has to work outside a seated rest.
func DamageCloudOf ¶
The cloud a consumable's missile leaves where it lands, and the damage over time the cloud puts on the enemies inside it: the spell's E_TRIGGER_MISSILE fires a spell whose E_CREATE_AREATRIGGER is the cloud, and the damage is the first spell the cloud triggers that deals periodic damage (Caustic Smog Potion's 1252525 fires 1252526, which puts 1252543 on the enemies). Nil and Nil where the spell leaves no such cloud: Disorienting Smog Potion's cloud deals no damage.
func DamageConsumableUnsupported ¶
Why the damage builders cannot run the spell, or nil where they can. A cloud has to state how long it lasts, and its damage has to tick, land on an enemy and state Always Hit, since the cloud rolls no hit for it.
func EnemyDebuffAuras ¶
func EnemyDebuffAuras(character *core.Character, row *spelldata.Spell, duration time.Duration, effects []int32) core.AuraArray
The row's debuff on each enemy, carrying the effects at the given positions, for the duration given. The aura is the row's rather than the wearer's, so every character applying the row refreshes one debuff on the target, and the first to register it parses it. Each slow takes its exclusive category, attacks Thunder Clap's and casts Slow's, where only the strongest applies; every other effect applies to the target as the row states it, per stack. A row a raid debuff reads is that debuff's player copy instead, which bids in the raid debuff's category beside the raid's copy, or is the raid's copy where the raid's driver makes it the player's own, as Armor Shatter and Puncture Armor do when the player wields their weapon.
func EnergizesABar ¶
Whether the power type is one of the bars a gain fills: mana, rage or energy.
func FiredSpellHandler ¶
func FiredSpellHandler(character *core.Character, actionID core.ActionID, row *spelldata.Spell) core.ProcHandler
What the spell a proc row fires does, or nil where the wearer has no bar its gain fills. A cooldown change moves the whole category's timer, which is where a spell whose only recovery is its category's keeps its cooldown; the game files state a reduction as a negative time, Spark's 1306610 -100000.
func FiredSpellUnsupported ¶
Why the spell a proc row fires cannot be built, or nil where it can: the row states no effect beside its proc, and the spell it fires (FiredSpell) puts mana, rage or energy into the wearer's bar at once or changes the cooldown of one of the wearer's spell categories.
func GainLeechHealth ¶
func GainLeechHealth(sim *core.Simulation, character *core.Character, dealt float64, leech *spelldata.Effect, healthMetrics *core.ResourceMetrics)
Health for the damage a leech dealt, an E_HEALTH_LEECH's or an A_PERIODIC_LEECH's: its Amplitude share, times the caster's healing taken multiplier.
func Generated ¶
func Generated() func()
Marks the registrations that run until the returned function is called as the generated files': RegisterAllProcs and RegisterAllOnUseCds in sim/common/forever defer it on their first line. A class file's call to the same constructor is a hand-written effect: it registers with core on its own, uncomposed.
func GetOutcome ¶
func GetOutcome(spell *core.Spell, outcome OutcomeType) core.OutcomeApplier
func GrantsCrit ¶ added in v1.0.4
Whether the consumable's spells put a crit chance on the user, which counts under ElixirCrit for an elixir. The generator puts such elixirs into one group.
func IsSetBonusProc ¶
A row whose one effect triggers another spell off the row's own proc flags.
func ItemVersusBonus ¶
func ItemVersusBonus(character *core.Character, itemID int32, kind proto.VersusEffectKind, row *spelldata.Spell) *core.VersusBonus
The factor the row deals or restores against its targets, kept for the item on the stats sheet, or nil where the row states none.
func LandsOnTheUser ¶
The user, or the one friendly unit the spell is cast on, which in the sim is the user: a scroll states the latter.
func NewGuardianOnUse ¶ added in v1.0.6
func NewGuardianOnUse(itemID int32, summonID int32, creatures map[int32]GuardianCreature)
A use item whose spell summons a guardian; sim/common/forever/item_guardians_auto_gen.go registers every one the game files hold. It registers nothing while creatures has no entry for the summon's creature, so the item keeps only its stats until the creature is measured. The use casts on the item's own cooldown and the category cooldown it shares, and puts the guardians up against the wearer's target.
func NewParsedItemSet ¶
A set gen_db registers from the game files, each piece count's bonus parsed from its rows. A set written by hand under the same id keeps it off.
func NewParsedProfessionItemSet ¶
func NewParsedProfessionItemSet(id int32, name string, profession proto.Profession, slots []proto.ItemSlot, bonuses map[int32][]int32)
A generated set whose ItemSet row gates the bonuses on a profession (RequiredSkill).
func NewProcDamageEffect ¶
func NewProcDamageEffect(config ProcDamageEffect)
func NewProcStatBonusEffect ¶
func NewProcStatBonusEffect(config ProcStatBonusEffect)
func NewProcStatBonusEffectWithDamageProc ¶
func NewProcStatBonusEffectWithDamageProc(config ProcStatBonusEffect, damage DamageEffect)
func NewProcStatBonusEffectWithVariants ¶
func NewProcStatBonusEffectWithVariants(config ProcStatBonusEffect, variants []ItemVariant)
func NewSimpleStatActive ¶
func NewSimpleStatActive(itemID int32)
func NewSpellDataAbsorbOnUse ¶
func NewSpellDataAbsorbOnUse(itemID int32)
An on-use item whose spell shields the wearer with an A_SCHOOL_ABSORB aura. The stats the item's effect entry states beside the absorb are the shield's for as long as it holds: a used-up absorb removes its whole aura (EV-0100), so Blazing Emblem's 33 Fire resistance goes with its 465 Fire absorb.
func NewSpellDataAbsorbProc ¶
func NewSpellDataAbsorbProc(cfg SpellDataProc, variants []ItemVariant)
An item or enchant proc whose spell shields the wearer with an A_SCHOOL_ABSORB aura. BuffSpellID names that spell.
func NewSpellDataAuraOnUse ¶
func NewSpellDataAuraOnUse(itemID int32)
An on-use item whose spell applies auras: the wearer's buff, its pets' and the debuff on the enemy it is used on, for the row's duration. One that lowers the wearer's threat is never used on its own: the sim gains nothing from less threat and a tank loses by it, so only a timing or an APL action that names it uses it.
func NewSpellDataAuraProc ¶
func NewSpellDataAuraProc(cfg SpellDataProc, variants []ItemVariant)
An item or enchant proc whose buff applies auras: the wearer's, its pets' and the debuff on the unit the proc answers, for the buff's duration.
func NewSpellDataDamageOnUse ¶
func NewSpellDataDamageOnUse(itemID int32)
An on-use item whose spell deals damage to its target: the direct damage its row rolls, the damage over time it applies, or both.
func NewSpellDataDamageProc ¶
func NewSpellDataDamageProc(cfg SpellDataProc, variants []ItemVariant)
An item or enchant proc whose "buff" is a damage spell: the game files apply no aura at all, it casts a spell that deals damage. BuffSpellID names that spell.
func NewSpellDataDebuffProc ¶
func NewSpellDataDebuffProc(cfg SpellDataProc, variants []ItemVariant)
An item or enchant proc whose spell puts a debuff on the enemy it lands on and does nothing else the sim models: Frostguard's Chilled 16927 slows its attacks, Annihilator's Armor Shatter 16928 takes its armor. BuffSpellID names the spell where it is not the trigger.
func NewSpellDataEnergizeOnUse ¶
func NewSpellDataEnergizeOnUse(itemID int32)
An on-use item whose spell restores the wearer's mana, rage or energy, at once or over time, on the item's cooldowns with the cast time and global cooldown the row states. Each aura the spell triggers on the wearer goes up with the gain (WearerAuraTriggers). A character without that bar does not register it. The cooldown manager uses it once the whole gain fits under the bar's maximum. In the areas the row's area bonus names, each gain takes its factor: Second Wind's 15604 doubles in Mountainous areas.
func NewSpellDataEnergizeProc ¶
func NewSpellDataEnergizeProc(cfg SpellDataProc, variants []ItemVariant)
An item or enchant proc whose trigger's row fires a spell that restores the wearer's mana, rage or energy, read off the trigger alone the way FiredSpellUnsupported reads it: Idol of Longevity 23004's 28847 refunds 28848's mana on each Healing Touch cast. A wearer without that bar registers no listener.
func NewSpellDataEquipAura ¶
func NewSpellDataEquipAura(cfg SpellDataProc, variants []ItemVariant)
An item or enchant whose equip spell applies auras: the row's auras on the wearer and on each summoned pet for as long as the item or the enchant is worn. An equip spell that only re-applies another aura on a period is read as that aura.
The generator emits no equip spell that states spell modifiers: each class registers its own through this constructor in its item files, ported or not, and an item whose modifier has no sim value stays in the missing effects list.
func NewSpellDataExplosive ¶
func NewSpellDataExplosive(itemID int32)
An explosive used from the bar: the damage its on-use spell deals, on the item's cooldown and the category cooldown every explosive shares, and the damage the spell deals to the thrower where the row states one. Only a character with the profession and skill the item requires can use it.
Throwing one leaves the melee swing timer running, though no row states Do Not Reset Combat Timers: the next swing lands on its old schedule after dynamite, copper bombs and iron grenades alike, and a swing due during the 1 sec cast lands in it (EV-0088).
Starting the cast drops the attack queued for the next swing, which can be queued again once the cast ends: dynamite, grenades and bombs. The instant sapper charge keeps it (EV-0088).
A bomb or grenade whose row's mechanic is stun is a stun as a whole: a stun-immune target, such as a raid boss, is immune to its damage too. Dynamite and sapper charges state no mechanic and hit it.
func NewSpellDataExtraAttackProc ¶
func NewSpellDataExtraAttackProc(cfg SpellDataProc, variants []ItemVariant)
An item proc whose spell grants the wearer extra attacks: Flurry Axe's 18797 and Thrash Blade's 21919 each grant one. Each is a main-hand swing tagged with the granting spell, so the metrics tell it from the swing that procced it.
func NewSpellDataHealOnUse ¶
func NewSpellDataHealOnUse(itemID int32)
An on-use item whose spell heals the wearer, at once or over time, and with the heal restores the resource its row's energize effect states: Major Recombobulator's 23064 restores mana too.
func NewSpellDataHealProc ¶
func NewSpellDataHealProc(cfg SpellDataProc, variants []ItemVariant)
An item or enchant proc whose "buff" heals the wearer: it casts an E_HEAL_PCT or E_HEAL spell, or one applying an A_PERIODIC_HEAL aura to the wearer. BuffSpellID names that spell.
func NewSpellDataOnUseConsumable ¶
func NewSpellDataOnUseConsumable(itemID int32)
A consumable whose on-use spell the potion builder runs on the user, or whose damage it deals to enemies (consumableDamageSpell), on the item's cooldown and the category it shares. A potion is a major cooldown only while the consumes pick it for an APL potion placeholder, the other potions are the rotation's; a conjured item (a healthstone, mana gem, rune or tea) is one only while it is the spec's chosen one; any other, such as the Flame Deflector's shield or the Scroll of Minor Evocation's mana, whenever the spec names it.
func NewSpellDataPeriodicDamageOnUse ¶
func NewSpellDataPeriodicDamageOnUse(itemID int32)
An on-use item whose spell keeps an A_PERIODIC_TRIGGER_SPELL aura on the wearer for the row's duration. Every period the aura casts the row it triggers, whose damage reaches every enemy in its area or cone: Cloak of Fire's 18364 casts 18374, 25 Fire to the enemies around the wearer, every 5 s for 15 s. The label carries the item, since two items may apply the same row.
func NewSpellDataProc ¶
func NewSpellDataProc(cfg SpellDataProc, variants []ItemVariant)
Registers the same effect once per item that carries it, the way the stat-bonus constructors do it.
func NewSpellDataSpeedOnUse ¶
func NewSpellDataSpeedOnUse(itemID int32)
An on-use item whose spell raises the wearer's melee, ranged or cast speed. Every speed the row states is on one aura, up for the row's duration.
func NewSpellDataStatConsumable ¶
func NewSpellDataStatConsumable(itemID int32)
A consumable whose on-use spell puts auras on the user that the parser attaches: an elixir, a flask, a scroll, food's Well Fed. Each spell that carries such auras, the on-use spell's own or one it triggers on the user, becomes an aura of its own.
A buff that outlasts the item's cooldown is up from the pull: for the whole iteration where the row persists through death, and for the row's duration otherwise. A scroll is up for the whole iteration too, and its stats count with the elixirs' (R-0054). A buff its cooldown outlasts is used in combat, on that cooldown.
func NewSpellDataTemporaryEnchant ¶
func NewSpellDataTemporaryEnchant(itemID int32, piercing SchoolPiercing, equipSpellIDs ...int32)
A temporary enchant consumable, applied to each hand core put its enchant on, in the main set or the item swap set. Its stats, speed percents and flat weapon damage are core's, on the item carrying the enchant. Each combat spell is cast off the hits of the weapons carrying the enchant at the chance its row states. The equip spells named are the enchant's that grant no stat of the enchant's own, such as Consecrated Sharpening Stone's 28893: their auras are parsed onto an aura per hand, since each weapon carries its own copy of the equip aura, and an aura bound to a matching weapon reaches that hand's attacks alone. An equip spell that procs, such as Scroll of Imbue Manablade's 1308913, is a listener built from its row instead. The piercing is a stat slot of the enchant that has no place in the stat array, held by the same per-hand aura.
func NewStackingStatBonusCD ¶
func NewStackingStatBonusCD(config StackingStatBonusCD)
Creates a new stacking stats bonus aura based on the configuration. If Bonus is not given, the ItemEffect of the item will be used to determine the correct values.
func NewStackingStatBonusEffectWithVariants ¶
func NewStackingStatBonusEffectWithVariants(config ProcStatBonusEffect, variants []ItemVariant)
func OnUseCast ¶
func OnUseCast(character *core.Character, itemEffect *proto.ItemEffect) core.CastConfig
The item effect's own cooldown and the category cooldown it shares, whatever the spell's row states.
func OneAtATimeCategory ¶
func OneAtATimeCategory(itemEffect *proto.ItemEffect) int32
The category a stat consumable is used one at a time with the others of, or 0: one whose cooldown lasts as long as each of the consumable's buffs, which are up from the pull. The Blasted Lands buffs 8410-8424 share category 103's 1 h, as long as each lasts. The generator makes the category an exclusive group.
func ParsedSetBonus ¶
func ParsedSetBonus(rows ...*spelldata.Spell) core.ApplySetBonus
A bonus whose rows the parse states whole, exposed to the APL under the first row's id. A row's spell modifiers name its class's spells by class flags, so on another class they reach nothing. A row whose one effect is a proc trigger fires its spell off the row's own listener instead.
func RegisterItemGuardian ¶ added in v1.0.6
func RegisterItemGuardian(itemID int32, summon *spelldata.Spell, creature GuardianCreature)
Builds the guardians an item summons with the item's owner, through core.NewItemPet: as many as the summon's row brings at once. Where more can be up than one summon brings, as when the summon rests less than its duration, each piece carrying one registers its own under its own name.
func RegisterShoot ¶
Shoot is a channel during which the wand fires one shot per wand speed, until something takes a shot's slot. A shot rolls the wand's damage in its school: no attack power, no spell power. It misses on the ranged weapon table, which wand skill sets and physical and ranged hit lower, so spell hit leaves it alone. It has no dodge, parry or block, and crits on the caster's spell crit, for 1.5 times like a spell.
func RollCastTimePPM ¶
func RollCastTimePPM(sim *core.Simulation, character *core.Character, row *spelldata.Spell, flags core.ClassFlags, castTime time.Duration) bool
Whether a cast that took castTime procs the row's procs per minute: the rate on that time, at least the global cooldown's 1.5 s, so an instant rolls 2.5% at 1 a minute and a 3 s cast 5%. The character's proc chance mods for flags raise it.
func SetBonusUnsupported ¶
Why a generated set cannot register the row, or nil where it can. A proc row registers when its listener and rate are ones an item's proc takes, and the spell it fires deals damage at once, fills the wearer's bar or puts auras on the wearer alone. Any other row is the parse's to state.
A proc row of a class family whose proc effect names none of the family's spells is refused too: the spells its tooltip names are not in the row, so its listener would hear every spell (Symbols of Unending Life's 26107 refunds on finishing moves that miss, Stormcaller's Garb's 26119 on three shaman spells).
func SpellCastPPMTrigger ¶
func SpellCastPPMTrigger(character *core.Character, row *spelldata.Spell, handler core.ProcHandler) core.ProcTrigger
A listener for the row's procs per minute on spell casts. A cast of a damaging or healing spell rolls once, and so does any other cast whose spell costs mana before cost modifiers and is no melee or ranged ability: a seal, a blessing, a totem, Judgement. Any other cast rolls nothing, on the global cooldown or off it, such as one that costs nothing or only rage or energy (EV-0144). The chance depends on the cast, so Chance(1) leaves core no roll of its own and the condition draws it.
func SpendsItsCharges ¶
Whether a buff on the wearer drops after its ProcCharges are spent, and its row names the hits that spend them. A row stating more than one stack as well is read as a stacking one, whose charges the aura cannot keep apart from its stacks.
func StatConsumableUnsupported ¶
Why the stat builder cannot put up the auras of the consumable's spells, or nil where it can: an aura the parser does not attach, other than the model's size, one whose amount the server rolls, and a spell that states no duration for its aura. The eating and drinking are left out, since they last only while seated.
func SummonGuardians ¶ added in v1.0.6
func SummonGuardians(sim *core.Simulation, guardians []*Guardian, target *core.Unit)
Puts up as many guardians as the summon's row brings against the target for the row's duration. A summon takes the guardians that are not up first, then the first ones. One that comes up beside its owner stands as far from the target as the owner does now; one already up stays where it is.
Types ¶
type CustomProcHandler ¶
type CustomProcHandler func(sim *core.Simulation, procAura *core.StatBuffAura)
type DamageEffect ¶
type DamageEffect struct {
SpellID int32
School core.SpellSchool
DefenseType core.DefenseType // From SpellCategories. Left unset, it is inferred from School and IsMelee.
MinDmg float64
MaxDmg float64
BonusCoefficient float64
IsMelee bool
ProcMask core.ProcMask
Outcome OutcomeType
Flags core.SpellFlag
// Set when the game files bar the damage spell from critting, which the sim has no way to know:
// it is a spell attribute, so only the database generator can see it.
CannotCrit bool
}
type ExtraSpellInfo ¶
type ExtraSpellInfo struct {
Spell *core.Spell
Trigger func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult)
}
type Guardian ¶ added in v1.0.6
func Guardians ¶ added in v1.0.6
The guardians the character owns for a summon's row, in the order it built them.
func (*Guardian) CreatureStats ¶ added in v1.0.10
func (guardian *Guardian) CreatureStats() core.CreatureStats
The creature numbers for the guardian's level, which its spells scale with.
func (*Guardian) ExecuteCustomRotation ¶ added in v1.0.6
func (guardian *Guardian) ExecuteCustomRotation(sim *core.Simulation)
A guardian casts its spell, a hardcast, only standing within its range, and walks in to its reach between casts. One with no spell only swings, so its rotation sleeps for as long as it can be up once it stands in melee range.
func (*Guardian) Initialize ¶ added in v1.0.6
func (guardian *Guardian) Initialize()
func (*Guardian) OnEncounterStart ¶ added in v1.0.6
func (guardian *Guardian) OnEncounterStart(_ *core.Simulation)
func (*Guardian) Reset ¶ added in v1.0.6
func (guardian *Guardian) Reset(_ *core.Simulation)
type GuardianCast ¶ added in v1.0.6
type GuardianCast struct {
FirstMax time.Duration
WaitMin, WaitMax time.Duration
FirstLabel, WaitLabel string
Config func(guardian *Guardian) core.SpellConfig
}
A spell the guardian casts on its target: the first within FirstMax of the summon, each next one a uniform wait of WaitMin to WaitMax after the last one's cast end. A hardcast holds the swing. The wait is drawn as the cast ends, before the cast's own rolls, and a cast that fails to start waits a fresh draw from then. Each draw goes under its label.
type GuardianCreature ¶ added in v1.0.6
type GuardianCreature struct {
Name string // The pet's name; with more than one up at once, numbered.
Level int32 // The creature's own level when it does not take its owner's; 0 takes the owner's.
Health float64 // Share of the creature health.
Armor float64 // Share of the creature armor.
Swing GuardianSwing // A zero Speed: the guardian never swings.
Cast *GuardianCast // The one spell the guardian casts between swings, or nil.
}
A creature an item or a set bonus summons as a guardian, as the logs measure it. The game files hold no creature row, only the summon's, which states the creature, how many come and for how long; so the creature's health, armor, swing and spells are stated as shares of the creature numbers for its level (core.CreatureStatsByLevel). The guardian takes nothing from its owner.
type GuardianGlance ¶ added in v1.0.10
Glancing blows that follow the target's level: a chance of 2% for each point of defense, 5 a level, the target has over Skill, and a glancing blow's share of a hit drawn uniformly from the range Damage gives for the target's level, the nearest level listed below it, or the lowest listed.
type GuardianSwing ¶ added in v1.0.6
type GuardianSwing struct {
Speed float64
Variance float64
Glance *GuardianGlance // Glancing blows as the logs read them, in place of the attack table's; nil keeps the table's.
}
A physical swing whose normal hit before armor is Share of Speed seconds of the creature dps, Variance either side.
type ItemVariant ¶
type OutcomeType ¶
type OutcomeType uint64
const ( OutcomeDefault = 0 OutcomeMeleeCanCrit OutcomeType = iota OutcomeMeleeNoCrit OutcomeSpellCanCrit OutcomeSpellNoCrit OutcomeSpellNoMissCanCrit OutcomeRangedCanCrit OutcomeRangedNoCrit OutcomeAlwaysHit )
type ProcDamageEffect ¶
type ProcDamageEffect struct {
ItemID int32
SpellID int32
EnchantID int32
Trigger core.ProcTrigger
TriggerDPM func(*core.Character) *core.DynamicProcManager
School core.SpellSchool
// From SpellCategories. Left unset, it is inferred from School and IsMelee.
DefenseType core.DefenseType
MinDmg float64
MaxDmg float64
BonusCoefficient float64
IsMelee bool
Flags core.SpellFlag
Outcome OutcomeType
// Set when the game files bar the damage spell from critting, which the sim has no way to know:
// it is a spell attribute, so only the database generator can see it.
CannotCrit bool
}
type ProcStatBonusEffect ¶
type ProcStatBonusEffect struct {
Name string
ItemID int32
EnchantID int32
MaxStacks int32
Callback core.AuraCallback
ProcMask core.ProcMask
Outcome core.HitOutcome
RequireDamageDealt bool
ClassSpellsOnly bool
// See core.ProcTrigger.
RequireDamageComponent bool
// The listener's Can Proc From Procs attribute. See core.ProcTrigger.
CanProcFromProcs bool
// A "Chance on hit" item effect or a combat enchant. See core.ProcTrigger. The generator
// reads it from the trigger type; a hand-written effect states it.
IsWeaponProc bool
// Carried through to the trigger. The generator sets SpellFlagSuppressWeaponProcs here when the
// listener's aura is marked Aura Is Weapon Proc.
SpellFlagsExclude core.SpellFlag
// What adds a stack while a stacking trinket's window is open. Derived from the container
// spell's own proc flags, which are not the ones that open the window.
// For example: Blackened Naaru Sliver opens on a melee hit
// and then stacks on every attack for the next 20s.
StackCallback core.AuraCallback
StackProcMask core.ProcMask
StackOutcome core.HitOutcome
// Any other custom proc conditions not covered by the above fields.
CustomProcCondition core.CustomStatBuffProcCondition
}
type SchoolPiercing ¶
type SchoolPiercing struct {
School stats.SchoolIndex
Amount float64
}
Target resistance a temporary enchant ignores on one school's spells.
type SpellDataProc ¶
type SpellDataProc struct {
// Filled per variant by NewSpellDataProc. An enchant, which has no variants, states its own.
Name string
ItemID int32
// Set for an enchant, which registers through the enchant registry rather than the item one.
EnchantID int32
// The spell the item effect names: the one carrying the proc flags, the chance and the ICD.
TriggerSpellID int32
// The buff the proc applies, where the game files make it a spell of its own. Zero where the
// trigger's own row is the buff.
BuffSpellID int32
// A "Chance on hit" item effect or a combat enchant. The game casts those off the hit itself
// without consulting a proc mask, so the row states no listener and the shape is stated here.
IsWeaponProc bool
// A rate option in place of the one the item's entry and the trigger's row give, for a rate priced on
// something neither states. It may reshape the listener: Blade of Eternal Darkness hears every landed
// harmful spell and prices the row's procs per minute on its cast's time, and Draconic Infused Emblem
// moves the row's cast listener to landed harmful spells.
Rate spelldata.ProcOpt
}
An item or enchant proc as the game files' own rows state it. What the listener hears, how often it fires and what its internal cooldown is come from the spell carrying the proc; how long the buff lasts and how it stacks come from the spell it applies; only the stats come from the item's effect entry, which is where the sim's item level scaling lives.
type StackingStatBonusCD ¶
type StackingStatBonusCD struct {
Name string
ID int32
CD time.Duration
Callback core.AuraCallback
ProcMask core.ProcMask
SpellFlags core.SpellFlag
Outcome core.HitOutcome
RequireDamageDealt bool
// See core.ProcTrigger.
RequireDamageComponent bool
// See core.ProcTrigger. The generator reads them off the stack proc's aura, which is always an
// Equip aura, so there is no weapon-proc counterpart here.
CanProcFromProcs bool
SpellFlagsExclude core.SpellFlag
// The stacks will only be granted as long as the trinket is active
TrinketLimitsDuration bool
}