create account

python steemmonsters 0.0.15 - Several improvements and new features by holger80

View this thread on: hive.blogpeakd.comecency.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 (23)
authorholger80
permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features
categoryutopian-io
json_metadata"{"community": "busy", "app": "beempy/0.23.10", "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"], "canonical_url": "https://hive.blog/utopian-io/@holger80/python-steemmonsters-0-0-15-several-improvements-and-new-features"}"
created2018-11-02 15:24:06
last_update2020-05-23 14:45:15
depth0
children10
last_payout2018-11-09 15:24:06
cashout_time1969-12-31 23:59:59
total_payout_value102.888 HBD
curator_payout_value32.600 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,070
author_reputation358,857,509,568,825
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,549,245
net_rshares118,367,056,662,250
author_curate_reward""
vote details (146)
@coar ·
Can anybody write simple "hello world" python script to do one battle? Thanks a lot.
properties (22)
authorcoar
permlinkre-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20190619t141044190z
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.5.6","format":"markdown","tags":["utopian-io"],"users":[],"links":[],"image":[]}
created2019-06-19 14:10:48
last_update2019-06-19 14:10:48
depth1
children0
last_payout2019-06-26 14:10:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length84
author_reputation4,231,602,317,552
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id86,915,336
net_rshares0
@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 (23)
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"}
created2018-11-05 01:05:48
last_update2018-11-05 01:05:48
depth1
children1
last_payout2018-11-12 01:05:48
cashout_time1969-12-31 23:59:59
total_payout_value7.146 HBD
curator_payout_value2.298 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length709
author_reputation121,547,934,535,311
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,691,396
net_rshares8,472,062,342,959
author_curate_reward""
vote details (10)
@utopian-io ·
Thank you for your review, @helo! Keep up the good work!
properties (22)
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"}"
created2018-11-07 18:07:27
last_update2018-11-07 18:07:27
depth2
children0
last_payout2018-11-14 18:07:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length56
author_reputation152,955,367,999,756
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,867,791
net_rshares0
@khan.dayyanz ·
Wow great, How to use it?
properties (22)
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"}
created2018-11-03 07:22:39
last_update2018-11-03 07:22:39
depth1
children0
last_payout2018-11-10 07:22:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation19,542,110,558,395
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,587,085
net_rshares0
@mys ·
Give that man a medal.
properties (22)
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":[]}
created2018-11-02 19:42:09
last_update2018-11-02 19:42:09
depth1
children0
last_payout2018-11-09 19:42:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length22
author_reputation14,948,575,541,320
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,561,276
net_rshares0
@nealmcspadden ·
What are the :1 :2 :3 modifiers on the addteam command?
πŸ‘  
properties (23)
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"}
created2018-11-02 20:40:24
last_update2018-11-02 20:40:24
depth1
children0
last_payout2018-11-09 20:40:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length55
author_reputation297,254,610,598,546
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,563,761
net_rshares275,909,415
author_curate_reward""
vote details (1)
@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 (22)
authorsteem-plus
permlinkpython-steemmonsters-0-0-15-several-improvements-and-new-features---vote-steemplus
categoryutopian-io
json_metadata{}
created2018-11-03 09:08:45
last_update2018-11-03 09:08:45
depth1
children0
last_payout2018-11-10 09:08:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length435
author_reputation247,952,188,232,400
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,590,933
net_rshares0
@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 (22)
authorsteem-ua
permlinkre-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181103t013822z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-11-03 01:38:24
last_update2018-11-03 01:38:24
depth1
children0
last_payout2018-11-10 01:38:24
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length661
author_reputation23,214,230,978,060
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,575,254
net_rshares0
@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 (22)
authortravoved
permlinktravoved-re-holger80-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181102t181033494z
categoryutopian-io
json_metadata{"app":"partiko"}
created2018-11-02 18:10:36
last_update2018-11-02 18:10:36
depth1
children0
last_payout2018-11-09 18:10:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length223
author_reputation48,889,279,528,990
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,557,435
net_rshares0
@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 (22)
authorutopian-io
permlinkre-python-steemmonsters-0-0-15-several-improvements-and-new-features-20181105t222031z
categoryutopian-io
json_metadata"{"app": "beem/0.20.9"}"
created2018-11-05 22:20:33
last_update2018-11-05 22:20:33
depth1
children0
last_payout2018-11-12 22:20:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length590
author_reputation152,955,367,999,756
root_title"python steemmonsters 0.0.15 - Several improvements and new features"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id74,749,548
net_rshares0