示例#1
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]))
示例#2
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]))
示例#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)
示例#4
0
                         multistrike=2034,)

# Initialize talents..
test_talents = talents.Talents('0000000', test_class, test_level)

# Set up glyphs.
glyph_list = []
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.SubtletyCycle(5, use_hemorrhage='uptime')
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False,
                                 adv_params="")

# 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()
dps_breakdown2 = calculator.get_dps_breakdown()
total_dps = sum(entry[1] for entry in dps_breakdown.items())
total_dps2 = sum(entry[1] for entry in dps_breakdown2.items())
print total_dps, total_dps2, calculator.get_dps(), calculator.get_dps()

# Compute EP values.
ep_values = calculator.get_ep(baseline_dps=total_dps)
#ep_values = calculator.get_ep()
#tier_ep_values = calculator.get_other_ep(['rogue_t17_2pc', 'rogue_t17_4pc', 'rogue_t17_4pc_lfr'])

#talent_ranks = calculator.get_talents_ranking()
示例#5
0
# Initialize talents..
test_talents = talents.Talents('3322131', test_class, test_level)

# Set up glyphs.
glyph_list = ['energy', 'disappearance']
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.CombatCycle(revealing_strike_pooling=True, blade_flurry=False)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False,
                                  latency=.03, merge_damage=True, use_opener='always', opener_name='ambush',
                                  num_boss_adds=0.0, adv_params="", potion=True, prepot=True) # 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',
    'haromms_talisman',
    'sigil_of_rampage',
示例#6
0
                         multistrike=1834,)

# Initialize talents..
test_talents = talents.Talents('2000002', test_class, test_level)

# Set up glyphs.
glyph_list = []
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.SubtletyCycle(5, use_hemorrhage='never', clip_fw=False)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False,
                                 adv_params="")

# 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)
#ep_values = calculator.get_ep()
#tier_ep_values = calculator.get_other_ep(['rogue_t17_2pc', 'rogue_t17_4pc', 'rogue_t17_4pc_lfr'])

talent_ranks = calculator.get_talents_ranking()

def max_length(dict_list):
    max_len = 0
    for i in dict_list:
示例#7
0
    charInfo['talents'] = character_data.get_talents()
test_talents = talents.Talents(charInfo['talents'], test_class, test_level)

# Set up glyphs.
glyph_list = character_data.get_glyphs()
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
if character_data.get_mh_type() == 'dagger':
    print "\nALERT: Dagger found. Playing combat with a dagger should be a last resort, and is not recommended. \n"
test_cycle = settings.CombatCycle(use_rupture=True, ksp_immediately=True, revealing_strike_pooling=True, blade_flurry=False)
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)

# 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())
talent_ranks = calculator.get_talents_ranking()
heal_sum, heal_table = calculator.get_self_healing(dps_breakdown=dps_breakdown)

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

def max_length(dict_list):
    max_len = 0
示例#8
0
# Initialize talents..
test_talents = talents.Talents('322213', test_class, test_level)

# Set up glyphs.
glyph_list = []
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.SubtletyCycle(5)
test_settings = settings.Settings(test_cycle,
                                  response_time=1,
                                  tricks_on_cooldown=True)

# 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()
talent_ranks = calculator.get_talents_ranking()

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


def max_length(dict_list):
    max_len = 0
    for i in dict_list:
        dict_values = i.items()
示例#9
0
    charInfo['talents'] = character_data.get_talents()
test_talents = talents.Talents(charInfo['talents'], test_class, test_level)

# Set up glyphs.
glyph_list = character_data.get_glyphs()
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
if character_data.get_mh_type() == 'dagger':
    print "\nALERT: Dagger found. Playing combat with a dagger should be a last resort, and is not recommended. \n\n"
test_cycle = settings.CombatCycle(use_rupture=True, ksp_immediately=True, revealing_strike_pooling=True, blade_flurry=charInfo['blade_flurry'])
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)

# 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())
talent_ranks = calculator.get_talents_ranking()
heal_sum, heal_table = calculator.get_self_healing(dps_breakdown=dps_breakdown)

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

def max_length(dict_list):
    max_len = 0
# Set up glyphs.
glyph_list = ['backstab', 'mutilate', 'rupture', 'tricks_of_the_trade']
test_glyphs = rogue_glyphs.RogueGlyphs(*glyph_list)

# Set up race.
test_race = race.Race('night_elf')

# Set up settings.
test_cycle = settings.AssassinationCycle()
test_settings = settings.Settings(test_cycle, response_time=1, duration=360)

# Set up level 
test_level = 85

# 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 talents ranking
main_tree_talents_ranking, off_tree_talents_ranking = calculator.get_talents_ranking()

# Compute glyphs ranking
glyps_ranking = calculator.get_glyphs_ranking(['vendetta', 'backstab'])

# Compute EP values for procs and gear buffs
tier_ep_values = calculator.get_other_ep(['rogue_t11_4pc', 'rogue_t11_2pc', 'rogue_t12_4pc', 'rogue_t12_2pc'])
metagem_ep_value = calculator.get_other_ep(['chaotic_metagem'])
trinkets_list = [
    'the_hungerer',
# Initialize talents..
test_talents = talents.Talents('322213', test_class, test_level)

# Set up glyphs.
glyph_list = ['recuperate', 'sprint', 'vendetta'] #just to have something
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=False, stormlash=True,
                                  tricks_on_cooldown=False)

# 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())
non_execute_breakdown = calculator.assassination_dps_breakdown_non_execute()
non_execute_total = sum(entry[1] for entry in non_execute_breakdown.items())
execute_breakdown = calculator.assassination_dps_breakdown_execute()
execute_total = sum(entry[1] for entry in execute_breakdown.items())

# Compute EP values.
ep_values = calculator.get_ep()
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 = [
示例#12
0
    def setup(self, input):
        gear_data = input.get("g", [])
        gear = frozenset([x[0] for x in gear_data])

        i18n.set_language('local')

        # Base
        _level = int(input.get("l", 100))
        _level = 110

        # Buffs
        buff_list = []
        __max = len(self.buffMap)
        for b in input.get("b", []):
            b = int(b)
            if b >= 0 and b < __max:
                buff_list.append(self.buffMap[b])

        # Buff Food
        buff_list.append(self.buffFoodMap[input.get("bf", 0)])

        _buffs = buffs.Buffs(*buff_list, level=_level)

        # ##################################################################################
        # Weapons
        _mh = self.weapon(input, 'mh')
        _oh = self.weapon(input, 'oh')
        # ##################################################################################

        # ##################################################################################
        # Set up gear buffs.
        buff_list = ['gear_specialization']

        if len(self.tier18IDs & gear) >= 2:
            buff_list.append('rogue_t18_2pc')

        if len(self.tier18IDs & gear) >= 4:
            buff_list.append('rogue_t18_4pc')

        if len(self.tier18LFRIDs & gear) >= 4:
            buff_list.append('rogue_t18_4pc_lfr')

        if len(self.tier19IDs & gear) >= 2:
            buff_list.append('rogue_t19_2pc')

        if len(self.tier19IDs & gear) >= 4:
            buff_list.append('rogue_t19_4pc')

        if len(self.orderhallIDs & gear) >= 6:
            buff_list.append('rogue_orderhall_6pc')

        if len(self.orderhallIDs & gear) == 8:
            buff_list.append('rogue_orderhall_8pc')

        if len(self.marchOfTheLegionIDs & gear) == 2:
            buff_list.append('march_of_the_legion_2pc')

        if len(self.journeyThroughTimeIDs & gear) == 2:
            buff_list.append('journey_through_time_2pc')

        if len(self.jacinsRuseIDs & gear) == 2:
            buff_list.append('jacins_ruse_2pc')

        if len(self.toeKneesIDs
               & gear) == 2 or len(self.bloodstainedIDs
                                   & gear) == 2 or len(self.eyeOfCommandIDs
                                                       & gear) == 2:
            buff_list.append('kara_empowered_2pc')

        for k, v in self.gearBoosts.iteritems():
            if k in gear:
                buff_list.append(v)

        _gear_buffs = stats.GearBuffs(*buff_list)

        # ##################################################################################
        # Trinket procs
        proclist = []
        for k in self.gearProcs:
            if k in gear:
                for gd in gear_data:
                    if gd[0] == k:
                        proclist.append((self.gearProcs[k], gd[1]))
                        if gd[0] == 133597:
                            proclist.append(
                                ('infallible_tracking_charm_mod', gd[1]))
                        break

        if input.get("l", 0) == 110:
            if input.get("prepot", 0) == 0:
                proclist.append('old_war_prepot')
            if input.get("pot", 0) == 0:
                proclist.append('old_war_pot')
            if input.get("prepot", 0) == 1:
                proclist.append('prolonged_power_prepot')
            if input.get("pot", 0) == 1:
                proclist.append('prolonged_power_pot')

        # Add enchant procs to the list of gear buffs
        for k in gear_data:
            if k[2] != 0 and k[2] in self.enchantMap:
                proclist.append(self.enchantMap[k[2]])

        _procs = procs.ProcsList(*proclist)

        # ##################################################################################
        # Player stats
        # Need parameter order here
        # str, agi, int, spi, sta, ap, crit, hit, exp, haste, mastery, mh, oh, thrown, procs, gear buffs
        raceStr = input.get("r", 'human').lower().replace(" ", "_")
        _race = race.Race(raceStr, 'rogue', _level)

        s = input.get("sta", {})
        _opt = input.get("settings", {})
        duration = int(_opt.get("duration", 300))

        _stats = stats.Stats(
            mh=_mh,
            oh=_oh,
            procs=_procs,
            gear_buffs=_gear_buffs,
            str=s[0],  # Str
            agi=s[1],  # AGI
            int=0,
            stam=0,
            ap=s[2],  # AP
            crit=s[3],  # Crit
            haste=s[4],  # Haste
            mastery=s[5],  # Mastery
            versatility=s[6],  # Versatility
            level=_level)
        # ##################################################################################

        _spec = input.get("spec", 'a')
        if _spec == "a":
            tree = 0
            spec = "assassination"
        elif _spec == "Z":
            tree = 1
            spec = "outlaw"
        else:
            tree = 2
            spec = "subtlety"

        # Talents
        t = input.get("t", '')
        _talents = talents.Talents(t, spec, "rogue", _level)

        rotation_keys = input.get("ro", {})
        rotation_options = dict((key.encode('ascii'), val)
                                for key, val in self.convert_bools(
                                    input.get("ro", {})).iteritems()
                                if key in self.validCycleKeys[tree])

        if spec == "outlaw":
            opts = [
                'jolly_roger_reroll', 'grand_melee_reroll', 'shark_reroll',
                'true_bearing_reroll', 'buried_treasure_reroll',
                'broadsides_reroll'
            ]

            if rotation_options['reroll_policy'] != 'custom':
                value = int(rotation_options['reroll_policy'])
                for opt in opts:
                    rotation_options[opt] = value
            else:
                for opt in opts:
                    rotation_options[opt] = int(rotation_options[opt])
            del rotation_options['reroll_policy']
        elif spec == "subtlety":
            rotation_options['positional_uptime'] = rotation_options[
                'positional_uptime'] / 100.0

        settings_options = {}
        settings_options['num_boss_adds'] = _opt.get("num_boss_adds", 0)
        settings_options['is_day'] = _opt.get("night_elf_racial", 0) == 1
        settings_options['is_demon'] = _opt.get("demon_enemy", 0) == 1
        settings_options['marked_for_death_resets'] = _opt.get("mfd_resets", 0)
        settings_options['finisher_threshold'] = _opt.get(
            "finisher_threshold", 0)

        if tree == 0:
            _cycle = settings.AssassinationCycle(**rotation_options)
        elif tree == 1:
            _cycle = settings.OutlawCycle(**rotation_options)
        else:
            _cycle = settings.SubtletyCycle(**rotation_options)
            _cycle.cp_builder
        _settings = settings.Settings(_cycle,
                                      response_time=_opt.get(
                                          "response_time", 0.5),
                                      duration=duration,
                                      latency=_opt.get("latency", 0.03),
                                      adv_params=_opt.get("adv_params", ''),
                                      default_ep_stat='ap',
                                      **settings_options)

        if len(input['art']) == 0:
            # if no artifact data was passed (probably because the user had the wrong
            # weapons equipped), pass a string of zeros as the trait data.
            _traits = artifact.Artifact(
                spec, "rogue",
                "0" * len(artifact_data.traits[("rogue", spec)]))
        elif len(input['art']) == len(artifact_data.traits[("rogue", spec)]):
            traitstr = ""
            remap = {}
            for k, v in input['art'].iteritems():
                remap[self.artifactTraits[_spec][int(k)]] = v
            for t in artifact_data.traits[("rogue", spec)]:
                if (t in remap):
                    traitstr += str(remap[t])
                else:
                    traitstr += "0"
            _traits = artifact.Artifact(spec, "rogue", traitstr)
        else:
            _traits = None

        calculator = AldrianasRogueDamageCalculator(_stats, _talents, _traits,
                                                    _buffs, _race, spec,
                                                    _settings, _level)
        return calculator
示例#13
0
    def setup(self, input):
        gear_data = input.get("g", [])
        gear = frozenset([x[0] for x in gear_data])

        i18n.set_language('local')

        # Base
        _level = int(input.get("l", 100))

        # Buffs
        buff_list = []
        __max = len(self.buffMap)
        for b in input.get("b", []):
            b = int(b)
            if b >= 0 and b < __max:
                buff_list.append(self.buffMap[b])

        # Buff Food
        buff_list.append(self.buffFoodMap[input.get("bf", 0)])

        _buffs = buffs.Buffs(*buff_list, level=_level)

        # ##################################################################################
        # Weapons
        _mh = self.weapon(input, 'mh')
        _oh = self.weapon(input, 'oh')
        # ##################################################################################

        # ##################################################################################
        # Set up gear buffs.
        buff_list = []
        buff_list.append('gear_specialization')
        if input.get("mg") == "chaotic":
            buff_list.append('chaotic_metagem')

        if len(self.tier14IDS & gear) >= 2:
            buff_list.append('rogue_t14_2pc')

        if len(self.tier14IDS & gear) >= 4:
            buff_list.append('rogue_t14_4pc')

        if len(self.tier15IDS & gear) >= 2:
            buff_list.append('rogue_t15_2pc')

        if len(self.tier15IDS & gear) >= 4:
            buff_list.append('rogue_t15_4pc')

        if len(self.tier16IDS & gear) >= 2:
            buff_list.append('rogue_t16_2pc')

        if len(self.tier16IDS & gear) >= 4:
            buff_list.append('rogue_t16_4pc')

        if len(self.tier17IDS & gear) >= 2:
            buff_list.append('rogue_t17_2pc')

        if len(self.tier17IDS & gear) >= 4:
            buff_list.append('rogue_t17_4pc')

        if len(self.tier17LFRIDS & gear) >= 4:
            buff_list.append('rogue_t17_4pc_lfr')

        agi_bonus = 0
        if len(self.tier17LFRIDS & gear) >= 2:
            agi_bonus += 100

        for k in self.gearBoosts:
            if k in gear:
                buff_list.append(self.gearBoosts[k])

        _gear_buffs = stats.GearBuffs(*buff_list)

        # ##################################################################################
        # Trinket procs
        proclist = []
        for k in self.gearProcs:
            if k in gear:
                for gd in gear_data:
                    if gd[0] == k:
                        proclist.append((self.gearProcs[k], gd[1]))
                        break

        if input.get("mg") == "capacitive":
            proclist.append('legendary_capacitive_meta')

        #if len(frozenset([102248]) & gear) >= 1:
        #    proclist.append('fury_of_xuen')

        if input.get("l", 0) == 90:
            if input.get("prepot", 0) == 1:
                proclist.append('virmens_bite_prepot')
            if input.get("pot", 0) == 1:
                proclist.append('virmens_bite')

        elif input.get("l", 0) > 90:
            if input.get("prepot", 0) == 1:
                proclist.append('draenic_agi_prepot')
            if input.get("pot", 0) == 1:
                proclist.append('draenic_agi_pot')

        _procs = procs.ProcsList(*proclist)

        # ##################################################################################
        # Player stats
        # Need parameter order here
        # str, agi, int, spi, sta, ap, crit, hit, exp, haste, mastery, mh, oh, thrown, procs, gear buffs
        raceStr = input.get("r", 'human').lower().replace(" ", "_")
        _race = race.Race(raceStr, 'rogue', _level)

        s = input.get("sta", {})
        _opt = input.get("settings", {})
        duration = int(_opt.get("duration", 300))

        _stats = stats.Stats(
            _mh,
            _oh,
            _procs,
            _gear_buffs,
            s[0],  # Str
            s[1] + agi_bonus,  # AGI
            0,
            0,
            0,
            s[2],  # AP
            s[3],  # Crit
            s[4],  # Haste
            s[5],  # Mastery
            0,
            s[6],  # Multistrike
            s[7],  # Versatility
            _level,
            s[9],  # PvP Power
            s[8],  # Resilience Rating
            pvp_target_armor=_opt.get("pvp_target_armor", 1500))
        # ##################################################################################

        # Talents
        t = input.get("t", '')
        _talents = talents.Talents(t, "rogue", _level)

        # Glyphs
        _glyphs = glyphs.Glyphs("rogue", *input.get("gly", []))

        _spec = input.get("spec", 'a')
        if _spec == "a":
            tree = 0
        elif _spec == "Z":
            tree = 1
        else:
            tree = 2

        rotation_keys = input.get("ro", {
            'opener_name': 'default',
            'opener_use': 'always'
        })
        if not rotation_keys["opener_name"] in self.validOpenerKeys[tree]:
            rotation_keys["opener_name"] = "default"
        rotation_options = dict((key.encode('ascii'), val)
                                for key, val in self.convert_bools(
                                    input.get("ro", {})).iteritems()
                                if key in self.validCycleKeys[tree])
        settings_options = {}
        if __builtin__.shadowcraft_engine_version >= 5.4:
            settings_options['num_boss_adds'] = _opt.get("num_boss_adds", 0)
        if __builtin__.shadowcraft_engine_version >= 6.0:
            settings_options['is_day'] = _opt.get("night_elf_racial", 0) == 1

        if tree == 0:
            _cycle = settings.AssassinationCycle(**rotation_options)
        elif tree == 1:
            _cycle = settings.CombatCycle(**rotation_options)
        else:
            _cycle = settings.SubtletyCycle(5, **rotation_options)
        # test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=charInfo['pvp'], shiv_interval=charInfo['shiv'])
        _settings = settings.Settings(
            _cycle,
            time_in_execute_range=_opt.get("time_in_execute_range", 0.35),
            response_time=_opt.get("response_time", 0.5),
            duration=duration,
            dmg_poison=_opt.get("dmg_poison", 'dp'),
            utl_poison=_opt.get("utl_poison", None),
            opener_name=rotation_keys["opener_name"],
            use_opener=rotation_keys["opener_use"],
            is_pvp=_opt.get("pvp", False),
            latency=_opt.get("latency", 0.03),
            adv_params=_opt.get("adv_params", ''),
            default_ep_stat='ap',
            **settings_options)
        calculator = AldrianasRogueDamageCalculator(_stats, _talents, _glyphs,
                                                    _buffs, _race, _settings,
                                                    _level)
        return calculator
示例#14
0
# Set up glyphs.
glyph_list = ['backstab', 'slice_and_dice', 'shadow_dance', 'tricks_of_the_trade']
test_glyphs = rogue_glyphs.RogueGlyphs(*glyph_list)

# Set up race.
test_race = race.Race('night_elf')

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

# Set up level 
test_level = 85

# 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 talents ranking
main_tree_talents_ranking, off_tree_talents_ranking = calculator.get_talents_ranking()

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

def pretty_print(dict_list):
    max_len = 0
    for i in dict_list:
        dict_values = i.items()
示例#15
0
                         multistrike=1034,)

# Initialize talents..
test_talents = talents.Talents('3322122', test_class, test_level)

# Set up glyphs.
glyph_list = ['disappearance', 'sprint', 'vendetta'] #just to have something
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)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False,
                                  use_opener='always', opener_name='mutilate')

# 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())
calculator.init_assassination()
non_execute_breakdown = calculator.assassination_dps_breakdown_non_execute()
non_execute_total = sum(entry[1] for entry in non_execute_breakdown.items())
calculator.init_assassination()
execute_breakdown = calculator.assassination_dps_breakdown_execute()
execute_total = sum(entry[1] for entry in execute_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)
# 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=False)

# 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()
tier_ep_values = calculator.get_other_ep(['rogue_t14_4pc', 'rogue_t14_2pc'])
mh_enchants_and_dps_ep_values, oh_enchants_and_dps_ep_values = calculator.get_weapon_ep(
    dps=True, enchants=True)

trinkets_list = [
    'heroic_bottle_of_infinite_stars', 'bottle_of_infinite_stars',
    'lfr_bottle_of_infinite_stars', 'heroic_terror_in_the_mists',
    'terror_in_the_mists', 'lfr_terror_in_the_mists', 'relic_of_xuen',
    'windswept_pages', 'jade_bandit_figurine', 'hawkmasters_talon',
    'windswept_pages', 'searing_words', 'flashing_steel_talisman'
]
示例#17
0
    'legionblade':         1,
    'shadows_of_the_uncrowned': 1,
    'weak_point': 4+3,
    'shadows_whisper': 1,
    'feeding_frenzy': 1,
    'concordance_of_the_legionfall': 24,
    #crucible
    'torment_the_weak': 3,
})

# Set up settings.
test_cycle = settings.SubtletyCycle()
test_settings = settings.Settings(test_cycle, pantheon_trinket_users=0, num_boss_adds=0)

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

print(str(test_stats.get_character_stats(test_race, test_traits)))

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

# Compute EP values.
ep_values = calculator.get_ep(baseline_dps=total_dps)
#ep_values = calculator.get_ep()
tier_ep_values = calculator.get_other_ep(['rogue_t20_2pc', 'rogue_t20_4pc', 'the_first_of_the_dead', 'insignia_of_ravenholdt',
'mantle_of_the_master_assassin', 'specter_of_betrayal',
'golganneths_vitality', 'amanthuls_vision', 'shadowsinged_fang', 'seeping_scourgewing', 'terminus_signaling_beacon',
'gorshalachs_legacy', 'forgefiends_fabricator'])
test_stats = stats.Stats(*(character_stats + [test_mh, test_oh, test_procs, test_gear_buffs]), pvp_power=0, pvp_resil=0, pvp_target_armor=None)

# Initialize talents..
test_talents = talents.Talents(character_data.get_talents(), test_class, test_level)

# 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=False)

# 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()
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())

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):
# Initialize talents..
test_talents = talents.Talents('122213', test_class, test_level)

# Set up glyphs.
glyph_list = ['recuperate', 'sprint', 'vendetta'] #just to have something
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=False, stormlash=True,
                                  tricks_on_cooldown=False, use_opener='always', opener_name='envenom')

# 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())
#non_execute_breakdown = calculator.assassination_dps_breakdown_non_execute()
#non_execute_total = sum(entry[1] for entry in non_execute_breakdown.items())
execute_breakdown = calculator.assassination_dps_breakdown_execute()
execute_total = sum(entry[1] for entry in execute_breakdown.items())

# Compute EP values.
ep_values = calculator.get_ep()
#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 = [
示例#20
0
#                       str,   agi, ap,  crit,  hit, exp, haste, mast,      mh,      oh,      procs,      gear_buffs
test_stats = stats.Stats(80, 18000, 250, 2000, 2550, 2550, 4000, 4800, test_mh, test_oh, test_procs, test_gear_buffs)

# Initialize talents..
test_talents = talents.Talents('322213', test_class, test_level)

# 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()
glyph_list = ['backstab', 'mutilate', 'rupture', 'tricks_of_the_trade']
test_glyphs = rogue_glyphs.RogueGlyphs(*glyph_list)

# Set up race.
test_race = race.Race('night_elf')

# Set up settings.
test_cycle = settings.AssassinationCycle()
test_settings = settings.Settings(test_cycle, response_time=1, duration=360)

# Set up level
test_level = 85

# 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 talents ranking
main_tree_talents_ranking, off_tree_talents_ranking = calculator.get_talents_ranking(
)

# Compute glyphs ranking
glyps_ranking = calculator.get_glyphs_ranking(['vendetta', 'backstab'])

# Compute EP values for procs and gear buffs
tier_ep_values = calculator.get_other_ep(
    ['rogue_t11_4pc', 'rogue_t11_2pc', 'rogue_t12_4pc', 'rogue_t12_2pc'])
示例#22
0
                         mastery=6874)

# Initialize talents..
test_talents = talents.Talents('3222121', test_class, test_level)

# Set up glyphs.
glyph_list = []
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.SubtletyCycle(5, use_hemorrhage=24)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False,
                                 adv_params="")

# 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()
tier_ep_values = calculator.get_other_ep(['rogue_t16_2pc', 'rogue_t16_4pc'])

trinkets_list = [
    #5.4
    'assurance_of_consequence',
    'haromms_talisman',
    'sigil_of_rampage',
    'sigil_of_rampage',
    'ticking_ebon_detonator',
    'thoks_tail_tip',
    'discipline_of_xuen',
    'fury_of_xuen',
    charInfo['talents'] = character_data.get_talents()
test_talents = talents.Talents(charInfo['talents'], test_class, test_level)

# 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:
                         versatility=4237)

# Initialize talents..
#test_talents = talents.Talents('2110031', test_spec, test_class, level=test_level)
test_talents = talents.Talents('1230011', test_spec, test_class, level=test_level)

#initialize artifact traits..
test_traits = artifact.Artifact(test_spec, test_class, trait_dict={'assassins_blades': 1, 'bag_of_tricks': 1, 'balanced_blades': 4, 'blood_of_the_assassinated': 1, 'fade_into_shadows': 4, 'from_the_shadows': 1, 'kingsbane': 1, 'gushing_wounds': 4, 'master_alchemist': 6, 'master_assassin': 5, 'poison_knives': 4, 'serrated_edge': 4, 'shadow_swiftness': 1, 'shadow_walker': 4, 'surge_of_toxins': 1, 'toxic_blades': 4, 'urge_to_kill': 1, 'slayers_precision': 1, 'silence_of_the_uncrowned': 1, 'strangler': 4, 'dense_concoction': 1, 'sinister_circulation': 1, 'concordance_of_the_legionfall': 24})

# Set up settings.
test_cycle = settings.AssassinationCycle()
test_settings = settings.Settings(test_cycle, response_time=.5, duration=300,
                                  finisher_threshold=4)

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

print(str(calculator.stats.get_character_stats(calculator.race, test_traits)))

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

# Compute EP values.
ep_values = calculator.get_ep(baseline_dps=total_dps)
tier_ep_values = calculator.get_other_ep(['rogue_t19_2pc', 'rogue_t19_4pc', 'rogue_orderhall_8pc',
                                          'rogue_t20_2pc', 'rogue_t20_4pc',
                                          'rogue_t21_2pc', 'rogue_t21_4pc',
                                          'mark_of_the_hidden_satyr', 'mark_of_the_distant_army',
                                          'mark_of_the_claw', 'march_of_the_legion_2pc',
                                          'journey_through_time_2pc', 'jacins_ruse_2pc',
示例#25
0
    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):
                         mastery=9328)

# Initialize talents..
test_talents = talents.Talents('322213', test_class, test_level)

# Set up glyphs.
glyph_list = ['recuperate', 'sprint'] #just to have something
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=False)

# 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()
tier_ep_values = calculator.get_other_ep(['rogue_t14_4pc', 'rogue_t14_2pc'])
mh_enchants_and_dps_ep_values, oh_enchants_and_dps_ep_values = calculator.get_weapon_ep(dps=True, enchants=True)

trinkets_list = [
    'heroic_bottle_of_infinite_stars',
    'bottle_of_infinite_stars',
    'lfr_bottle_of_infinite_stars',
    'heroic_terror_in_the_mists',
    'terror_in_the_mists',
    'lfr_terror_in_the_mists',
    'relic_of_xuen',
    'windswept_pages',
glyph_list = character_data.get_glyphs()
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
raid_crits_per_second = 5
hemo_interval = 24 #'always', 'never', 24, 25, 26...
if not character_data.get_mh_type() == 'dagger' and not test_talents.shuriken_toss:
    if not hemo_interval == 'always':
        print "\nALERT: Viable dagger cycle not found, forced rotation to strictly Hemo \n"
    hemo_interval = 'always'
test_cycle = settings.SubtletyCycle(raid_crits_per_second, use_hemorrhage=hemo_interval)
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)

# 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())
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()
示例#28
0
                         mastery=6103)

# Initialize talents..
test_talents = talents.Talents('322213', test_class, test_level)

# Set up glyphs.
glyph_list = ['recuperate', 'adrenaline_rush']
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',
示例#29
0
# Initialize talents..
test_talents = talents.Talents("022211", test_class, test_level)

# Set up glyphs.
glyph_list = []
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.SubtletyCycle(5)
test_settings = settings.Settings(
    test_cycle, response_time=0.5, duration=360, dmg_poison="dp", utl_poison="lp", is_pvp=False
)

# 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())
talent_ranks = calculator.get_talents_ranking()


def max_length(dict_list):
    max_len = 0
    for i in dict_list:
        dict_values = i.items()
示例#30
0
# Initialize talents..
test_talents = talents.Talents('3322133', test_class, test_level)

# Set up glyphs.
glyph_list = ['energy', 'disappearance']
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.CombatCycle(revealing_strike_pooling=True, blade_flurry=False, dfa_during_ar=True)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False,
                                  latency=.03, merge_damage=True, use_opener='always', opener_name='ambush',
                                  num_boss_adds=0.0, adv_params="", potion=True, prepot=True) # 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)],
示例#31
0
                         haste=6264,
                         mastery=4100)

# Initialize talents..
test_talents = talents.Talents('022212', test_class, test_level)

# Set up glyphs.
glyph_list = []
test_glyphs = glyphs.Glyphs(test_class, *glyph_list)

# Set up settings.
test_cycle = settings.SubtletyCycle(5)
test_settings = settings.Settings(test_cycle, response_time=.5, duration=360, dmg_poison='dp', utl_poison='lp', is_pvp=False)

# 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()
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'])

trinkets_list = [
    #5.2
    'heroic_rune_of_re_origination',
    'rune_of_re_origination',
    'lfr_rune_of_re_origination',
    'heroic_bad_juju',
    'bad_juju',
    'lfr_bad_juju',
    'heroic_talisman_of_bloodlust',
    'talisman_of_bloodlust',
示例#32
0
                         test_oh, test_procs, test_gear_buffs)

# Initialize talents..
test_talents = talents.Talents('322213', test_class, test_level)

# 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
示例#33
0
def from_json(json_string, character_class='rogue'):
    j = json.loads(json_string)
    try:
        race_object = race.Race(str(j['race']),
                                character_class=character_class)
        level = int(j['level'])

        s = j['settings']
        settings_type = s['type']
        if settings_type == 'assassination':
            # AssassinationCycle(self, min_envenom_size_mutilate=4, min_envenom_size_backstab=5, prioritize_rupture_uptime_mutilate=True, prioritize_rupture_uptime_backstab=True)
            c = s.get('cycle', {})
            cycle = settings.AssassinationCycle(
                c.get('min_envenom_size_mutilate', 4),
                c.get('min_envenom_size_backstab', 5),
                c.get('prioritize_rupture_uptime_mutilate', True),
                c.get('prioritize_rupture_uptime_backstab', True))
        elif settings_type == 'combat':
            # CombatCycle(self, use_rupture=True, use_revealing_strike='sometimes', ksp_immediately=False)
            c = s.get('cycle', {})
            cycle = settings.CombatCycle(
                c.get('use_rupture', True),
                c.get('use_revealing_strike', 'sometimes'),
                c.get('ksp_immediately', False))
        elif settings_type == 'subtlety':
            # SubletySycle(raid_crits_per_second, clip_recuperate=False)
            c = s['cycle']
            cycle = settings.SubtletyCycle(c['raid_crits_per_second'],
                                           c.get('clip_recuperate', False))
        else:
            raise InvalidJSONException(_("Missing settings"))

        # Settings(cycle, time_in_execute_range=.35, tricks_on_cooldown=True, response_time=.5, mh_poison='ip', oh_poison='dp', duration=300):
        settings_object = settings.Settings(
            cycle, s.get('time_in_execute_range', .35),
            s.get('tricks_on_cooldown', True), s.get('response_time', .5),
            s.get('mh_poison', 'ip'), s.get('oh_poison', 'dp'),
            s.get('duration', 300))

        stats_dict = j['stats']
        # Weapon(damage, speed, weapon_type, enchant=None):
        mh_dict = stats_dict['mh']
        mh = stats.Weapon(mh_dict['damage'], mh_dict['speed'], mh_dict['type'],
                          mh_dict.get('enchant'))
        oh_dict = stats_dict['oh']
        oh = stats.Weapon(oh_dict['damage'], oh_dict['speed'], oh_dict['type'],
                          oh_dict.get('enchant'))
        ranged_dict = stats_dict['ranged']
        ranged = stats.Weapon(ranged_dict['damage'], ranged_dict['speed'],
                              ranged_dict['type'], ranged_dict.get('enchant'))
        procs_list = procs.ProcsList(*stats_dict['procs'])
        gear_buffs = stats.GearBuffs(*stats_dict['gear_buffs'])

        # Stats(str, agi, ap, crit, hit, exp, haste, mastery, mh, oh, ranged, procs, gear_buffs, level=85):
        def s(stat):
            return int(stats_dict[stat])

        stats_object = stats.Stats(s('str'), s('agi'), s('ap'), s('crit'),
                                   s('hit'), s('exp'), s('haste'),
                                   s('mastery'), mh, oh, ranged, procs_list,
                                   gear_buffs, level)
        glyphs = rogue_glyphs.RogueGlyphs(*j['glyphs'])
        talents = rogue_talents.RogueTalents(*j['talents'])
        buffs_object = buffs.Buffs(*j['buffs'])
    except KeyError as e:
        raise InvalidJSONException(
            _("Missing required input {key}").format(key=str(e)))
    # Calculator(stats, talents, glyphs, buffs, race, settings=None, level=85):
    return AldrianasRogueDamageCalculator(stats_object,
                                          talents,
                                          glyphs,
                                          buffs_object,
                                          race_object,
                                          settings=settings_object,
                                          level=level)