Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rogue Level 60 Poison Implementation #1096

Merged
merged 20 commits into from
Nov 23, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/database/db.bin
Binary file not shown.
7 changes: 4 additions & 3 deletions assets/database/db.json
Original file line number Diff line number Diff line change
Expand Up @@ -10671,8 +10671,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 All @@ -10698,8 +10698,8 @@
{"effectId":1893,"spellId":20028,"name":"Enchant Chest - Major 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,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2},
{"effectId":1894,"spellId":20029,"name":"Enchant Weapon - Icy Chill","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":2},
{"effectId":1896,"spellId":20030,"name":"Enchant 2H Weapon - Superior 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":2},
{"effectId":1897,"spellId":20031,"name":"Enchant Weapon - Superior 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":2},
{"effectId":1897,"spellId":13695,"name":"Enchant 2H Weapon - 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":1897,"spellId":20031,"name":"Enchant Weapon - Superior 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":2},
{"effectId":1898,"spellId":20032,"name":"Enchant Weapon - Lifestealing","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":3},
{"effectId":1899,"spellId":20033,"name":"Enchant Weapon - Unholy Weapon","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":2},
{"effectId":1900,"spellId":20034,"name":"Enchant Weapon - Crusader","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":2},
Expand Down Expand Up @@ -12629,7 +12629,6 @@
{"id":11314,"name":"Fire Nova Totem","icon":"spell_fire_sealoffire","rank":4,"requiresLevel":42},
{"id":11315,"name":"Fire Nova Totem","icon":"spell_fire_sealoffire","rank":5,"requiresLevel":52},
{"id":11340,"name":"Instant Poison VI","icon":"ability_poisons","rank":6,"requiresLevel":60},
{"id":11356,"name":"Deadly Poison IV","icon":"ability_rogue_dualweild","rank":4,"requiresLevel":54},
{"id":11366,"name":"Pyroblast","icon":"spell_fire_fireball02","rank":1,"hasBuff":true},
{"id":11367,"name":"Critical Mass","icon":"spell_nature_wispheal","rank":2},
{"id":11368,"name":"Critical Mass","icon":"spell_nature_wispheal","rank":3},
Expand Down Expand Up @@ -14847,6 +14846,7 @@
{"id":25315,"name":"Renew","icon":"spell_holy_renew","rank":10,"requiresLevel":60,"hasBuff":true},
{"id":25316,"name":"Prayer of Healing","icon":"spell_holy_prayerofhealing02","rank":5,"requiresLevel":60},
{"id":25345,"name":"Arcane Missiles","icon":"spell_nature_starfall","rank":8,"requiresLevel":56},
{"id":25351,"name":"Deadly Poison V","icon":"ability_rogue_dualweild","rank":5,"requiresLevel":60},
{"id":25357,"name":"Healing Wave","icon":"spell_nature_magicimmunity","rank":10,"requiresLevel":60},
{"id":25359,"name":"Grace of Air Totem","icon":"spell_nature_invisibilitytotem","rank":3,"requiresLevel":60},
{"id":25361,"name":"Strength of Earth Totem","icon":"spell_nature_earthbindtotem","rank":5,"requiresLevel":60},
Expand Down Expand Up @@ -15460,6 +15460,7 @@
{"id":439124,"name":"Golden Scale Cuirass","icon":"inv_chest_chain_06","requiresLevel":35},
{"id":439126,"name":"Golden Scale Coif","icon":"inv_helmet_36","requiresLevel":33},
{"id":439132,"name":"Golden Scale Leggings","icon":"inv_pants_04","requiresLevel":29},
{"id":439500,"name":"Sebacious Poison","icon":"ability_creature_poison_06","requiresLevel":60},
{"id":440247,"name":"S03 - Tuning and Overrides Passive - Priest","icon":"trade_engineering","requiresLevel":1},
{"id":440488,"name":"Shockwave","icon":"ability_warrior_shockwave","requiresLevel":1,"hasBuff":true},
{"id":440492,"name":"Engrave Cloak - Fresh Meat","icon":"inv_misc_cape_20","requiresLevel":1},
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 @@ -1585,8 +1585,8 @@
{"effectId":1893,"spellId":20028,"name":"Enchant Chest - Major 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,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"quality":2},
{"effectId":1894,"spellId":20029,"name":"Enchant Weapon - Icy Chill","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":2},
{"effectId":1896,"spellId":20030,"name":"Enchant 2H Weapon - Superior 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":2},
{"effectId":1897,"spellId":13695,"name":"Enchant 2H Weapon - 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":1897,"spellId":20031,"name":"Enchant Weapon - Superior 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":2},
{"effectId":1897,"spellId":13695,"name":"Enchant 2H Weapon - 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":1898,"spellId":20032,"name":"Enchant Weapon - Lifestealing","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":3},
{"effectId":1899,"spellId":20033,"name":"Enchant Weapon - Unholy Weapon","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":2},
{"effectId":1900,"spellId":20034,"name":"Enchant Weapon - Crusader","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":2},
Expand Down
8 changes: 6 additions & 2 deletions proto/common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ enum MageScroll {
MageScrollFrostProtection = 5;
}

// NextIndex: 31
// NextIndex: 33
enum WeaponImbue {
// Weapon Oils
WeaponImbueUnknown = 0;
Expand Down Expand Up @@ -573,6 +573,8 @@ enum WeaponImbue {
WoundPoison = 25;
OccultPoison = 27;
SebaciousPoison = 28;
AtrophicPoison = 31;
NumbingPoison = 32;

// Shield Oil
ConductiveShieldCoating = 26;
Expand Down Expand Up @@ -759,7 +761,7 @@ message Consumes {
bool bogling_root = 19 [deprecated=true];
}

// NextIndex: 41
// NextIndex: 44
message Debuffs {
bool judgement_of_wisdom = 1;
bool judgement_of_light = 2;
Expand Down Expand Up @@ -794,10 +796,12 @@ message Debuffs {

TristateEffect demoralizing_roar = 14;
TristateEffect demoralizing_shout = 15;
bool atrophic_poison = 42;

TristateEffect thunder_clap = 16;
bool waylay = 34;
bool thunderfury = 40;
bool numbing_poison = 43;

bool insect_swarm = 17;
bool scorpid_sting = 18;
Expand Down
31 changes: 29 additions & 2 deletions sim/core/debuffs.go
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,10 @@ func applyDebuffEffects(target *Unit, targetIdx int, debuffs *proto.Debuffs, rai
if debuffs.DemoralizingShout != proto.TristateEffect_TristateEffectMissing {
MakePermanent(DemoralizingShoutAura(target, 0, GetTristateValueInt32(debuffs.DemoralizingShout, 0, 5), level))
}
if debuffs.AtrophicPoison{
MakePermanent(AtrophicPoisonAura(target))
}

if debuffs.HuntersMark != proto.TristateEffect_TristateEffectMissing {
MakePermanent(HuntersMarkAura(target, GetTristateValueInt32(debuffs.HuntersMark, 0, 5), level))
}
Expand All @@ -247,6 +251,9 @@ func applyDebuffEffects(target *Unit, targetIdx int, debuffs *proto.Debuffs, rai
if debuffs.Thunderfury {
MakePermanent(ThunderfuryASAura(target, level))
}
if debuffs.NumbingPoison {
MakePermanent(NumbingPoisonAura(target))
}

// Miss
if debuffs.InsectSwarm && targetIdx == 0 {
Expand Down Expand Up @@ -563,8 +570,8 @@ func OccultPoisonDebuffAura(target *Unit, playerLevel int32) *Aura {
}

aura := target.GetOrRegisterAura(Aura{
Label: "Occult Poison I",
ActionID: ActionID{SpellID: 462286},
Label: "Occult Poison II",
ActionID: ActionID{SpellID: 1214170},
Duration: time.Second * 12,
MaxStacks: 5,
OnStacksChange: func(aura *Aura, sim *Simulation, oldStacks int32, newStacks int32) {
Expand Down Expand Up @@ -1268,6 +1275,16 @@ func DemoralizingShoutAura(target *Unit, boomingVoicePts int32, impDemoShoutPts
return aura
}

func AtrophicPoisonAura(target *Unit) *Aura {
aura := target.GetOrRegisterAura(Aura{
Label: "Atrophic Poison",
ActionID: ActionID{SpellID: 439473},
Duration: time.Second * 15,
})
apReductionEffect(aura, 205)
return aura
}

func VindicationAura(target *Unit, points int32, _ int32) *Aura {
aura := target.GetOrRegisterAura(Aura{
Label: "Vindication",
Expand Down Expand Up @@ -1320,6 +1337,16 @@ func ThunderfuryASAura(target *Unit, _ int32) *Aura {
return aura
}

func NumbingPoisonAura(target *Unit) *Aura {
aura := target.GetOrRegisterAura(Aura{
Label: "Numbing Poison",
ActionID: ActionID{SpellID: 439472},
Duration: time.Second * 15,
})
AtkSpeedReductionEffect(aura, 1.2)
return aura
}

func AtkSpeedReductionEffect(aura *Aura, speedMultiplier float64) *ExclusiveEffect {
return aura.NewExclusiveEffect("AtkSpdReduction", false, ExclusiveEffect{
Priority: speedMultiplier,
Expand Down
18 changes: 14 additions & 4 deletions sim/rogue/envenom.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func (rogue *Rogue) registerEnvenom() {
}

baseAbilityDamage := rogue.baseRuneAbilityDamage()

consumed := int32(0)
sanguinerarogue marked this conversation as resolved.
Show resolved Hide resolved
cutToTheChase := rogue.HasRune(proto.RogueRune_RuneCutToTheChase)

rogue.EnvenomAura = rogue.RegisterAura(core.Aura{
Expand Down Expand Up @@ -50,7 +50,12 @@ func (rogue *Rogue) registerEnvenom() {
},
},
ExtraCastCondition: func(sim *core.Simulation, target *core.Unit) bool {
return rogue.ComboPoints() > 0 && rogue.deadlyPoisonTick.Dot(target).IsActive()
if rogue.usingOccult {
return rogue.ComboPoints() > 0 && rogue.occultPoisonTick.Dot(target).IsActive()
} else if rogue.usingDeadly {
return rogue.ComboPoints() > 0 && rogue.deadlyPoisonTick.Dot(target).IsActive()
}
return false
},

DamageMultiplier: rogue.getPoisonDamageMultiplier(),
Expand All @@ -67,10 +72,15 @@ func (rogue *Rogue) registerEnvenom() {
rogue.EnvenomAura.Duration = rogue.EnvenomDuration(rogue.ComboPoints())
rogue.EnvenomAura.Activate(sim)

dp := rogue.deadlyPoisonTick.Dot(target)
// - base damage is scaled by consumed doses (<= comboPoints)
// - apRatio is scaled of lowest of cp or dp (== comboPoints)
consumed := min(dp.GetStacks(), comboPoints)

if rogue.usingOccult {
consumed = min(rogue.occultPoisonTick.Dot(target).GetStacks(), comboPoints)
} else if rogue.usingDeadly {
consumed = min(rogue.deadlyPoisonTick.Dot(target).GetStacks(), comboPoints)
}

baseDamage := baseAbilityDamage*float64(consumed)*0.8 + 0.072*float64(consumed)*spell.MeleeAttackPower()

result := spell.CalcDamage(sim, target, baseDamage, spell.OutcomeMeleeSpecialHitAndCrit)
Expand Down
16 changes: 13 additions & 3 deletions sim/rogue/poisoned_knife.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func (rogue *Rogue) registerPoisonedKnife() {
poisonedKnifeMetrics := rogue.NewEnergyMetrics(core.ActionID{SpellID: 425012})
hasDeadlyBrew := rogue.HasRune(proto.RogueRune_RuneDeadlyBrew)
hasJustAFleshWound := rogue.HasRune(proto.RogueRune_RuneJustAFleshWound)
numStacks := 0.0
sanguinerarogue marked this conversation as resolved.
Show resolved Hide resolved

// Poisoned Knife /might/ scale with BonusWeaponDamage, if it's using https://www.wowhead.com/classic/spell=425013/poisoned-knife
rogue.PoisonedKnife = rogue.RegisterSpell(core.SpellConfig{
Expand Down Expand Up @@ -58,9 +59,14 @@ func (rogue *Rogue) registerPoisonedKnife() {

if result.Landed() {
rogue.AddComboPoints(sim, 1, target, spell.ComboPointMetrics())
dp := rogue.deadlyPoisonTick.Dot(target)
numDPStacks := float64(dp.GetStacks() * 5)
rogue.AddEnergy(sim, numDPStacks, poisonedKnifeMetrics)

if rogue.usingOccult {
numStacks = float64(rogue.occultPoisonTick.Dot(target).GetStacks())
} else if rogue.usingDeadly {
numStacks = float64(rogue.deadlyPoisonTick.Dot(target).GetStacks())
}

rogue.AddEnergy(sim, numStacks * 5, poisonedKnifeMetrics)

// 100% application of OH poison (except for 1%? It can resist extremely rarely)
switch rogue.Consumes.OffHandImbue {
Expand All @@ -70,6 +76,10 @@ func (rogue *Rogue) registerPoisonedKnife() {
rogue.DeadlyPoison[ShivProc].Cast(sim, target)
case proto.WeaponImbue_WoundPoison:
rogue.WoundPoison[ShivProc].Cast(sim, target)
case proto.WeaponImbue_OccultPoison:
rogue.OccultPoison[ShivProc].Cast(sim, target)
case proto.WeaponImbue_SebaciousPoison:
rogue.SebaciousPoison[ShivProc].Cast(sim, target)
// Add new alternative poisons as they are implemented
default:
if hasDeadlyBrew {
Expand Down
Loading
Loading