knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

R build status

warlockr

The goal of warlockr is to collect useful functions for Warlocks in WoW Classic. Furthermore it should only have minimal package dependencies. Right now this is mostly about simulating the DPS. The starting point was this Reddit post by u/natehax.

Installation

Install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("cphaarmeyer/warlockr")

Example

There are two main uses of the DPS simulation:

But first we set up the simulation with our current stats.

library(warlockr)
my_stats <- with_buffs(list(
  int = 267,
  sp = 512 + 63, # shadow spell damage
  crit = 7,
  hit = 10,
  mp5 = 0
),
consumables = c("gae", "eosp", "bwo")
)

The compute_statweights function simulates the DPS in the neighborhood of your current stats. Then it evaluates the impact of every stat and scales such that spell power has weight 1.

my_weights <- compute_statweights(my_stats, trinkets = "toep", seed = 42)
t(my_weights)

To use the compare_equip function we need a list of our current items. If your just want a quick comparison see compare_items.

my_equip <- list(
  head = list(int = 16, sp = 32),
  neck = list(int = 5, sp = 27, crit = 1),
  shoulders = list(int = 13, sp = 23),
  back = list(int = 10, sp = 23, hit = 1),
  chest = list(int = 13, sp = 27, hit = 2),
  wrist = list(int = 12, sp = 21, hit = 1),
  hands = list(int = 12, sp = 43),
  waist = list(int = 8, sp = 25, crit = 1),
  legs = list(int = 6, sp = 37, hit = 1),
  feet = list(int = 16, sp = 19, hit = 1),
  finger1 = list(int = 12, sp = 21, hit = 1),
  finger2 = list(sp = 14, crit = 1, hit = 1),
  trinket1 = "toep",
  trinket2 = list(sp = 44, hit = 2),
  weapon = list(int = 29, sp = 84, crit = 2),
  wand = list(sp = 18)
)

Next we need a list of which items to change.

my_changes <- list(
  "Zandalarian Hero Charm" =
    list(trinket1 = "zhc"),
  "Briarwood Reed" =
    list(trinket1 = list(sp = 29)),
  "Doomcaller's Robes" =
    list(chest = list(int = 17, sp = 41, crit = 1)),
  "Fel Infused Leggings" =
    list(legs = list(sp = 64)),
  "Boots of Epiphany" =
    list(feet = list(int = 19, sp = 34)),
  "Robes + Leggings + Boots" = list(
    chest = list(int = 17, sp = 41, crit = 1),
    legs = list(sp = 64),
    feet = list(int = 19, sp = 34)
  ),
  "Robes + Leggings + Boots - Setbonus" = list(
    chest = list(int = 17, sp = 41, crit = 1 - 2),
    legs = list(sp = 64),
    feet = list(int = 19, sp = 34)
  )
)

Now we can simulate.

df <- compare_equip(my_stats, my_equip, my_changes, seed = 561)
df[order(-df$dps), ]

If you want to know what impact world buffs have, simulate again.

my_stats <- add_buff(my_stats, "ony")
weights_ony <- compute_statweights(my_stats, trinkets = "toep", seed = 42)
t(weights_ony)
df_ony <- compare_equip(my_stats, my_equip, my_changes, seed = 561)
df_ony[order(-df_ony$dps), ]

This can help setting your priorities right. Note that this is only about the DPS and ignores survivability. You might want to trade small a amount of DPS for stamina.



cphaarmeyer/warlockr documentation built on April 1, 2021, 12:31 a.m.