Skip to content

Instantly share code, notes, and snippets.

View MathyFurret's full-sized avatar

Alex "Mathy" MathyFurret

  • U.S.
View GitHub Profile
import random
import itertools
import math
from collections import Counter
class Player:
def __init__(self, id, *, is_inactive=False):
self.id = id
self.is_inactive = is_inactive
self.wins = 0
@MathyFurret
MathyFurret / conquestsavefiletools.bsps
Created September 17, 2021 03:48
Conquest Save File Tools
main:
print .message1
print .message2
print .message3
menu #0, .options
jumptable #0
dw Max_IVs
.message1
string "Mathy's Conquest Save File Tools v0.0"
@MathyFurret
MathyFurret / PhysicsTests.java
Last active April 18, 2019 20:50
Phineas & Ferb Ride Again research
public class PhysicsTests {
public static final int Y_ACCELERATION = -16;
public static final int GROUNDED_Y_VELOCITY = -328;
public static final int JUMPING_Y_VELOCITY = 328;
public static final int GROUND_UPPER_HITBOX = 40951;
public static final int GROUND_LOWER_HITBOX = 1654;
/**
* Calculates the number of frames it will take from right before Phineas is in freefall to
@MathyFurret
MathyFurret / defiancechan.js
Last active May 6, 2021 13:54
DefianceChan: A bruteforce Defiance analyzer for Twitch Plays PBR
/*
Version 0.2 updated Nov 25, 2018.
This script will bruteforce a live match from the TPP API
in Defiance mode and estimate winrates.
Requirements:
-An oauth for the TPP API: https://twitchplayspokemon.tv/show_oauth_token
-Node.js: https://nodejs.org/en/download/
-sync-request for Node.js: `npm install -g sync-request` (NPM should come installed with Node.js)
'use strict';
exports.Formats = [
//...
{
name: "[Gen 7] Status Hazard",
desc: [
`Status moves in a Pokemon's first and second move slots can become hazard-setting moves.`,
`&bullet; <a href="https://www.smogon.com/forums/threads/status-hazard.3571986/">Status Hazard</a>`,
],
@MathyFurret
MathyFurret / pokepostbot.py
Created June 22, 2016 23:48
generates accurate Miiverse posts for ORAS
#plagiarize the csv used by Eevee's dex
import numpy
templates = [
{
'text': "(num0) (enc0) and still no (pkmn0)...",
'number_slots': 1,
'encounter_slots': 1,
'pokemon_slots': 1
}, {
Complex = {}
--constructors
function Complex.new(re, im)
assert(type(re) == 'number' and type(im) == 'number', "Both arguments passed to Complex.new must be numbers")
return setmetatable({re = re, im = im}, Complex)
end
function Complex.polar(r, theta)
assert(type(r) == 'number' and type(theta) == 'number', "Both arguments passed to Complex.new must be numbers")