Esempio 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]))
Esempio 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]))
Esempio n. 3
0
 def test_get_ep(self):
     test_buffs = buffs.Buffs()
     test_mh = stats.Weapon(939.5, 1.8, 'dagger', 'landslide')
     test_oh = stats.Weapon(730.5, 1.4, 'dagger', 'landslide')
     test_ranged = stats.Weapon(1371.5, 2.2, 'thrown')
     test_procs = procs.ProcsList('heroic_prestors_talisman_of_machination', 'fluid_death', 'rogue_t11_4pc')
     test_gear_buffs = stats.GearBuffs('rogue_t11_2pc', 'leather_specialization', 'potion_of_the_tolvir', 'chaotic_metagem')
     test_stats = stats.Stats(20, 4756, 190, 1022, 1329, 597, 1189, 1377, test_mh, test_oh, test_ranged, test_procs, test_gear_buffs)
     test_talents = rogue_talents.RogueTalents('0333230113022110321', '0020000000000000000', '2030030000000000000')
     glyph_list = ['backstab', 'mutilate', 'rupture']
     test_glyphs = rogue_glyphs.RogueGlyphs(*glyph_list)
     test_race = race.Race('night_elf')
     test_cycle = settings.AssassinationCycle()
     test_settings = settings.Settings(test_cycle, response_time=1)
     test_level = 85
     calculator = AldrianasRogueDamageCalculator(test_stats, test_talents, test_glyphs, test_buffs, test_race, test_settings, test_level)
     ep_values = calculator.get_ep()
     self.assertTrue(ep_values['agi'] < 4.0)
     self.assertTrue(ep_values['agi'] > 2.0)
     self.assertTrue(ep_values['yellow_hit'] < 4.0)
     self.assertTrue(ep_values['yellow_hit'] > 1.0)
     self.assertTrue(ep_values['crit'] < 2.0)
     self.assertTrue(ep_values['crit'] > 0.0)
# Set up glyphs.
glyph_list = ['recuperate']
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)
# Set up glyphs.
glyph_list = character_data.get_glyphs()
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# 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)
Esempio n. 6
0
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.CombatCycle(stack_cds=True)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False, stormlash=1,
                                  adv_params="", tricks_on_cooldown=False, latency=.025, merge_damage=True)

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

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

# Compute EP values.
ep_values = calculator.get_ep(baseline_dps=total_dps)
tier_ep_values = calculator.get_other_ep(['rogue_t14_4pc', 'rogue_t14_2pc', 'rogue_t15_4pc', 'rogue_t15_2pc', 'rogue_t16_2pc', 'rogue_t16_4pc'])
#mh_enchants_and_dps_ep_values, oh_enchants_and_dps_ep_values = calculator.get_weapon_ep(dps=True, enchants=True)

trinkets_list = [
    #5.2
    'heroic_rune_of_re_origination',
    'thunder_rune_of_re_origination',
    'rune_of_re_origination',
    'lfr_rune_of_re_origination',
    'heroic_bad_juju',
    'thunder_bad_juju',
    'bad_juju',
    'lfr_bad_juju',
    'heroic_thunder_talisman_of_bloodlust',
    'heroic_talisman_of_bloodlust',
Esempio n. 7
0
    use_opener='always',
    opener_name='ambush',
    num_boss_adds=0.0,
    adv_params="")  # 0.2 = 20% of the fight is an add present

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

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

# Compute EP values.
ep_values = calculator.get_ep(baseline_dps=total_dps)
#tier_ep_values = calculator.get_other_ep(['rogue_t16_2pc', 'rogue_t16_4pc'])
#mh_enchants_and_dps_ep_values, oh_enchants_and_dps_ep_values = calculator.get_weapon_ep(dps=True, enchants=True)

trinkets_list = {
    #5.4
    'assurance_of_consequence': [(528, 532, 536), (540, 544, 548),
                                 (553, 557, 561), (559, 563, 567),
                                 (566, 570, 574), (572, 576, 580)],
    'haromms_talisman': [(528, 532, 536), (540, 544, 548), (553, 557, 561),
                         (559, 563, 567), (566, 570, 574), (572, 576, 580)],
    'sigil_of_rampage': [(528, 532, 536), (540, 544, 548), (553, 557, 561),
                         (559, 563, 567), (566, 570, 574), (572, 576, 580)],
    'ticking_ebon_detonator':
    [(528, 532, 536), (540, 544, 548), (553, 557, 561), (559, 563, 567),
     (566, 570, 574), (572, 576, 580)],