In [2]:
from atod import Hero, Heroes

In [3]:
# create a hero. The same can be done with Hero.from_name('Anti-Mage')
am = Hero(1)
# get laninng info.
# Note that laning, roles and hero type are read from the game files and sometimes can be strange.
print(am.get_laning_info())


ProvidesBabysit    0
ProvidesSetup      0
RequiresBabysit    2
RequiresFarm       2
RequiresSetup      1
SoloDesire         1
SurvivalRating     2
dtype: int64

In [4]:
# TODO: class methods to get list of columns which represent type, role and laning.
am.get_roles()


Out[4]:
Disabler     0
Nuker        1
Escape       3
Durable      0
Initiator    0
Pusher       0
Support      0
Jungler      0
Carry        3
dtype: object

In [5]:
am.get_hero_type()


Out[5]:
ganker          0
hard_carry      1
nuker           0
pure_support    0
push_support    0
semi_carry      0
stun_support    0
tank            0
dtype: int64

In [12]:
# You can use attributes to get some hero properties which depends on lvl, examples:
print('Anti-Mage stats on lvl {}'.format(am.lvl))
print('\tstrength   = {}'.format(am.str))
print('\tagility    = {}'.format(am.agi))
print('\tintellect  = {}'.format(am.int))
print('\t...')


Anti-Mage stats on lvl 1
	strength   = 22
	agility    = 22
	intellect  = 15
	...

In [13]:
# Also you can get all the specs. This is the dictionary with a lot of parameters.
print(am.specs)


{'RequiresSetup': 1, 'AttributeIntelligenceGain': 1.8, 'HeroType': 'DOTA_BOT_HARD_CARRY', 'AttributeBaseStrength': 22, 'AttackDamageMin': 27, 'AttributeStrengthGain': 1.2, 'ProvidesBabysit': 0, 'SurvivalRating': 2, 'AttributeBaseIntelligence': 15, 'AttributePrimary': 'DOTA_ATTRIBUTE_AGILITY', 'AttackAcquisitionRange': 600, 'ProvidesSetup': 0, 'MovementTurnRate': 0.5, 'Role': 'Carry,Escape,Nuker', 'RequiresBabysit': 2, 'AttackRate': 1.45, 'Rolelevels': '3,3,1', 'AttributeBaseAgility': 22, 'aliases': 'am', 'AttackDamageMax': 31, 'SoloDesire': 1, 'MovementSpeed': 315, 'AttackCapabilities': 'DOTA_UNIT_CAP_MELEE_ATTACK', 'HeroID': 1, 'AttackRange': 150, 'RequiresFarm': 2, 'ArmorPhysical': -1.0, 'in_game_name': 'antimage', 'AttackAnimationPoint': 0.3, 'Team': 'Good', 'AttributeAgilityGain': 2.8}

In [14]:
# Description contain not only information about the hero, 
# but also about its abilities. Abilities info represented by an
# abstraction -- labels. They show what ability does and how.
# All labels keys in the description starts with 'label_'.
am.get_description()


Out[14]:
ArmorPhysical                                        -1
AttackAcquisitionRange                              600
AttackAnimationPoint                                0.3
AttackCapabilities           DOTA_UNIT_CAP_MELEE_ATTACK
AttackDamageMax                                      31
AttackDamageMin                                      27
AttackRange                                         150
AttackRate                                         1.45
AttributeAgilityGain                                2.8
AttributeBaseAgility                                 22
AttributeBaseIntelligence                            15
AttributeBaseStrength                                22
AttributeIntelligenceGain                           1.8
AttributePrimary                 DOTA_ATTRIBUTE_AGILITY
AttributeStrengthGain                               1.2
HeroID                                                1
HeroType                            DOTA_BOT_HARD_CARRY
MovementSpeed                                       315
MovementTurnRate                                    0.5
ProvidesBabysit                                       0
ProvidesSetup                                         0
RequiresBabysit                                       2
RequiresFarm                                          2
RequiresSetup                                         1
Role                                 Carry,Escape,Nuker
Rolelevels                                        3,3,1
SoloDesire                                            1
SurvivalRating                                        2
Team                                               Good
aliases                                              am
                                        ...            
label_attack_debuff                                   0
label_attribute_gain                                  1
label_based_on_attr                                   0
label_chance                                          0
label_daytime_dependent                               0
label_durability                                      1
label_escape                                          1
label_global                                          0
label_heal                                            0
label_illusions                                       0
label_in_percents                                     0
label_invis                                           0
label_lifesteal                                       0
label_move_speed_buff                                 0
label_multiply_heroes                                 0
label_non_hero                                        0
label_nuke                                            1
label_period_damage                                   0
label_purge                                           0
label_regen                                           0
label_save                                            0
label_shield                                          0
label_silence                                         0
label_slow                                            0
label_stacks                                          0
label_stun                                            2
label_summon_unit                                     0
label_transformation                                  0
label_vision                                          0
name                                          Anti-Mage
dtype: object

In [ ]: