PokeMatch

PokeMatch is a common utility across our mods that can be used to define criteria for Pokemon to meet in order to "match"

Currently, only used in Research Tasks. May be added into GGyms as a form of rule control.

Currently only supports four Pokemon properties:

  • Species

  • Form

  • Aspects

  • Types

  • Shiny?

With aspects, a lot of things can be done hackily already. First class support for other properties will be added over time as required for Quests. Feel free to suggest things you need ASAP, and they can be added very quickly.

A PokeMatch is a JSON Object with keys relevant to different Pokemon Properties.

{
   "species": "raichu",
   "form": "alolan",
   "shiny": "true"
}

This PokeMatch would only return true for a Shiny Alolan Raichu.

{
   "form": "alolan",
   "shiny": "true"
}

By omitting the "species" field, (or setting it to ""), this PokeMatch will return true for any Pokemon that is both shiny and alolan.

{
   "form": "alolan",
   "shiny": "false"
}

The same again, but only non-shiny Alolan Pokemon.

{
   "form": "alolan"
}

Not including the "shiny" field at all means it won't be considered, so any Alolan Pokemon, shiny or not, will return true.

{
   "species": "raichu"
}

The same is true for "form", or any field. If it's not there, it's not considered. Here, any form of Raichu, shiny or not, will return true when matched.

PokeMatch supports matching for "aspects", which are essentially flags on Pokemon that denote a change. These are commonly used for adding custom textures to Pokemon. For instance, you may have a "pride" aspect that when given to a Pokemon gives it a pride texture.

PokeMatch could check for that as so:

{
   "aspects": ["pride"]
}

Any single flag aspect can be checked in this manner. Multiple aspects can also be included, if so, all must be present on the Pokemon for it to match.

{
   "aspects": ["pride", "unbreedable"]
}

This PokeMatch would only match if the Pokemon has both "pride" and "unbreedable" aspects.

{
   "types": ["fire"]
}

This PokeMatch would match for any Fire type Pokemon. You can match multiple types as well, like so:

{
   "types": ["grass", "fairy"]
}

Whimsicott, a Grass & Fairy Pokemon, would be matched by this.

Last updated