Skip to content

Instantly share code, notes, and snippets.

Avatar

Kayne Ruse Ratstail91

View GitHub Profile
View Card Dungeon.md

Rules

The goal of this card game is to explore a dungeon with your team of four adventurers. You are scored based on how much gold you gather before you can escape the dungoen. Each adventurer has 4 points of health; if an adventurer drops to 0 health, they die and are removed from the game; any gold they are carrying is also lost. The order of the characters is important, from left to right. Characters are also either on the front row or the back row. You can re-arrange the order and row of the active characters between events. If all characters are on the same row, it is the front row.

Cards have two halves, the top and bottom. The top half of a card represents an event that is happening (and sometimes a complication), while the bottom half has the actions that the player can take in reaction to the current event.

Each turn:

  • Begin each turn by shuffling the deck, then drawing one card; this is the event card. The event card remains in play until it says it is discarded.
  • Next, draw 5 cards; this i
View martintale.js
const pick = odds => {
const total = odds.reduce((a, b) => a + b); //total cards
const index = Math.random() * total; //card to choose
//NOTE: NOT using Math.floor(), as 'odds' can contain fractional values
//find the rarity slot that index falls into
let slot;
let running = index; //the running total, counting backwards
for (let i = 0; i < total; i++) {
View dice-dungeons.md

Dice Dungeons

The goal of the game is to defeat monsters, collect gold and escape the dungeon again to level up your avatar. Different avatars can have different effects on the game.

You have a set of 6-sided dice, levels 1-4 (4 each), each of which has a unique set of "crests" (symbols) on their sides. You also have a game board which is 13 square wide, and 19 squares deep. Finally, you have a set of eleven "nets", which are the unique unfolded forms of cubes which can be placed on the game board, see below. Nets have a "summon" point on them.

Gameplay

The game turn begins by rolling four dice of the same level (you can't roll the same level as the previous turn), and recording the number of each crest that was rolled (crests accumulate over turns, but you can only store up to 10 of each crest). If you roll two of the summon crest, then you place a net of your choice on the battlefield touching an existing net (or the starting square), and a monster of that dice level on that net's summon point, fa

View pokemon.js
const fetch = require('node-fetch');
const fs = require('fs');
const nameExceptions = ['ho-oh', 'porygon-z', 'jangmo-o', 'hakamo-o', 'kommo-o', 'mr-mime', 'mime-jr', 'type-null', 'tapu-lele', 'tapu-fini', 'tapu-koko', 'tapu-bulu'];
const collection = {};
(async () => {
const result = fetch('https://pokeapi.co/api/v2/pokemon?limit=100000')
.then(res => res.text())
.then(blob => JSON.parse(blob).results)
View AudioManager.cs
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AudioManager : MonoBehaviour {
//singleton
static AudioManager instance = null;
//internals
@Ratstail91
Ratstail91 / GDD.md
Last active Aug 27, 2020
The GDD for Chemistry
View GDD.md

Chemistry

Preamble

When creating our first game, Candy Raid: The Factory, we kept it deliberately simple since it was out first game. It was linear, straight forward and mechanically simple.

Chemistry (working title) instead takes the opposite approach - it is complex and multilayered, with many secrets and hidden game elements; that's the goal at least. This game design document is intended to outline a plan for ourselves, so that we're not blindly groping in the darkness.

The game is heavily inspired by the games The Legend of Zelda (1986), The Legend of Zelda: Breath of the Wild (2017), and the anime Made in Abyss (2017).

@Ratstail91
Ratstail91 / toy_reference.md
Last active Aug 12, 2020
Toy Language Version 0.4.0
View toy_reference.md

Toy Language

Version 0.4.0

Welcome to the reference for the Toy programming language!

I'm still developing this language and discovering all of it's incedental nooks and crannys, but hopefully the core of the language is solid enough that I can begin to teach people to use it. This guide on how to use the language will also double as the official documentation for the time being.

If you're familiar with JavaScript, you will see a lot of similarities. However, there are also differences that I hope will make my language stand out in time. I don't expect it to reach JavaScript's popularity, but I would like it to be useful.

@Ratstail91
Ratstail91 / InputLayer.cs
Created Jun 24, 2020
I hope the boss doesn't mind me sharing this file... wait, I am the boss!
View InputLayer.cs
using System;
using UnityEngine;
//DOCS: INPUT_KEYBOARD falls back to the legacy unity input system
//TODO: nintendo switch controls
public static class InputLayer {
//virtual inputs for Candy Raid
public enum Button {
ATTACK, SWITCH, PAUSE
View promise_shitpost.js
//10x programmers (this shitpost took a fucking hour, wtf):
const rl = require('readline').createInterface({
input: process.stdin, output: process.stdout
});
let table = {};
const q = (prompt, key) => () => new Promise(res => rl.question(prompt, answer => res(Object.assign(table, { [key]: answer })) ));
Promise.resolve()
.then(q('what is your name?', 'name'))
@Ratstail91
Ratstail91 / Untitled Card Game.md
Last active May 27, 2020
Rules for a legacy card game in progress.
View Untitled Card Game.md
You can’t perform that action at this time.