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

DK [Alpha] Add Defaults and Tests #98

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
17 changes: 13 additions & 4 deletions sim/core/database_load.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ func init() {
WITH_DB = true

simDB := &proto.SimDatabase{
Items: make([]*proto.SimItem, len(db.Items)),
Enchants: make([]*proto.SimEnchant, len(db.Enchants)),
Gems: make([]*proto.SimGem, len(db.Gems)),
ReforgeStats: make([]*proto.ReforgeStat, len(db.ReforgeStats)),
Items: make([]*proto.SimItem, len(db.Items)),
Enchants: make([]*proto.SimEnchant, len(db.Enchants)),
Gems: make([]*proto.SimGem, len(db.Gems)),
ReforgeStats: make([]*proto.ReforgeStat, len(db.ReforgeStats)),
RandomSuffixes: make([]*proto.ItemRandomSuffix, len(db.RandomSuffixes)),
}

for i, item := range db.Items {
Expand All @@ -39,6 +40,14 @@ func init() {
}
}

for i, suffix := range db.RandomSuffixes {
simDB.RandomSuffixes[i] = &proto.ItemRandomSuffix{
Id: suffix.Id,
Name: suffix.Name,
Stats: suffix.Stats,
}
}

for i, enchant := range db.Enchants {
simDB.Enchants[i] = &proto.SimEnchant{
EffectId: enchant.EffectId,
Expand Down
67 changes: 0 additions & 67 deletions sim/death_knight/_blood_boil.go

This file was deleted.

81 changes: 0 additions & 81 deletions sim/death_knight/_ghoul_frenzy.go

This file was deleted.

74 changes: 74 additions & 0 deletions sim/death_knight/blood_boil.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package death_knight

import (
"github.com/wowsims/cata/sim/core"
)

var BloodBoilActionID = core.ActionID{SpellID: 48721}

func (dk *DeathKnight) registerBloodBoilSpell() {
rpMetric := dk.NewRunicPowerMetrics(BloodBoilActionID)
dk.RegisterSpell(core.SpellConfig{
ActionID: BloodBoilActionID,
Flags: core.SpellFlagAPL,
SpellSchool: core.SpellSchoolShadow,
ProcMask: core.ProcMaskSpellDamage,
ClassSpellMask: DeathKnightSpellBloodBoil,

RuneCost: core.RuneCostOptions{
BloodRuneCost: 1,
},
Cast: core.CastConfig{
DefaultCast: core.Cast{
GCD: core.GCDDefault,
},
},

DamageMultiplierAdditive: 1,
DamageMultiplier: 1,
CritMultiplier: dk.DefaultMeleeCritMultiplier(),
ThreatMultiplier: 1.0,

ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
results := make([]*core.SpellResult, sim.GetNumTargets())
anyHit := false
for idx, aoeTarget := range sim.Encounter.TargetUnits {
baseDamage := dk.ClassBaseScaling*0.31700000167 + 0.08*spell.MeleeAttackPower()
baseDamage *= core.TernaryFloat64(dk.DiseasesAreActive(aoeTarget), 1.5, 1.0)
baseDamage *= sim.Encounter.AOECapMultiplier()

results[idx] = spell.CalcDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
anyHit = anyHit || results[idx].Landed()
}

if anyHit {
dk.AddRunicPower(sim, 10, rpMetric)
}

for _, result := range results {
spell.DealDamage(sim, result)
}
},
})
}

// func (dk *DeathKnight) registerDrwBloodBoilSpell() {
// dk.RuneWeapon.BloodBoil = dk.RuneWeapon.RegisterSpell(core.SpellConfig{
// ActionID: BloodBoilActionID,
// SpellSchool: core.SpellSchoolShadow,
// ProcMask: core.ProcMaskSpellDamage,

// DamageMultiplier: dk.bloodyStrikesBonus(BloodyStrikesBB),
// CritMultiplier: dk.bonusCritMultiplier(dk.Talents.MightOfMograine),
// ThreatMultiplier: 1,

// ApplyEffects: func(sim *core.Simulation, target *core.Unit, spell *core.Spell) {
// for _, aoeTarget := range sim.Encounter.TargetUnits {
// baseDamage := (sim.Roll(180, 220) + 0.06*dk.RuneWeapon.getImpurityBonus(spell)) * core.TernaryFloat64(dk.DrwDiseasesAreActive(aoeTarget), 1.5, 1.0)
// baseDamage *= sim.Encounter.AOECapMultiplier()

// spell.CalcAndDealDamage(sim, aoeTarget, baseDamage, spell.OutcomeMagicHitAndCrit)
// }
// },
// })
// }
1 change: 1 addition & 0 deletions sim/death_knight/death_knight.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func (dk *DeathKnight) Initialize() {
dk.registerHowlingBlastSpell()
dk.registerPillarOfFrostSpell()
dk.registerPestilenceSpell()
dk.registerBloodBoilSpell()
}

func (dk *DeathKnight) Reset(sim *core.Simulation) {
Expand Down
Loading
Loading