Skip to content

Instantly share code, notes, and snippets.

View Ratstail91's full-sized avatar
💭
Back in my day, we didn't need no AI.

Kayne Ruse Ratstail91

💭
Back in my day, we didn't need no AI.
View GitHub Profile
//contents based on the type of the tile
public enum DungeonContent {
EMPTY = 0, STAIRS_UP, STAIRS_DOWN, SPAWN_MONSTER, SPAWN_TREASURE
};
import pool from '../utilities/database';
import { log } from '../utilities/logging';
import { determineSelectedCreature, getYourCreatures } from '../reusable';
import speciesIndex from '../gameplay/species.json';
export const apiYourCreaturesBreed = (req, res) => {
//handle all outcomes
const info = tasks.map( x => x.infos );
@Ratstail91
Ratstail91 / api.txt
Created April 8, 2021 17:53
potential public api for egg trainer
# Every route is a GET and HEAD route
# global "last updated" data can be fetched from here
/stat/v1
# potential utility routes
/stat/v1/shop*
/stat/v1/battle*
# return entire type graph
# Every route is a GET and HEAD route
# All data is returned in JSON format
#########################
# global "last updated" data can be fetched from here
/stat/v1
# potential utility routes
/stat/v1/shop*

API

This api can be tested with curl like this:

curl https://mock.eggtrainer.com/stat/v1/<route>
# Every route is a GET and HEAD route
@Ratstail91
Ratstail91 / _fighting-card-game.md
Last active February 19, 2022 13:27
I'm sketching out the basics of a fighting card game. All comments and critiques are welcome.

Preamble

The intent of this game is to mimic traditional fighting games as closely as possible, while also being fun and engaging.

Winning the Game

Each player begins the game with 100 HP (The maximum you can have). The goal of the game is to reduce your opponent's HP to 0 or below.

Setup

{
"version": 0,
"faction": "necrons",
"units": {
"warrior": {
"role": "troops",
"warrior": {
"minimum": 10,
"maximum": 20
/* global defaults */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body, #root {
min-width: 100%;
min-height: 100%;

Dual Wielding Cards

The goal of the game is to reduce your opponent's health to zero, from it's starting total of 20.

Each player begins with a deck of 40 cards - each card has a maximum number of copies allowed in a deck. Each card has three main sections: a "top zone", a "bottom zone", and an "initiative" (a number). The players begin the game by drawing up to their maximum hand size (5 cards).

On each turn, both players select two cards from their hand and places it face down in front of them; they then simultaneously turn all cards face up, and the player with the highest single initiative value on the board is the first to act.

The first player chooses the top zone of one card, and the bottom zone of the other - the effects in each selected zone take effect this turn (starting from the selected top zone). The second player then follows suit.