Skip to content

Commit

Permalink
add warrior Defender's Resolve, fix Shaman Flurry / Earthfury Resolve…
Browse files Browse the repository at this point in the history
…, add a few more items
  • Loading branch information
kayla-glick committed Jul 10, 2024
1 parent c1e222d commit 6895a8b
Show file tree
Hide file tree
Showing 14 changed files with 250 additions and 82 deletions.
Binary file modified assets/database/db.bin
Binary file not shown.
6 changes: 5 additions & 1 deletion assets/database/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -5225,6 +5225,8 @@
{"id":19165,"name":"Flarecore Leggings","icon":"inv_pants_06","type":9,"armorType":1,"requiresLevel":60,"stats":[0,0,21,0,0,43,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0],"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":70,"phase":1,"quality":4,"expansion":1,"sources":[{"crafted":{"profession":11,"spellId":23667}}]},
{"id":19167,"name":"Blackfury","icon":"inv_spear_08","type":13,"weaponType":6,"handType":4,"requiresLevel":60,"stats":[35,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0],"weaponDamageMin":105,"weaponDamageMax":158,"weaponSpeed":2.1,"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":66,"phase":1,"quality":4,"expansion":1,"sources":[{"crafted":{"profession":2,"spellId":23639}}]},
{"id":19168,"name":"Blackguard","icon":"inv_sword_39","type":13,"weaponType":9,"handType":2,"requiresLevel":60,"stats":[0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponDamageMin":65,"weaponDamageMax":121,"weaponSpeed":1.8,"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":70,"phase":1,"quality":4,"expansion":1,"sources":[{"crafted":{"profession":2,"spellId":23652}}]},
{"id":19169,"name":"Nightfall","icon":"inv_axe_12","type":13,"weaponType":1,"handType":4,"requiresLevel":60,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponDamageMin":187,"weaponDamageMax":282,"weaponSpeed":3.5,"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":70,"phase":1,"quality":4,"expansion":1,"sources":[{"crafted":{"profession":2,"spellId":23653}}]},
{"id":19170,"name":"Ebon Hand","icon":"inv_hammer_19","type":13,"weaponType":4,"handType":2,"requiresLevel":60,"stats":[0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0],"weaponDamageMin":90,"weaponDamageMax":168,"weaponSpeed":2.5,"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":70,"phase":1,"quality":4,"expansion":1,"sources":[{"crafted":{"profession":2,"spellId":23650}}]},
{"id":19287,"name":"Darkmoon Card: Heroism","icon":"inv_misc_ticket_tarot_heroism_01","type":12,"requiresLevel":60,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":66,"phase":1,"quality":4,"unique":true,"sources":[{"quest":{"id":7928,"name":"Darkmoon Warlords Deck"}}]},
{"id":19288,"name":"Darkmoon Card: Blue Dragon","icon":"inv_misc_ticket_tarot_bluedragon_01","type":12,"requiresLevel":60,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":66,"phase":1,"quality":4,"unique":true,"sources":[{"quest":{"id":7907,"name":"Darkmoon Beast Deck"}}]},
{"id":19289,"name":"Darkmoon Card: Maelstrom","icon":"inv_misc_ticket_tarot_maelstrom_01","type":12,"requiresLevel":60,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"weaponSkills":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ilvl":66,"phase":1,"quality":4,"unique":true,"sources":[{"quest":{"id":7929,"name":"Darkmoon Elementals Deck"}}]},
Expand Down Expand Up @@ -9546,8 +9548,8 @@
{"effectId":63,"spellId":13538,"name":"Enchant Chest - Lesser Absorption","type":5,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":66,"spellId":7457,"name":"Enchant Bracer - Minor Stamina","type":6,"stats":[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":66,"spellId":7863,"name":"Enchant Boots - Minor Stamina","type":10,"stats":[0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":241,"spellId":13503,"name":"Enchant Weapon - Lesser Striking","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":241,"spellId":7745,"name":"Enchant 2H Weapon - Minor Impact","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":241,"spellId":13503,"name":"Enchant Weapon - Lesser Striking","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":242,"spellId":7748,"name":"Enchant Chest - Lesser Health","type":5,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":243,"spellId":7766,"name":"Enchant Bracer - Minor Spirit","type":6,"stats":[0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2},
{"effectId":246,"spellId":7776,"name":"Enchant Chest - Lesser Mana","type":5,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2},
Expand Down Expand Up @@ -13620,7 +13622,9 @@
{"id":23636,"name":"Dark Iron Helm","icon":"inv_helmet_22","requiresLevel":60},
{"id":23637,"name":"Dark Iron Gauntlets","icon":"inv_gauntlets_22","requiresLevel":60},
{"id":23639,"name":"Blackfury","icon":"inv_spear_08","requiresLevel":60},
{"id":23650,"name":"Ebon Hand","icon":"inv_hammer_19","requiresLevel":60},
{"id":23652,"name":"Blackguard","icon":"inv_sword_39","requiresLevel":60},
{"id":23653,"name":"Nightfall","icon":"inv_axe_12","requiresLevel":60},
{"id":23663,"name":"Mantle of the Timbermaw","icon":"inv_shoulder_19","requiresLevel":59},
{"id":23664,"name":"Argent Boots","icon":"inv_boots_cloth_03","requiresLevel":53},
{"id":23665,"name":"Argent Shoulders","icon":"inv_shoulder_13","requiresLevel":59},
Expand Down
Binary file modified assets/database/leftover_db.bin
Binary file not shown.
2 changes: 1 addition & 1 deletion assets/database/leftover_db.json
Original file line number Diff line number Diff line change
Expand Up @@ -1554,8 +1554,8 @@
{"effectId":929,"itemId":16217,"spellId":20069,"name":"Enchant Shield - Greater Stamina","type":13,"enchantType":2,"stats":[0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":930,"spellId":13947,"name":"Enchant Gloves - Riding Skill","type":7,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2},
{"effectId":931,"spellId":13948,"name":"Enchant Gloves - Minor Haste","type":7,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":943,"spellId":13529,"name":"Enchant 2H Weapon - Lesser Impact","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":943,"spellId":13693,"name":"Enchant Weapon - Striking","type":13,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":943,"spellId":13529,"name":"Enchant 2H Weapon - Lesser Impact","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":963,"spellId":13937,"name":"Enchant 2H Weapon - Greater Impact","type":13,"enchantType":1,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":1},
{"effectId":1483,"itemId":11622,"spellId":15340,"name":"Lesser Arcanum of Rumination","type":1,"extraTypes":[9],"enchantType":3,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,150,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2},
{"effectId":1503,"itemId":11642,"spellId":15389,"name":"Lesser Arcanum of Constitution","type":1,"extraTypes":[9],"enchantType":3,"stats":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0],"quality":2},
Expand Down
175 changes: 143 additions & 32 deletions sim/common/vanilla/item_effects.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package vanilla

import (
"fmt"
"time"

"github.com/wowsims/sod/sim/common/itemhelpers"
Expand Down Expand Up @@ -34,32 +35,37 @@ const (
LinkensSwordOfMastery = 11902
SearingNeedle = 12531
PipsSkinner = 12709
ArcaniteChampion = 12790
SerpentSlicer = 13035
SealOfTheDawn = 13209
JoonhosMercy = 17054
ThrashBlade = 17705
SatyrsLash = 17752
MarkOfTheChosen = 17774
Thunderfury = 19019
EbonHand = 19170
DarkmoonCardHeroism = 19287
DarkmoonCardBlueDragon = 19288
DarkmoonCardMaelstrom = 19289
Nightfall = 19169
RuneOfTheDawn = 19812
ScarabBrooch = 21625
MarkOfTheChampionPhys = 23206
MarkOfTheChampionSpell = 23207
SulfurasHandOfRagnaros = 227683 // 17182
SulfuronHammer = 227684 // 17193
TemperedBlackAmnesty = 227832 // 19166
EbonFist = 227842 // 19170
ReavingNightfall = 227843 // 19169
EbonFist = 227842
ReavingNightfall = 227843
BurstOfKnowledge = 227972
Ironfoe = 227991 // 11684
FiendishMachete = 228056 // 18310
RefinedArcaniteChampion = 228125
TalismanOfEphemeralPower = 228255 // 18820
GutgoreRipper = 228267 // 17071
EssenceOfThePureFlame = 228293 // 18815
PerditionsBlade = 228296 // 18816
Typhoon = 228347 // 18542
EskhandarsLeftClaw = 228349 // 18202
EskhandarsRightClaw = 228350 // 18203
BlazefuryMedallion = 228354 // 17111
Expand All @@ -85,6 +91,11 @@ func init() {
// Weapons
///////////////////////////////////////////////////////////////////////////

// https://www.wowhead.com/classic/spell=16916/strength-of-the-champion
// Chance on hit: Heal self for 270 to 450 and Increases Strength by 120 for 30 sec.
// TODO: Proc rate assumed and needs testing
itemhelpers.CreateWeaponProcAura(ArcaniteChampion, "Arcanite Champion", 1.0, strengthOfTheChampionAura)

// https://www.wowhead.com/classic/item=228606/blackblade-of-shahram
// Chance on hit: Summons the infernal spirit of Shahram.
// Summons an NPC "Shahram" who has an equal chance to cast one of 6 spells:
Expand Down Expand Up @@ -322,6 +333,11 @@ func init() {
// TODO: Proc rate assumed and needs testing
itemhelpers.CreateWeaponProcDamage(EbonFist, "Ebon Fist", 1.0, 18211, core.SpellSchoolShadow, 125, 150, 0, core.DefenseTypeMagic)

// https://www.wowhead.com/classic/item=19170/ebon-hand
// Chance on hit: Sends a shadowy bolt at the enemy causing 125 to 275 Shadow damage.
// TODO: Proc rate assumed and needs testing
itemhelpers.CreateWeaponProcDamage(EbonHand, "Ebon Hand", 1.0, 18211, core.SpellSchoolShadow, 125, 150, 0, core.DefenseTypeMagic)

// https://www.wowhead.com/classic/item=228397/empyrean-demolisher
// Chance on hit: Increases your attack speed by 20% for 10 sec.
itemhelpers.CreateWeaponProcAura(EmpyreanDemolisher, "Empyrean Demolisher", 1.0, func(character *core.Character) *core.Aura {
Expand Down Expand Up @@ -658,6 +674,11 @@ func init() {

itemhelpers.CreateWeaponProcDamage(Nightblade, "Nightblade", 1.0, 18211, core.SpellSchoolShadow, 125, 150, 0, core.DefenseTypeMagic)

// https://www.wowhead.com/classic/item=19169/nightfall
core.NewItemEffect(Nightfall, func(agent core.Agent) {
makeNightfallProc(agent.GetCharacter(), "Nightfall")
})

itemhelpers.CreateWeaponProcDamage(PendulumOfDoom, "Pendulum of Doom", 0.5, 10373, core.SpellSchoolPhysical, 250, 100, 0, core.DefenseTypeMelee)

core.NewItemEffect(PipsSkinner, func(agent core.Agent) {
Expand Down Expand Up @@ -731,47 +752,45 @@ func init() {
})
})

// https://www.wowhead.com/classic/item=227843/reaving-nightfall
// Chance on hit: Spell damage taken by target increased by 15% for 5 sec.
core.NewItemEffect(ReavingNightfall, func(agent core.Agent) {
// https://www.wowhead.com/classic/item=228125/refined-arcanite-champion
// Chance on hit: Heal self for 270 to 450 and Increases Strength by 120 for 30 sec.
// Chance on hit: Increases damage done by 30 and attack speed by 10% for 15 sec.
// TODO: Proc rate assumed and needs testing
core.NewItemEffect(RefinedArcaniteChampion, func(agent core.Agent) {
character := agent.GetCharacter()

procAuras := character.NewEnemyAuraArray(func(target *core.Unit, _ int32) *core.Aura {
return target.GetOrRegisterAura(core.Aura{
Label: "Spell Vulnerability (Nightfall)",
ActionID: core.ActionID{SpellID: 23605},
Duration: time.Second * 5,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexArcane] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFire] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFrost] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexHoly] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexNature] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexShadow] *= 1.15
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexArcane] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFire] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFrost] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexHoly] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexNature] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexShadow] /= 1.15
},
})
strengthAura := strengthOfTheChampionAura(character)
enrageAura := enrageAura446327(character)
procMask := character.GetProcMaskForItem(RefinedArcaniteChampion)

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Refined Arcanite Champion (Strength)",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: procMask,
PPM: 1, // Estimated based on data from WoW Armaments Discord
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
strengthAura.Activate(sim)
},
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Nightfall Trigger",
Name: "Refined Arcanite Champion (Enrage)",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
PPM: 2,
ProcMask: procMask,
PPM: 1, // Estimated based on data from WoW Armaments Discord
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
procAuras.Get(result.Target).Activate(sim)
enrageAura.Activate(sim)
},
})
})

// https://www.wowhead.com/classic/item=227843/reaving-nightfall
core.NewItemEffect(ReavingNightfall, func(agent core.Agent) {
makeNightfallProc(agent.GetCharacter(), "Reaving Nightfall")
})

itemhelpers.CreateWeaponProcDamage(SatyrsLash, "Satyr's Lash", 1.0, 18205, core.SpellSchoolShadow, 55, 30, 0, core.DefenseTypeMagic)

// TODO Searing Needle adds an "Apply Aura: Mod Damage Done (Fire): 10" aura to the /target/, buffing it; not currently modelled
Expand Down Expand Up @@ -1112,7 +1131,7 @@ func init() {
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
PPM: 1, // TODO: Armaments Discord didn't hvae any data on Sulfuron Hammer
PPM: 1, // TODO: Armaments Discord didn't have any data on Sulfuron Hammer
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
fireballSpell.Cast(sim, result.Target)
},
Expand Down Expand Up @@ -1275,6 +1294,23 @@ func init() {
})
})

// https://www.wowhead.com/classic/item=228347/typhoon
// Chance on hit: Grants an extra attack on your next swing.
// TODO: Proc rate assumed and needs testing
core.NewItemEffect(Typhoon, func(agent core.Agent) {
character := agent.GetCharacter()
core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: "Typhoon Trigger",
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
PPM: 1.0,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
character.AutoAttacks.ExtraMHAttack(sim, 1, core.ActionID{SpellID: 461985})
},
})
})

// https://www.wowhead.com/classic/item=13183/venomspitter
// Chance on hit: Poisons target for 7 Nature damage every 2 sec for 30 sec.
// TODO: Proc rate assumed and needs testing
Expand Down Expand Up @@ -1687,3 +1723,78 @@ func init() {

core.AddEffectsToTest = true
}

// https://www.wowhead.com/classic/spell=446327/enrage
// Used by:
// - https://www.wowhead.com/classic/item=220569/blistering-ragehammer and
// - https://www.wowhead.com/classic/item=228125/refined-arcanite-champion
func enrageAura446327(character *core.Character) *core.Aura {
return character.GetOrRegisterAura(core.Aura{
ActionID: core.ActionID{SpellID: 446327},
Label: "Enrage (446327)",
Duration: time.Second * 15,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
character.PseudoStats.BonusDamage += 30
character.MultiplyAttackSpeed(sim, 1.10)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
character.PseudoStats.BonusDamage -= 30
character.MultiplyAttackSpeed(sim, 1/1.10)
},
})
}

func strengthOfTheChampionAura(character *core.Character) *core.Aura {
actionID := core.ActionID{SpellID: 16916}
healthMetrics := character.NewHealthMetrics(actionID)
return character.GetOrRegisterAura(core.Aura{
Label: "Strength of the Champion",
ActionID: actionID,
Duration: time.Second * 10,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
character.GainHealth(sim, sim.Roll(270, 450), healthMetrics)
character.AddStatDynamic(sim, stats.Strength, 120)
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
character.AddStatDynamic(sim, stats.Strength, -120)
},
})
}

// Chance on hit: Spell damage taken by target increased by 15% for 5 sec.
func makeNightfallProc(character *core.Character, itemName string) {
procAuras := character.NewEnemyAuraArray(func(target *core.Unit, _ int32) *core.Aura {
return target.GetOrRegisterAura(core.Aura{
Label: fmt.Sprintf("Spell Vulnerability (%s)", itemName),
ActionID: core.ActionID{SpellID: 23605},
Duration: time.Second * 5,
OnGain: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexArcane] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFire] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFrost] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexHoly] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexNature] *= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexShadow] *= 1.15
},
OnExpire: func(aura *core.Aura, sim *core.Simulation) {
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexArcane] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFire] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexFrost] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexHoly] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexNature] /= 1.15
aura.Unit.PseudoStats.SchoolBonusDamageTaken[stats.SchoolIndexShadow] /= 1.15
},
})
})

core.MakeProcTriggerAura(&character.Unit, core.ProcTrigger{
Name: fmt.Sprintf("%s Trigger", itemName),
Callback: core.CallbackOnSpellHitDealt,
Outcome: core.OutcomeLanded,
ProcMask: core.ProcMaskMelee,
PPM: 2,
Handler: func(sim *core.Simulation, spell *core.Spell, result *core.SpellResult) {
procAuras.Get(result.Target).Activate(sim)
},
})
}
Loading

0 comments on commit 6895a8b

Please sign in to comment.