Code Monkey home page Code Monkey logo

satori's Introduction

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:

  1. A random number is generated between 0 and the atk value of both players. This value is the atk value used for comparison in this round.
  2. The one with the higher atk value for this round will be the attacker. A spellcard is randomly picked from her spellcards.
  3. A number is randomly picked between the two values specified in the spellcard's harm field. This is the harm (hp drop) caused by this spellcard. This value may be 0.
  4. The harm is applied.
  5. If the spellcard comes with shields, hp boosts or atk boosts, it is applied.
  6. 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 program
  • display_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

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.

satori's People

Contributors

shizuhaaki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.