create account

python steemmonsters 0.0.15 - Several improvements and new features by holger80

View this thread on steemit.com
· @holger80 · (edited)
$135.49
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](https://github.com/holgern/steemmonsters/releases).

## New API comands
`get_purchases_status` returns information about a purchased card pack:
```
from steemmonsters.api import Api
api = Api()
api.get_purchases_status("P-DTQ5OEKIVK")
```

`get_player_quests` returns information about the quest:
```
from steemmonsters.api import Api
api = Api()
api.get_player_quests("holger80")
```

`get_purchases_stats` returns how many packs were purchased:
```
>>> 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:
```
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](https://ipfs.busy.org/ipfs/QmSmgBrJHwB6QDCqJ3YDbLoxgVgmc2ft3HQMuGDAPrqcS6)

### addteam
```
addteam  water_test Alric Stormbringer:2, Frost Giant:1, Spineback Turtle:2, Pirate Captain:3, Crustacean King:3
```
or
```
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:
```
play water_test
```

![image.png](https://ipfs.busy.org/ipfs/QmTren5kpQhdWP1kuXiHoyhCm9fqxpg6j9Lsg3n8zCEX8p)

The team is also stored in the steemmonsters.com homepage:
![image.png](https://ipfs.busy.org/ipfs/QmZQJRCtaZiJKE952t82WDtCRrU32DZyZvE39zb7K2hTdX)

The token for modifing teams is decrypted by:
```
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
```
deleteteam water_test
```
removes a stored team.

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

### team
```
team test1
```
shows a stored team

### lastteam
```
lastteam
```
or 
```
lastteam clove71
```
shows the last played team

### copytopteam
Is the same command, but instead of a player name, the top100 position is used.
```
copytopteam 4 test2
```
stores the last team from the top 4 player as test2

### lasttopteam
```
lasttopteam 4
```
shows the last played team from top 4 player

### savedteams
```
savedteams
```
shows all saved teams

### startquest
```
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](https://github.com/holgern/steemmonsters/commit/913b1577f65cddb271257460177bf2c7bb7e7ca6)
* conflict - shows the currect conflict
* team <name> - shows a stored team
* player - shows the information about the player
* lasttopteam <nr> - shows the last played team
* copytopteam <nr> <new_deck_name> - copies the last played team
### Merged changes from #7 manually
* [commit 18af8ed](https://github.com/holgern/steemmonsters/commit/18af8ed6c0582f4283afc2cbcbcebc7fc55dab9c)
### Release 0.0.15
* [commit acc7bc6](https://github.com/holgern/steemmonsters/commit/acc7bc68721526fb16a527e0f4d06f3c5ba2b29d)
### Add api calls and improve stream and play
* [commit 534cc06](https://github.com/holgern/steemmonsters/commit/534cc06f58fb1f25829206775b055c74dbc11942)
#### 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
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 81 others
πŸ‘Ž  
properties (37)
authorholger80
permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["utopian-io","development","steemmonsters","steemtank","busy"],"users":[],"links":["https://github.com/holgern/steemmonsters","https://github.com/holgern/steemmonsters/releases","https://github.com/holgern/steemmonsters/commit/913b1577f65cddb271257460177bf2c7bb7e7ca6","https://github.com/holgern/steemmonsters/commit/18af8ed6c0582f4283afc2cbcbcebc7fc55dab9c","https://github.com/holgern/steemmonsters/commit/acc7bc68721526fb16a527e0f4d06f3c5ba2b29d","https://github.com/holgern/steemmonsters/commit/534cc06f58fb1f25829206775b055c74dbc11942","https://github.com/holgern"],"image":["https://ipfs.busy.org/ipfs/QmSmgBrJHwB6QDCqJ3YDbLoxgVgmc2ft3HQMuGDAPrqcS6","https://ipfs.busy.org/ipfs/QmTren5kpQhdWP1kuXiHoyhCm9fqxpg6j9Lsg3n8zCEX8p","https://ipfs.busy.org/ipfs/QmZQJRCtaZiJKE952t82WDtCRrU32DZyZvE39zb7K2hTdX"]}
last_update2018-11-02 15:28:30
created2018-11-02 15:24:06
active2018-11-07 18:07:27
last_payout2018-11-09 15:24:06
depth0
children9
net_rshares0
vote_rshares0
children_abs_rshares2,516,892,457
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value102.888 SBD
curator_payout_value32.600 SBD
author_rewards130,239
net_votes144
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation54,844,335,177,318
promoted0.000 SBD
body_length0
reblogged_by[]
author_curate_reward""
vote details (146)
@travoved ·
It seems very interesting. I think it can be interesting for people to watch how to play without graphics. Maybe you make live stream once in next time? 

Posted using [Partiko Android](https://steemit.com/@partiko-android)
properties (36)
authortravoved
permlinktravoved-re-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181102t181033494z
categoryutopian-io
json_metadata{"app":"partiko"}
last_update2018-11-02 18:10:36
created2018-11-02 18:10:36
active2018-11-02 18:10:36
last_payout2018-11-09 18:10:36
depth1
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes0
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation2,869,474,812,246
promoted0.000 SBD
body_length0
reblogged_by[]
@mys ·
Give that man a medal.
properties (36)
authormys
permlinkre-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181102t194206712z
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["utopian-io"],"users":[],"links":[],"image":[]}
last_update2018-11-02 19:42:09
created2018-11-02 19:42:09
active2018-11-02 19:42:09
last_payout2018-11-09 19:42:09
depth1
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes0
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation12,735,747,337,763
promoted0.000 SBD
body_length0
reblogged_by[]
@nealmcspadden ·
What are the :1 :2 :3 modifiers on the addteam command?
πŸ‘  
properties (37)
authornealmcspadden
permlinkre-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181102t204022873z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
last_update2018-11-02 20:40:24
created2018-11-02 20:40:24
active2018-11-02 20:40:24
last_payout2018-11-09 20:40:24
depth1
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes1
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation33,657,472,968,699
promoted0.000 SBD
body_length0
reblogged_by[]
author_curate_reward""
vote details (1)
@steem-ua ·
#### Hi @holger80!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your **UA** account score is currently 7.219 which ranks you at **#71** across all Steem accounts.
Your rank has improved 1 places in the last three days (old rank 72).

In our last Algorithmic Curation Round, consisting of 275 contributions, your post is ranked at **#18**.
##### Evaluation of your UA score:

* Your follower network is great!
* The readers appreciate your great work!
* You have already shown user engagement, try to improve it further.


**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (36)
authorsteem-ua
permlinkre-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181103t013822z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
last_update2018-11-03 01:38:24
created2018-11-03 01:38:24
active2018-11-03 01:38:24
last_payout2018-11-10 01:38:24
depth1
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes0
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation18,877,194,417,287
promoted0.000 SBD
body_length0
reblogged_by[]
@khan.dayyanz ·
Wow great, How to use it?
properties (36)
authorkhan.dayyanz
permlinkre-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181103t072240749z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
last_update2018-11-03 07:22:39
created2018-11-03 07:22:39
active2018-11-03 07:22:39
last_payout2018-11-10 07:22:39
depth1
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes0
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation863,178,807,244
promoted0.000 SBD
body_length0
reblogged_by[]
@steem-plus ·
SteemPlus upvote
Hi, @holger80!

You just got a **1.41%** upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in [here](https://steemit.com/@steem-plus) to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.
properties (36)
authorsteem-plus
permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features---vote-steemplus
categoryutopian-io
json_metadata{}
last_update2018-11-03 09:08:45
created2018-11-03 09:08:45
active2018-11-03 09:08:45
last_payout2018-11-10 09:08:45
depth1
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes0
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation80,532,992,636,575
promoted0.000 SBD
body_length0
reblogged_by[]
@helo ·
$9.44
- Great post showing the commands that are implemented in this article.
- Good graphics of the expected shell UI.
- Lots of work with great commits messages.
- Could not find one new line of comments!  Maybe next time.

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/1111114).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , , , , , , , , ,
properties (37)
authorhelo
permlinkre-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181105t010548091z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/1111114","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
last_update2018-11-05 01:05:48
created2018-11-05 01:05:48
active2018-11-07 18:07:27
last_payout2018-11-12 01:05:48
depth1
children1
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value7.146 SBD
curator_payout_value2.298 SBD
author_rewards9,367
net_votes10
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation37,680,162,221,340
promoted0.000 SBD
body_length0
reblogged_by[]
author_curate_reward""
vote details (10)
@utopian-io ·
Thank you for your review, @helo! Keep up the good work!
properties (36)
authorutopian-io
permlinkre-re-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181105t010548091z-20181107t180726z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
last_update2018-11-07 18:07:27
created2018-11-07 18:07:27
active2018-11-07 18:07:27
last_payout2018-11-14 18:07:27
depth2
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes0
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation114,505,528,095,173
promoted0.000 SBD
body_length0
reblogged_by[]
@utopian-io ·
Hey, @holger80!

**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
properties (36)
authorutopian-io
permlinkre-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181105t222031z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
last_update2018-11-05 22:20:33
created2018-11-05 22:20:33
active2018-11-05 22:20:33
last_payout2018-11-12 22:20:33
depth1
children0
net_rshares0
vote_rshares0
children_abs_rshares0
cashout_time1969-12-31 23:59:59
max_cashout_time1969-12-31 23:59:59
total_vote_weight0
reward_weight10,000
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
author_rewards0
net_votes0
root_authorholger80
root_permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
allow_repliestrue
allow_votestrue
allow_curation_rewardstrue
beneficiaries[]
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
pending_payout_value0.000 SBD
total_pending_payout_value0.000 STEEM
author_reputation114,505,528,095,173
promoted0.000 SBD
body_length0
reblogged_by[]