Skip to content

xu001186/hs_mercenaries_bot

Repository files navigation

How to start?

  1. Install the python
  2. Ensure the hearthstone is running in full screen.
  3. Ensure the hearthstone is running in 1920*1080 resolution Capture
  4. Pre-build your mercenary collection .
  5. Open the config.py , update the spells , bounty_no and mercenary_collection base on What the order number means section.
# the mercernaries pickup order, in this case, the card 1,2 and 3 are picked.
mercenaries = [1,2,3]
# the spell order , in this case ,the card1 ,card2 and card3 are using the spell1 in the first round ,
# in 2nd round the card1 is using the spell 3, and card 2 is using spell 2 and the card 3 is using the spell 2 . 
# in 3rd round , the card1 ,card2 and card3 are using the spell 1 , and so on.  
spells = [[1,1,1],[2,3,3]]
# the bounty selection order, in this case , the 5th bounty is selected.
bounty_no = 5
# the mercenary collection selection order, in this case , the 3rd collection is selected
mercenary_collection = 3
# whether the bot traverses the map to find the mysterious vistor
is_path_to_mysterious = True
# Is the bot starts from bounty selection
start_from_bounty = True
  1. Click into the Bountries selection page.
  2. Run python start.py

What the order number means?

The bot numbers the mercenary collections , bountry , mercenaries and spells for the user to easily to use them

  • The mercenary collections are numbered from left to right , from top to bottom list_bounties_20211107205634
  • The Bountries are numbered from left to right , from top to bottom list_bounties_20211107205817
  • The mercenaries are numbered from left to right, but you need to find them position from the battle field , it can be changed sometimes . list_allow_move_cards_20211107210847
  • Check your mercenary spell order , they are numbered from left to right. hsv_contour_final_20211107211336

How does auto-path mysterious work?

  • The bot traverses the map to find the mysterious vistor , and get its (x,y) location
  • The bot reorder the move locations based on abs(its(x_axis) - mercenary(x_axis)) ascending order .
  • There is no guarantee that the mysterious vistor will be reached, but it provides the greatest possibility

Support

  • 1920 * 1080 - FULL SCREEN - ENG

KNOWN ISSUE

  • The bot will stops working if the any of mercenary is died. (FIXED)

Todo:

  1. Once the rewards are collected , re-choose the boss and start over . (Done)
  2. Refine the battle spell choose.
  3. Auto find the path to mysterious (DONE)
  4. Selective mercenary to pick the mysterious task.

Update History

Update 2021/11/12.

  • Add config
  • Rewrite the list_map_moves
  • Add test cases

Update 2021/11/11.

  • Update feature match to make it's more accurate

Update 2021/11/11.

  • Update HSBattleBot to fix the known issue 1)
  • Update HSMapBot to support the auto path to mysterious

Update 2021/11/10.

  • Fix bugs
  • Update find_mysterious
  • Update mysterious.PNG
  • Update map begin ,end and scoll templates
  • Add find_mysterious_position function to hsmap_bot

Update 2021/11/9.

  • Fix bugs
  • Update list_allow_move_cards
  • Update _hsv_contour

Update 2021/11/7.

  • Fix bugs
  • Release alpha version

Updated 2021/11/6

  • Fix bugs
  • code refactoring
  • Added more unit test cases

Updated 2021/11/5

  • Added the bounties detection
  • Added the mercenary collections detection
  • Rewrite the list_allow_spell_cards method to make it's more accurate
  • Add unit test cases
  • code refactoring