An auto battling Pokémon cli game
Project description
Pokemon YEET
An auto battling Pokémon cli game.
This game was created as part of the 2021 MASTERMND deCoded Journey sofware bootcamp:
Install
This game is built with Python, which has installation instructions here.
Download the game with pip:
pip install --user -U pokemon-yeet-2ndbillingcycle
Installation error
If pip returns an error like the following:
...
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-h6qzslht/setup.py'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-h6qzslht/
pip is out of date, and needs to be updated:
pip install --user --upgrade pip
Play
With the game installed, run the command pokemon to play:
$ pokemon
Creating pokemon directory...
Importing Pokemon....
...
Game is Setup and Ready to begin
get ready, now recruiting your team of pokemon!
team selected! meet your new team
victreebel: HP: 80 TYPE: grass
mr-mime: HP: 40 TYPE: psychic
clefable: HP: 95 TYPE: fairy
now recruiting the enemy team!
team selected! meet your enemies!
doduo: HP: 35 TYPE: normal
nidorina: HP: 70 TYPE: poison
krabby: HP: 30 TYPE: water
PREPARE TO FIGHT!!!!!
victreebel attacked with scratch and it did 35 damage
doduo: HP: 0 TYPE: normal
doduo has FAINTED
doduo: HP: 0 TYPE: normal
THE SCORE IS: ME:1 ENEMY:0
mr-mime attacked with scratch and it did 35 damage
nidorina: HP: 35 TYPE: poison
nidorina attacked with scratch and it did 35 damage
mr-mime: HP: 5 TYPE: psychic
mr-mime attacked with leer and it did 20 damage
nidorina: HP: 15 TYPE: poison
nidorina attacked with cut and it did 25 damage
mr-mime: HP: -20 TYPE: psychic
mr-mime has FAINTED
mr-mime: HP: -20 TYPE: psychic
THE SCORE IS: ME:1 ENEMY:1
clefable attacked with cut and it did 25 damage
krabby: HP: 5 TYPE: water
krabby attacked with scratch and it did 35 damage
clefable: HP: 60 TYPE: fairy
clefable attacked with cut and it did 25 damage
krabby: HP: -20 TYPE: water
krabby has FAINTED
krabby: HP: -20 TYPE: water
THE SCORE IS: ME:2 ENEMY:1
WE WON HAHAHAHAHAHAHAHAHAHAHAHA
note: running pokemon will create a directory called pokemon/ to store information about Pokémon
Development
This repository can be downloaded with git (a mastermndio video about git). Once that's done, create a virtual environment in the same directory:
python -m venv venv
note: depending on how Python was installed, python may be python3, and venv may need to be downloaded separately (e.g. as python3-venv)
This creates a directory called venv in the current directory.
Then, activate the virtual environment. On Linux, this looks like:
. venv/bin/activate
Make sure pip inside the virtual environment is up to date:
pip install --upgrade pip
Then, install the game in the virtual environment:
pip install ./
And you're ready to go! Change some files, re-install, and run again!
Packaging
Flit is used to package and upload the game.
To upload your own version, change the information in [pyproject.toml][flit pyproject.toml]:
dist-name: replace2ndbillingcyclewith your usernameauthor: your nameauthor-email: your emailhome-page: either put the link to your GitHub fork, or remove this line
Then, install Flit and build the distribution files. With the virtual environment activated:
pip install --upgrade flit
python -m flit build
Then, follow the official Python packaging guide for uploading the package to the Test Python Package Index.
Alternatively, you can [create an API token on PyPI with a scope for "Entire account"][api token], and run flit publish, pasting the created API token for the password.
API dependencies
This game uses https://pokeapi.co/ to get information about Pokémon.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pokemon-yeet-2ndbillingcycle-0.0.5.tar.gz.
File metadata
- Download URL: pokemon-yeet-2ndbillingcycle-0.0.5.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bb329bed720ef9babdd6d3c80d70bd4e99bbdf5121d5c86b998f3f2b8f22230
|
|
| MD5 |
b82a04cfc52845a244483da6e670ec30
|
|
| BLAKE2b-256 |
479ad0694d1a2d71e97122d4506119dab78daa17828a952256f45de32c22e617
|
File details
Details for the file pokemon_yeet_2ndbillingcycle-0.0.5-py3-none-any.whl.
File metadata
- Download URL: pokemon_yeet_2ndbillingcycle-0.0.5-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.25.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c33593dd98cb28c0a6bf57c8768252b3df974e37dac42d39c57de435046fa21
|
|
| MD5 |
e99686c7eccd18b27866b75d8859313f
|
|
| BLAKE2b-256 |
cf5f5be0bda760f726c3e64996d556d0368e6db07c63df69ba654c3e79aa617b
|