Пример #1
0
        elif float(valueslist[0]) == float(valueslist[len(valueslist) - 1]):
            # same value, multiply
            return multiply(values, by, " ")
        else:
            #last value is lower than first, then divide
            return divide(values, by, " ")
    else:
        # only single element, then multiply (parse exceptions in dividelist...)
        return multiply(values, by, " ")
    return ' '.join(tmplist)


if __name__ == "__main__":

    # remove comments from file (there's bug in _custom that some comments have only an single slash instead of double slash...
    clean.remove_comments('npc_abilities.txt', 'npc_abilities_custom.tmp')

    kv = KeyValues()
    kv.load('npc_abilities_custom.tmp')

    root = KeyValues('DOTAAbilities')

    for factor in factors:
        for skill in kv:
            if skill in dont_parse:
                continue
            skillkv = KeyValues(skill)
            skillkv['BaseClass'] = skill

            for base in kv[skill]:
                base = str(base)
Пример #2
0
            return multiply(values, by, separator)
        else:
            #last value is lower than first, then divide
            if key == 'speed_bonus':
                print 'divide'
            return divide(values, by, separator)
    else:
        # only single element, then multiply (parse exceptions in dividelist...)
        return multiply(values, by, separator)
    return ' '.join(tmplist)

    
if __name__ == "__main__":

    # remove comments from file (there's bug in _custom that some comments have only an single slash instead of double slash...
    clean.remove_comments('npc_abilities.txt', 'npc_abilities_custom.tmp')
    clean.remove_comments('items.txt', 'items.tmp')

    kv = KeyValues()
    kv.load('npc_abilities_custom.tmp')

    itemkv = KeyValues()
    itemkv.load('items.tmp')

    root = KeyValues('DOTAAbilities')
    rootov = KeyValues('DOTAAbilities')

    for factor in factors:
        if factor == override_factor:
            print 'Factor x%d (_override.txt)...' % factor
        else:
Пример #3
0
from lib.keyvalues import KeyValues
from lib import clean
import abilities
import os
   
if __name__ == "__main__":

    # remove comments from file (there's bug in _custom that some comments have only an single slash instead of double slash...
    clean.remove_comments('item.txt', 'npc_abilities_override.tmp')

    kv = KeyValues()
    kv.load('npc_abilities_override.tmp')

    root = KeyValues('DOTAAbilities')

    for factor in abilitites.factors:
        for skill in kv:
            if skill in dont_parse:
                continue
            skillkv = KeyValues(skill)
            skillkv['BaseClass'] = skill

            for base in kv[skill]:
                base = str(base)
                if base != 'AbilitySpecial':
                    valueslist = kv[skill][base].strip().split(" ")
                    if base not in ignore_all_normal and str_to_type(valueslist[0]) in (int, long, float, complex):
                        skillkv[base] = divide_or_multiply(base, kv[skill][base], factor, " ")
                    else:
                        skillkv[base] = kv[skill][base]
                #print str(skillkv[base]) + ' = ' + str(kv[skill][base])
Пример #4
0
        'shadow_demon_demonic_purge', 'tinker_rearm', 'lycan_summon_wolves',
        'elder_titan_echo_stomp', 'shredder_chakram_2', 'tusk_ice_shards_stop',
        'tusk_walrus_kick', 'shoot_firework'
    ]

    banStartsWith = [
        'roshan_', 'greevil_', 'backdoor_', 'invoker_', 'earth_spirit_', 'cny',
        'necronomicon_', 'abyssal_underlord_', 'earth_spirit_'
    ]

    #luna_eclipse disabled due crash issues
    #sandking_caustic_finale buggy with other skills
    #lycan_summon_wolves not working fine with other heroes

    # remove comments from file (there's bug in _custom that some comments have only an single slash instead of double slash...
    clean.remove_comments('npc_abilities.txt', 'skills_list.tmp')

    kv = KeyValues()
    kv.load('skills_list.tmp')

    root = KeyValues('DOTASkills')
    rootUlti = KeyValues('DOTAUltimates')

    for skill in kv:
        skillkv = KeyValues()
        if 'ID' in kv[skill]:
            if skill not in banSkills:
                if not inPartial(skill, banStartsWith):
                    if "AbilityType" in kv[skill] and kv[skill][
                            "AbilityType"] == "DOTA_ABILITY_TYPE_ULTIMATE":
                        rootUlti[kv[skill]['ID']] = skill
Пример #5
0
from lib.keyvalues import KeyValues
from lib import clean
import abilities
import os

if __name__ == "__main__":

    # remove comments from file (there's bug in _custom that some comments have only an single slash instead of double slash...
    clean.remove_comments('item.txt', 'npc_abilities_override.tmp')

    kv = KeyValues()
    kv.load('npc_abilities_override.tmp')

    root = KeyValues('DOTAAbilities')

    for factor in abilitites.factors:
        for skill in kv:
            if skill in dont_parse:
                continue
            skillkv = KeyValues(skill)
            skillkv['BaseClass'] = skill

            for base in kv[skill]:
                base = str(base)
                if base != 'AbilitySpecial':
                    valueslist = kv[skill][base].strip().split(" ")
                    if base not in ignore_all_normal and str_to_type(
                            valueslist[0]) in (int, long, float, complex):
                        skillkv[base] = divide_or_multiply(
                            base, kv[skill][base], factor, " ")
                    else:
Пример #6
0
    'meepo_geostrike', 'brewmaster_fire_permanent_immolation', 'brewmaster_storm_wind_walk', 'brewmaster_storm_cyclone', 'brewmaster_earth_spell_immunity', 'brewmaster_earth_hurl_boulder',
    'lone_druid_spirit_bear_entangle', 'lone_druid_synergy', 'lycan_summon_wolves_invisibility', 'lycan_summon_wolves_critical_strike', 'doom_bringer_devour', 'broodmother_spawn_spiderlings',
    'night_stalker_darkness', 'night_stalker_hunter_in_the_night', 'enchantress_impetus', 'life_stealer_empty_4', 'life_stealer_empty_3', 'life_stealer_empty_2', 'life_stealer_empty_1', 'life_stealer_control',
    'life_stealer_consume', 'life_stealer_assimilate_eject', 'life_stealer_assimilate', 'dragon_knight_frost_breath', 'warlock_golem_permanent_immolation', 'warlock_golem_flaming_fists', 'sniper_take_aim',
    'riki_permanent_invisibility', 'puck_ethereal_jaunt', 'phantom_lancer_juxtapose', 'nevermore_shadowraze1', 'nevermore_shadowraze2', 'nevermore_shadowraze3', 'morphling_hybrid', 'drow_ranger_silence',
    'ability_deward', 'lone_druid_spirit_bear', 'shadow_demon_demonic_purge', 'tinker_rearm', 'lycan_summon_wolves', 'elder_titan_echo_stomp', 'shredder_chakram_2', 'tusk_ice_shards_stop', 'tusk_walrus_kick',
    'shoot_firework']

    banStartsWith = ['roshan_', 'greevil_', 'backdoor_', 'invoker_', 'earth_spirit_', 'cny', 'necronomicon_', 'abyssal_underlord_', 'earth_spirit_']

    #luna_eclipse disabled due crash issues
    #sandking_caustic_finale buggy with other skills
    #lycan_summon_wolves not working fine with other heroes

    # remove comments from file (there's bug in _custom that some comments have only an single slash instead of double slash...
    clean.remove_comments('npc_abilities.txt', 'skills_list.tmp')

    kv = KeyValues()
    kv.load('skills_list.tmp')

    root = KeyValues('DOTASkills')
    rootUlti = KeyValues('DOTAUltimates')

    for skill in kv:
        skillkv = KeyValues()
        if 'ID' in kv[skill]:
            if skill not in banSkills:
                if not inPartial(skill, banStartsWith):
                    if "AbilityType" in kv[skill] and kv[skill]["AbilityType"] == "DOTA_ABILITY_TYPE_ULTIMATE":
                        rootUlti[kv[skill]['ID']] = skill
                    else: