Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathal authored and Pathal committed Nov 2, 2012
2 parents 3b55f60 + c73d4bc commit 77ac426
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions shadowcraft/calcs/rogue/Aldriana/__init__.py
Expand Up @@ -548,11 +548,14 @@ def get_activated_uptime(self, duration, cooldown, use_response_time=True):
response_time = [0, self.settings.response_time][use_response_time]
return 1. * duration / (cooldown + response_time)

def get_shadow_blades_uptime(self, cooldown=None):
# 'cooldown' used as an overide for combat cycles
def get_shadow_blades_duration(self):
if self.level < 87:
return 0
duration = 12 + self.stats.gear_buffs.rogue_t14_4pc_extra_time(is_combat=self.settings.is_combat_rogue())
return 12 + self.stats.gear_buffs.rogue_t14_4pc_extra_time(is_combat=self.settings.is_combat_rogue())

def get_shadow_blades_uptime(self, cooldown=None):
# 'cooldown' used as an overide for combat cycles
duration = self.get_shadow_blades_duration()
return self.get_activated_uptime(duration, (cooldown, 180)[cooldown is None])

def update_with_shadow_blades(self, attacks_per_second, shadow_blades_uptime):
Expand Down Expand Up @@ -1008,7 +1011,19 @@ def init_assassination(self):

vendetta_duration = 20 + 10 * self.glyphs.vendetta
vendetta_duration += self.stats.gear_buffs.rogue_t13_4pc * 9
self.vendetta_mult = 1 + (.3 - .05 * self.glyphs.vendetta) * vendetta_duration / (120 + self.settings.response_time)
vendetta_uptime = vendetta_duration / (120 + self.settings.response_time)
vendetta_multiplier = .3 - .05 * self.glyphs.vendetta
self.vendetta_mult = 1 + vendetta_multiplier * vendetta_uptime

shadow_blades_duration = self.get_shadow_blades_duration()
vendetta_shadow_blades_overlap = min(shadow_blades_duration, vendetta_duration)
vendetta_uptime_during_shadow_blades = .5 * vendetta_shadow_blades_overlap / shadow_blades_duration
self.shadow_blades_vendetta_mult = 1 + vendetta_multiplier * vendetta_uptime_during_shadow_blades

shadow_blades_spacing = 180 + self.settings.response_time
autoattack_duration = shadow_blades_spacing - shadow_blades_duration
autoattack_vendetta_overlap = shadow_blades_spacing * vendetta_uptime - shadow_blades_duration * vendetta_uptime_during_shadow_blades
self.autoattack_vendetta_mult = 1 + vendetta_multiplier * autoattack_vendetta_overlap / autoattack_duration

def assassination_dps_estimate(self):
non_execute_dps = self.assassination_dps_estimate_non_execute() * (1 - self.settings.time_in_execute_range)
Expand Down Expand Up @@ -1040,26 +1055,23 @@ def assassination_dps_breakdown(self):

return dps_breakdown

def assassination_dps_breakdown_non_execute(self):
damage_breakdown = self.compute_damage(self.assassination_attack_counts_non_execute)

def update_damage_breakdown_for_vendetta(self, damage_breakdown):
for key in damage_breakdown:
if key == 'shadow_blades':
damage_breakdown[key] *= 1 + (.3 - .05 * self.glyphs.vendetta) / 2
damage_breakdown[key] *= self.shadow_blades_vendetta_mult
elif key == 'autoattack':
damage_breakdown[key] *= self.autoattack_vendetta_mult
elif key != 'Elemental Force':
damage_breakdown[key] *= self.vendetta_mult

def assassination_dps_breakdown_non_execute(self):
damage_breakdown = self.compute_damage(self.assassination_attack_counts_non_execute)
self.update_damage_breakdown_for_vendetta(damage_breakdown)
return damage_breakdown

def assassination_dps_breakdown_execute(self):
damage_breakdown = self.compute_damage(self.assassination_attack_counts_execute)

for key in damage_breakdown:
if key == 'shadow_blades':
damage_breakdown[key] *= 1 + (.3 - .05 * self.glyphs.vendetta) / 2
else:
damage_breakdown[key] *= self.vendetta_mult

self.update_damage_breakdown_for_vendetta(damage_breakdown)
return damage_breakdown

def assassination_attack_counts(self, current_stats, cpg, finisher_size):
Expand Down

0 comments on commit 77ac426

Please sign in to comment.