Aldriana / ShadowCraft-Engine

Calculations backend for ShadowCraft, a WoW theorycraft project.
GNU Lesser General Public License v3.0
37 stars 22 forks source link

Customize EP list #77

Closed julienp closed 13 years ago

julienp commented 13 years ago

Added the ability to pass a list to get_ep listing the ep stats you want calculated. Class specific calculators can override the default list. Removed 'parry_exp' from rogue defaults.

Added ep for mh/oh_dodge_exp and mh/oh_parry_exp

You can change the ep calculation in the test scripts to ep_values = calculator.get_ep(['dodge_exp', 'mh_dodge_exp', 'oh_dodge_exp', 'parry_exp', 'mh_parry_exp', 'oh_parry_exp']) to see the results

Aldriana commented 13 years ago

I guess one other thing that might be nice is the ability to pick which stat has value 1 - that is, rogues usually set 1 AP = 1 EP, but that won't work for casters.

julienp commented 13 years ago

Forgot about that, fixed now. Couldn't think of a better name than normalize_ep_stat, but didn't want to leave it named 'ap'.

julienp commented 13 years ago

Somehow messed up something with git and it wont let me push the full fix, will need a couple minutes to figure it out.

julienp commented 13 years ago

All good now. Had to push --force, which I think is generally a bad idea, but I've no idea what went wrong with the first push.

Aldriana commented 13 years ago

Sorry for slacking on this - between the holidays + Cata launch I haven't had much time to look at this. Regardless: should normalize_ep_stat be only accessible via modifying the Calculator object, or should we allow it to be overridden in a get_ep call like we do for the stats to generate EP values for?

julienp commented 13 years ago

Functions that use the normalize_ep_stat can now have it passed in as an argument. Calculators still need to set the default to something useful for their class, so you don't have to override all the ep functions to provide the correct default value.