Skip to content

Instantly share code, notes, and snippets.

/*
* The Pokemart
*
* This assignment has you working with Objects and Functions/Methods.
* The goal is to create code to represent a pokemart that sells items, and then
* simulate a player purchasing some items from the pokemart.
*
* Requirements [READ CAREFULLY]:
* The pokemart must be an Object containing at least 10 items. You can pick what
* items are sold and at what price.
@Lusamine
Lusamine / Complete IoA Restricted Sparring Sets
Last active July 23, 2020 08:49
Complete IoA Restricted Sparring Sets
All of these sets were dumped directly from the game.
Please note that the Ability and Gender are randomized. Everything else is the same every time.
Yep, there are GMax sets in here, but they don't ever Dynamax/Gigantamax in game.
You can see the distribution of abilities for the sample here:
https://gist.github.com/Lusamine/e93a15312b0d18789fbe807e0d908fcc
Enjoy!
Total Unique Species: 150
Total Pokemon: 801
Total Abilities:
Ability 1: 274
Ability 2: 280
Ability 4: 247
Dex Species Ability (#) Count
012 Butterfree CompoundEyes (1) 2

Introduction

It's possible to call over two Pokémon in Camp and talk to both to assess their sociability. Messages are sorted into groups. Each combination of sociabilities will sample from particular groups of messages.

Sociability Ranges

Pokémon sociability ranges here are matched to the message groups that are used. It is useful to note that the "best friends" message only appears if both Pokémon have 255 sociability.

  • 0-49: A
  • 50-74: B
  • 75-124: B, C
  • 125-149: C, D
  • 150-199: D, E
757 = G-Max Fireball
758 = Max Flutterby, G-Max Befuddle
759 = Max Lightning, G-Max Volt Crash
760 = Max Strike, G-Max Cuddle, G-Max Gold Rush, G-Max Replenish
761 = Max Knuckle, G-Max Chi Strike
765 = Max Geyser, G-Max Cannonade, G-Max Foam Burst, G-Max Hydrosnipe, G-Max Stonesurge, G-Max Rapid Flow
766 = Max Airstream, G-Max Wind Rage
767 = Max Starfall, G-Max Smite, G-Max Finale
772 = Max Darkness, G-Max One Blow
773 = Max Overgrowth, G-Max Vine Lash, G-Max Drum Solo
@Lusamine
Lusamine / Use 128-bit state input for BDSP scripts.md
Created December 27, 2021 13:39
If you prefer to use one copy/paste from CopySeed instead of two...

Change

    // Initial state
    // s0 should be s1, s0 from CS
    // s1 should be s3, s2 from CS
    ulong s0 = 0x0123456789ABCDEF;
    ulong s1 = 0x0123456789ABCDEF;

to

@Lusamine
Lusamine / BDSP Search Filters.md
Last active December 30, 2021 15:59
Quick guide to things you can do with the search filters on my search scripts

Every value that is rolled can be checked as a filter. The most important values for ec, pid, isShiny, shinyXor, ivs, ability, genderchar, and nature.

Here are some specific applications.

isShiny

Only show shiny matches.

// Skip any non-shiny match.
if (!isShiny)
    return;
@Lusamine
Lusamine / BDSP Roamer Spread Calculator.cs
Last active January 14, 2022 05:36
Ignored nature because lazy and spreads are limited already; you can use Synchronize if you care.
void Main()
{
// Initial state
// s0 should be s1, s0 from CS
// s1 should be s3, s2 from CS
ulong s0 = 0x0123456789ABCDEF;
ulong s1 = 0x0123456789ABCDEF;
// Set this for how far you want to search.
int maxAdvance = 500000;
// 93 is the chance of continuation for capture at 4 steps away.
private static int threshold = 93;
void Main()
{
// Initial state
// s0 should be s1, s0 from CS
// s1 should be s3, s2 from CS
ulong s0 = 0x0123456789ABCDEF;
ulong s1 = 0x0123456789ABCDEF;
void Main()
{
// Initial state
ulong s0 = 0x0123456789ABCDEF;
ulong s1 = 0x0123456789ABCDEF;
// Set this for how far you want to search.
int maxAdvance = 1000;
var rng = new Xoroshiro128Plus(s0, s1);