Skip to content

Commit

Permalink
6.1 Cleanup
Browse files Browse the repository at this point in the history
- Removed some of the dead weapon enchant code.
- Cleaned up restless blade modification code.
  • Loading branch information
Pathal committed Feb 21, 2015
1 parent 29318ca commit 057f913
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 36 deletions.
12 changes: 6 additions & 6 deletions scripts/combat.py
Expand Up @@ -57,14 +57,14 @@

# Set up a calcs object..
test_stats = stats.Stats(test_mh, test_oh, test_procs, test_gear_buffs,
agi=1957,
agi=3650,
stam=2426,
crit=794,
haste=645,
mastery=557,
crit=1039,
haste=1100,
mastery=1015,
readiness=0,
versatility=154,
multistrike=121,)
versatility=122,
multistrike=1034,)

# Initialize talents..
test_talents = talents.Talents('3111121', test_class, test_level)
Expand Down
4 changes: 2 additions & 2 deletions shadowcraft/calcs/__init__.py
Expand Up @@ -30,8 +30,8 @@ class DamageCalculator(object):
normalize_ep_stat = None

def __init__(self, stats, talents, glyphs, buffs, race, settings=None, level=100, target_level=None, char_class='rogue'):
self.WOW_BUILD_TARGET = '6.0.3' # should reflect the game patch being targetted
self.SHADOWCRAFT_BUILD = '1.088' # <1 for beta builds, 1.00 is GM, >1 for any bug fixes, reset for each warcraft patch
self.WOW_BUILD_TARGET = '6.1.0' # should reflect the game patch being targetted
self.SHADOWCRAFT_BUILD = '1.0' # <1 for beta builds, 1.00 is GM, >1 for any bug fixes, reset for each warcraft patch
self.tools = class_data.Util()
self.stats = stats
self.talents = talents
Expand Down
37 changes: 9 additions & 28 deletions shadowcraft/calcs/rogue/Aldriana/__init__.py
Expand Up @@ -631,7 +631,7 @@ def determine_stats(self, attack_counts_function):

#calculate weapon procs
weapon_enchants = set([])
for hand, enchant in [(x, y) for x in ('mh', 'oh') for y in ('dancing_steel', 'elemental_force', 'mark_of_the_frostwolf',
for hand, enchant in [(x, y) for x in ('mh', 'oh') for y in ('dancing_steel', 'mark_of_the_frostwolf',
'mark_of_the_shattered_hand', 'mark_of_the_thunderlord',
'mark_of_the_bleeding_hollow', 'mark_of_warsong')]:
proc = getattr(getattr(self.stats, hand), enchant)
Expand All @@ -645,7 +645,7 @@ def determine_stats(self, attack_counts_function):
active_procs_icd.append(proc)
else:
active_procs_no_icd.append(proc)
elif enchant in ('elemental_force', 'mark_of_the_shattered_hand'):
elif enchant in ('mark_of_the_shattered_hand', ):
damage_procs.append(proc)

static_proc_stats = {
Expand Down Expand Up @@ -884,7 +884,7 @@ def update_assassination_breakdown_with_modifiers(self, damage_breakdown, curren

for key in damage_breakdown:
damage_breakdown[key] *= 1 + multistrike_multiplier
if (key != 'Elemental Force') and ('sr_' not in key):
if ('sr_' not in key):
damage_breakdown[key] *= self.vendetta_mult
elif 'sr_' in key:
damage_breakdown[key] *= 1 + self.vendetta_multiplier
Expand Down Expand Up @@ -1551,39 +1551,20 @@ def combat_attack_counts(self, current_stats, ar=False, crit_rates=None):
def rb_actual_cds(self, attacks_per_second, base_cds, avg_rb_effect=10):
final_cds = {}
# If it's best to always use 5CP finishers as combat now, it should continue to be so, this is simpler and faster
offensive_finisher_rate = attacks_per_second['eviscerate'][5]
if 'death_from_above' in attacks_per_second:
offensive_finisher_rate += attacks_per_second['death_from_above']

#should never happen, catch error just in case
if offensive_finisher_rate != 0:
for cd_name in base_cds:
final_cds[cd_name] = base_cds[cd_name] * (1 - avg_rb_effect / (1. / offensive_finisher_rate + avg_rb_effect))
else:
final_cds[cd_name] = base_cds[cd_name]
for cd_name in base_cds:
final_cds[cd_name] = base_cds[cd_name] * self.rb_cd_modifier(attacks_per_second)
return final_cds

def rb_actual_cd(self, attacks_per_second, base_cd, avg_rb_effect=10):
final_cd = base_cd
# If it's best to always use 5CP finishers as combat now, it should continue to be so, this is simpler and faster
offensive_finisher_rate = attacks_per_second['eviscerate'][5]
if 'death_from_above' in attacks_per_second:
offensive_finisher_rate += attacks_per_second['death_from_above']

#should never happen, catch error just in case
if offensive_finisher_rate != 0:
return base_cd * (1 - avg_rb_effect / (1. / offensive_finisher_rate + avg_rb_effect))
return base_cd
return base_cd * self.rb_cd_modifier(attacks_per_second)

def rb_cd_modifier(self, attacks_per_second, avg_rb_effect=10):
# If it's best to always use 5CP finishers as combat now, it should continue to be so, this is simpler and faster
offensive_finisher_rate = attacks_per_second['eviscerate'][5]
if 'death_from_above' in attacks_per_second:
offensive_finisher_rate += attacks_per_second['death_from_above']

if offensive_finisher_rate != 0:
#should never happen, catch divide-by-zero error just in case
return (1 - avg_rb_effect / (1. / offensive_finisher_rate + avg_rb_effect))
else:
return 1.
return (1./avg_rb_effect) / (offensive_finisher_rate + (1./avg_rb_effect))

def combat_attack_counts_ar(self, current_stats, crit_rates=None):
return self.combat_attack_counts(current_stats, ar=True, crit_rates=crit_rates)
Expand Down

0 comments on commit 057f913

Please sign in to comment.