Skip to content

Instantly share code, notes, and snippets.

PikalaxALT

  • University of Pennsylvania
  • United States
Block or report user

Report or block PikalaxALT

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 dump_battle_scripts.py
import json
import re
SONGS = [
'MUS_DUMMY',
'SE_KAIFUKU',
'SE_PC_LOGIN',
'SE_PC_OFF',
'SE_PC_ON',
'SE_SELECT',
View trainers.h
#ifndef GUARD_TRAINERS_H
#define GUARD_TRAINERS_H
#define TRAINER_ENCOUNTER_MUSIC_MALE 0 // standard male encounter music
#define TRAINER_ENCOUNTER_MUSIC_FEMALE 1 // standard female encounter music
#define TRAINER_ENCOUNTER_MUSIC_GIRL 2 // used for male Tubers and Young Couples too
#define TRAINER_ENCOUNTER_MUSIC_SUSPICIOUS 3
#define TRAINER_ENCOUNTER_MUSIC_INTENSE 4
#define TRAINER_ENCOUNTER_MUSIC_COOL 5
#define TRAINER_ENCOUNTER_MUSIC_AQUA 6
@PikalaxALT
PikalaxALT / get_sprite_coords.c
Created May 14, 2019
C script which prints x, y, and y_offset fields of sprite coordinates
View get_sprite_coords.c
#include <stdio.h>
#include <png.h>
#include <stdlib.h>
#define FATAL_ERROR(...) ({fprintf(stderr, __VA_ARGS__);exit(1);})
#define min(a, b) ((a) < (b) ? (a) : (b))
struct Image
{
View dism_battle_ai.py
import collections
import os
import sys
PTRTYPE_SCRIPT = 0
PTRTYPE_BYTEARRAY = 1
PTRTYPE_HWORDARRAY = 2
if len(sys.argv) > 1:
project_dir = sys.argv[1]
@PikalaxALT
PikalaxALT / moves.tsv
Created Dec 18, 2018
All moves in gen 2 and whether they are considered damaging by bingo rules
View moves.tsv
Name Effect Power Type Accuracy PP Effect chance Is damaging?
POUND EFFECT_NORMAL_HIT 40 NORMAL 100 35 0 TRUE
KARATE_CHOP EFFECT_NORMAL_HIT 50 FIGHTING 100 25 0 TRUE
DOUBLESLAP EFFECT_MULTI_HIT 15 NORMAL 85 10 0 TRUE
COMET_PUNCH EFFECT_MULTI_HIT 18 NORMAL 85 15 0 TRUE
MEGA_PUNCH EFFECT_NORMAL_HIT 80 NORMAL 85 20 0 TRUE
PAY_DAY EFFECT_PAY_DAY 40 NORMAL 100 20 0 TRUE
FIRE_PUNCH EFFECT_BURN_HIT 75 FIRE 100 15 10 TRUE
ICE_PUNCH EFFECT_FREEZE_HIT 75 ICE 100 15 10 TRUE
THUNDERPUNCH EFFECT_PARALYZE_HIT 75 ELECTRIC 100 15 10 TRUE
@PikalaxALT
PikalaxALT / save.s
Last active Nov 18, 2018
output by arm-none-eabi-gcc-8.1.0
View save.s
.file ""
.text
.syntax divided
.section .rodata
.align 2
.thumb
.syntax unified
.align 1
.p2align 2,,3
.arch armv4t
@PikalaxALT
PikalaxALT / gbz80disasm.py
Last active Jun 9, 2018
Rudimentary GBZ80 disassembler (MBC3 only for the time being)
View gbz80disasm.py
import argparse
from functools import total_ordering
from z80table import z80table, extdtable
import re
def fread(file, n):
return int.from_bytes(file.read(n), 'little')
View make_shim.c
#include <stdio.h>
#include <getopt.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
struct Section {
unsigned short end;
bool invalid;
char * name;
View vote_counter.py
import asyncio
import discord
from discord.ext import commands
from collections import Counter
class FooCog:
THUMBS_UP = '\U0001ff4d'
THUMBS_DOWN = '\U0001ff4e'
@PikalaxALT
PikalaxALT / test_sql.py
Created May 15, 2018
Test suite for [PikalaxBOT](/pikalaxalt/pikalaxbot)
View test_sql.py
import unittest
import sqlite3
from utils import sql
from collections import namedtuple
User = namedtuple('User', ['id', 'name'])
Context = namedtuple('Context', ['author'])
me = User(148462033770119168, 'PikalaxALT')
ctx = Context(me)
You can’t perform that action at this time.