Skip to content

Instantly share code, notes, and snippets.

Kayne Ruse Ratstail91

Block or report user

Report or block Ratstail91

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View story cards 2.md

Urchins I

There are mysterious ruins just outside the Capitol, where kids sometimes go to play, despite their parents forbidding them. One of your duties is to ensure that nobody ventures inside, for their own safety. During one of your rounds, you stumble across a small temple of some sort. On the altar is a small but beautifully crafted bracelet. What do you do?

A. Take it.
B. Leave it alone.

A. After a quick look around the temple, you decide to take the bracelet for yourself. Nobody will miss it.

Shuffle card X [Urchins II] into the deck.

View Story Cards.md

Outline

This is a game where a randomized story is told by a deck of cards. The front face of a card has a short snippet of text followed by an A/B choice, while the back face of the card reveals the results of that choice. Some results might include shuffling new cards into the deck, gaining an achievement or gaining or losing a point of reputation, which will impact the effect of other cards when they are drawn.

Urchins I

There are mysterious ruins just outside the Capitol, where kids sometimes go to play, despite their parents forbidding them. One of your duties is to ensure that nobody ventures inside, for their own safety. During one of your rounds, you see a doorway that you hadn’t previously noticed. What do you do? Take a peek. Leave it alone.

A. Down a long corridor, you find yourself in an old temple of some sort. On the altar is a small but beautifully crafted bracelet. You decide to take it for yourself, as nobody would miss it.

@Ratstail91
Ratstail91 / stockmarket.js
Created Oct 24, 2019
An example API for interacting with a stock market trading game.
View stockmarket.js
//the tickers of different businesses
const APPL = 'APPL'; //Applied Phlebotinum League
const MSFT = 'MSFT'; //Mattress Surfer's Team Assiciation
const LNUX = 'LNUX'; //Let's Not Use Experts
const OK = 0;
const ERR_NOT_ENOUGH_MONEY = -1;
const ERR_NOT_ENOUGH_STOCK = -2;
const FIRE_CEO = 1;
View card game idea.md

Card types:

  • Base Summon Card (1 cost, empty summon, 1 HP by default)

  • Base Weapon Card (1 cost, empty weapon, 1 ATK by default)

  • Base Spell Card (1 cost, empty spell, does nothing)

  • Summon Modifier Card (applies new text to a summon)

  • Weapon Modifier Card (applies new text to a weapon)

  • Spell Modifier Card (apploes new text to a spell)

View EnemyController.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyController : MonoBehaviour {
//structures
enum Direction {
UP, LEFT, RIGHT, DOWN,
};
View audiodata.cs
//good for preventing duplicated code
[System.Serializable]
struct AudioData {
public string name;
public AudioSource source;
//other data, such as modulation
}
public List<AudioData> audioList = new audioList<AudioData>();
@Ratstail91
Ratstail91 / recursion.toy
Created Aug 14, 2019
My interpreter is currently a bit... inconsistent.
View recursion.toy
/* stack overflow, as expected
var counter = 0;
const recursion = () => {
print ++counter;
recursion();
};
recursion();
*/
@Ratstail91
Ratstail91 / CameraController.cs
Created Aug 3, 2019
My attempt at camera shake - didn't work.
View CameraController.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CameraController : MonoBehaviour {
[SerializeField]
GameObject target;
[SerializeField]
float lerpSpeed = 2f;
View role.scout.js
const { roleLength } = require('utils');
const ROLE_NAME = 'scout';
function spawn(origin, max, roleName, type = 'small') {
if (roleLength(Game.creeps, roleName, origin) >= max) {
return;
}
//determine the size to use
View example.newlang
#comments begin with a pound sign
#The script automatically calls the function "main" after loading it
#this is how you declare a function called "main"
START main:
#do stuff
END #all functions finish with END
#this is how you write a function with arguments
You can’t perform that action at this time.