satori
satori is a tool that generates a Gensokyo-style spellcard fight purely randomly.
Usage
Clone this repository, and run main.py.
# Install dependencies
pip3 install tomlkit
# Clone and run
git clone https://github.com/Ravenclaw-OIer/satori
python3 satori/satori.py reimu marisa # change reimu and marisa to whoever you want
Rules
satori reads spellcard data from your mind characters.toml file.
Rounds
A spellcard fight is consisted of several rounds, it will continue until one of the players has her hp strictly lower than 0.
In each round, the following events happen in chronological order:
- A random number is generated between 0 and the
atkvalue of both players. This value is theatkvalue used for comparison in this round. - The one with the higher
atkvalue for this round will be the attacker. A spellcard is randomly picked from her spellcards. - A number is randomly picked between the two values specified in the spellcard's
harmfield. This is the harm (hp drop) caused by this spellcard. This value may be 0. - The harm is applied.
- If the spellcard comes with shields, hp boosts or atk boosts, it is applied.
- The round ends, if both player have their hp >= 0, return to step 1.
Spellcards
Each spellcard has the following fields:
name: a string, the name used to refer to the spellcard within the programdisplay_name: a string, the displayed name of the spellcard.
Contributing
You can contribute by
- Writing more spellcards
- Implementing complex spellcard behaviors
- Simply playing around and report bugs
Note
TOML sanity is not checked, so be extra careful with the format.
Sanity check will be implemented in a future release (at least I hope so)
Features I will implement some day (a.k.a to-do list)
- Complex spellcard trigger conditions
- Complex spellcard effects
- Chinese docs
License
This program is free software, you can redistribute it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3, or, at your option, any later version.
Touhou Project is Copyright(C) Team Shanghai Alice, usage of their IP should follow their guidelines
Release files for satori-gensokyo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| satori-gensokyo-0.1.0.tar.gz | 14.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| satori_gensokyo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.2 kB
Release files / satori-gensokyo-0.1.0.tar.gz
| Download URL | satori-gensokyo-0.1.0.tar.gz |
|---|---|
| Size | 14.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e2ebd7e13cbbe2aaac916e113ec5b2d72145455fe1f041dab750d6bb1b8331ba
|
|
BLAKE2b-256 checksum How to use checksums |
6e0eb3a882373dd560802e691cc1cf21da5ed94eabbd027367a8f4425d2fa051
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
|
Release files / satori_gensokyo-0.1.0-py3-none-any.whl
| Download URL | satori_gensokyo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
67522987ac0e095a0e30676855face06c8c264f5353463dd592befa321bd5a0d
|
|
BLAKE2b-256 checksum How to use checksums |
5c1a1c5aced5f0bc0d22cd4996561769f637504c7dd13876e0aeab25ee382cae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10
|