python steemmonsters 0.0.15 - Several improvements and new features

Repository

https://github.com/holgern/steemmonsters

steemmonsters is a python command line tool for playing steemmonsters without graphics. The newest version 0.0.15 can be downloaded here.

New API comands

get_purchases_status returns information about a purchased card pack:

1
2
3
from steemmonsters.api import Api
api = Api()
api.get_purchases_status("P-DTQ5OEKIVK")

get_player_quests returns information about the quest:

1
2
3
from steemmonsters.api import Api
api = Api()
api.get_player_quests("holger80")

get_purchases_stats returns how many packs were purchased:

1
2
3
4
>>> from steemmonsters.api import Api
>>> api = Api()
>>> api.get_purchases_stats()
{'packs': [{'edition': 0, 'qty': '300000'}, {'edition': 1, 'qty': '181059'}]}

api.settings() shows the current games settings.

api.players_leaderboard() shows the leaderboard.

get_player_login returns the encrypted token for login:

1
2
3
from steemmonsters.api import Api
api = Api()
api.get_player_login("holger80")

player_save_team( name, team, player, token, mana_cap) can be used to store a new team, which then also available in the homepage. token is the decrypted token using the posting key from the get_player_login call.

player_delete_team(name, player, token, mana_cap) deletes deck name.

get_player_saved_teams(player, token, mana_cap) returns all saved teams.

get_player_teams_last_used(player, mana_cap) returns the last used team of a player.

get_battle_history(player="%24top") gets the last top battles. When settings player=holger80 the last battles of the player are returned instead.

New Commands

image.png

addteam

1
addteam  water_test Alric Stormbringer:2, Frost Giant:1, Spineback Turtle:2, Pirate Captain:3, Crustacean King:3

or

1
addteam  water_test Alric Stormbringer, Frost Giant, Spineback Turtle, Pirate Captain, Crustacean King

adds the water_test team. The stored team can then be used for play:

1
play water_test

image.png

The team is also stored in the steemmonsters.com homepage:
image.png

The token for modifing teams is decrypted by:

1
2
3
4
5
6
7
8
from beembase import memo as BtsMemo
from beemgraphenebase.account import PrivateKey
from steemmonsters.api import Api

api = Api()
response = api.get_player_login("holger80")
wif = "5xxx" # posting key
token = BtsMemo.decode_memo(PrivateKey(wif), response["token"]).replace('\n', '')

deleleteam

1
deleteteam water_test

removes a stored team.

copyteam

1
copyteam clove71 test1

copies the last played team from clove71 and stores is as test1

team

1
team test1

shows a stored team

lastteam

1
lastteam

or

1
lastteam clove71

shows the last played team

copytopteam

Is the same command, but instead of a player name, the top100 position is used.

1
copytopteam 4 test2

stores the last team from the top 4 player as test2

lasttopteam

1
lasttopteam 4

shows the last played team from top 4 player

savedteams

1
savedteams

shows all saved teams

startquest

1
2
3
sm> startquest
sm_start_quest broadcasted!
You have to solve the Stir the Volcano quest

can be used to start a new quest. In this example, 10 games using a fire deck will solve the quest.

claimquest

When a quest is solved, this command can b e used to claim the reward.

conflict

Shows the current conflict

play

play can now be used with stored teams from the homepage. At first the json is checked and when there is no such team, the stored teams are checked. When a team with the given name is found, it is used. play random works only with decks stored in the json file.

mana_cap and ruleset must not be defined in the json file, it is now fetched on startup.

Commit history

More commands added

  • commit 913b1577

  • conflict - shows the currect conflict

  • team - shows a stored team

  • player - shows the information about the player

  • lasttopteam - shows the last played team

  • copytopteam - copies the last played team

    Merged changes from #7 manually

  • commit 18af8ed

    Release 0.0.15

  • commit acc7bc6

    Add api calls and improve stream and play

  • commit 534cc06

    New api calls added:

  • get_purchases_status

  • get_player_quests

  • quest command added for showing the current player quest

  • stream fixed

  • play improved

GitHub Account

https://github.com/holgern