Exemplo n.º 1
0
    def calculate(self):
        if not self.initializing:
            gear_stats = self.gear_page.get_stats()
            my_stats = stats.Stats(**gear_stats)
            my_talents = rogue_talents.RogueTalents(*self.talents_page.get_talents())
            my_glyphs = rogue_glyphs.RogueGlyphs(*self.talents_page.get_glyphs())
            my_buffs = buffs.Buffs(*self.buffs_page.current_buffs)
            my_race = race.Race(self.settings_page.get_race())
            test_settings = settings.Settings(self.settings_page.get_cycle(), response_time = self.settings_page.get_response_time())

            self.error_area.SetLabel("")
            try:
                calculator = AldrianasRogueDamageCalculator(my_stats, my_talents, my_glyphs, my_buffs, my_race, test_settings)
                dps = calculator.get_dps()
                ep_values = calculator.get_ep()
                dps_breakdown = calculator.get_dps_breakdown()

            except exceptions.InvalidInputException as e:
                self.error_area.SetLabel(str(e))
            
            self.dps.SetValue(str(dps))
            self.ep_box.SetValue(self.pretty_print(ep_values))
            self.dps_breakdown.SetValue(self.pretty_print(dps_breakdown))
            for stat in GearPage.stats:
                tc = getattr(self, stat)
                tc.SetValue(str(gear_stats[stat]))
Exemplo n.º 2
0
    def calculate(self):
        # bugged
        if not self.initializing:
            gear_stats = self.gear_page.get_stats()
            my_stats = stats.Stats(**gear_stats)
            my_talents = talents.Talents(
                talent_string='311113')  #(*self.talents_page.get_talents() )
            #my_talents = '311113'
            my_glyphs = glyphs.Glyphs('rogue', *self.talents_page.get_glyphs(
            ))  #.RogueGlyphs(*self.talents_page.get_glyphs())
            my_buffs = buffs.Buffs(*self.buffs_page.current_buffs)
            my_race = race.Race(self.settings_page.get_race())
            test_settings = settings.Settings(
                self.settings_page.get_cycle(),
                response_time=self.settings_page.get_response_time())

            self.error_area.SetLabel("")
            try:
                calculator = AldrianasRogueDamageCalculator(
                    my_stats, my_talents, my_glyphs, my_buffs, my_race,
                    test_settings)
                dps = calculator.get_dps()
                ep_values = calculator.get_ep()
                dps_breakdown = calculator.get_dps_breakdown()

            except exceptions.InvalidInputException as e:
                self.error_area.SetLabel(str(e))

            self.dps.SetValue(str(dps))
            self.ep_box.SetValue(self.pretty_print(ep_values))
            self.dps_breakdown.SetValue(self.pretty_print(dps_breakdown))
            for stat in GearPage.stats:
                tc = getattr(self, stat)
                tc.SetValue(str(gear_stats[stat]))
Exemplo n.º 3
0
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.CombatCycle()
test_settings = settings.Settings(test_cycle, response_time=1)

# Build a DPS object.
calculator = AldrianasRogueDamageCalculator(test_stats, test_talents,
                                            test_glyphs, test_buffs, test_race,
                                            test_settings, test_level)

# Compute EP values.
ep_values = calculator.get_ep()

# Compute DPS Breakdown.
dps_breakdown = calculator.get_dps_breakdown()
total_dps = sum(entry[1] for entry in dps_breakdown.items())

# Compute weapon type modifier.
weapon_type_mod = calculator.get_oh_weapon_modifier()


def max_length(dict_list):
    max_len = 0
    for i in dict_list:
        dict_values = i.items()
        if max_len < max(len(entry[0]) for entry in dict_values):
            max_len = max(len(entry[0]) for entry in dict_values)

    return max_len
# Set up settings.
test_cycle = settings.AssassinationCycle(min_envenom_size_non_execute=4, min_envenom_size_execute=5,
                                         prioritize_rupture_uptime_non_execute=True, prioritize_rupture_uptime_execute=True)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=charInfo['pvp'],
                                  stormlash=charInfo['stormlash'], shiv_interval=charInfo['shiv'])

# Build a DPS object.
#calculator = AldrianasRogueDamageCalculator(test_stats, test_talents, test_glyphs, test_buffs, test_race, test_settings, test_level, char_class=test_class)
calculator = AldrianasRogueDamageCalculator(test_stats, test_talents, test_glyphs, test_buffs, test_race, test_settings, test_level)

# Compute EP values.
ep_values = calculator.get_ep()

# Compute DPS Breakdown.
dps_breakdown = calculator.get_dps_breakdown()
non_execute_breakdown = calculator.assassination_dps_breakdown_non_execute()
total_dps = sum(entry[1] for entry in dps_breakdown.items())
non_execute_total = sum(entry[1] for entry in non_execute_breakdown.items())
talent_ranks = calculator.get_talents_ranking()
heal_sum, heal_table = calculator.get_self_healing(dps_breakdown=dps_breakdown)

def max_length(dict_list):
    max_len = 0
    for i in dict_list:
        dict_values = i.items()
        if max_len < max(len(entry[0]) for entry in dict_values):
            max_len = max(len(entry[0]) for entry in dict_values)

    return max_len