Summary

Description
A set of rules governing type efficacy.
Data path
resources/data/type_chart/
Schema
https://poketools.gamestuff.info/data/schema/type_chart.json

Filename

Type Chart ID

The unique id for this entity. Only entities that have no clear name should use this numeric form.

type
integer
minimum
1

Fields

version_groups

A list of Version Group identifiers. A machine-usable name for the entity. This is usually a munged version of the entity name. An identifier must consist only of lowercase ASCII characters, 0-9, and/or a hyphen.

i.e. anything unique to the entity matching the regular expression ^[a-z0-9\-]+$ (Test it here)

type

string

pattern

^[a-z0-9\-]+$ (Test)

required

efficacy

A two-level mapping describing the efficacy of a type matchup. The first-level key is the attacking Type identifier, the second-level key is the defending Type identifier. The value is the efficacy as a percentage. For example:

fighting:
    normal: 200
type
mapping[string: mapping[string: int]]
values
  • 0
  • 50
  • 100
  • 200
required

JSON Schema

View raw

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://poketools.gamestuff.info/data/schema/type_chart.json",
  "title": "Type Chart",
  "description": "A set of rules governing type efficacy.",
  "type": "object",
  "properties": {
    "version_groups": {
      "title": "Version groups",
      "description": "Version groups that use this Type Chart",
      "type": "array",
      "items": {
        "allOf": [
          {
            "$ref": "types/identifier.json"
          },
          {
            "type": "string",
            "$filters": "versionGroupIdentifier"
          }
        ]
      }
    },
    "efficacy": {
      "title": "Efficacies",
      "type": "object",
      "propertyNames": {
        "title": "Attacking type",
        "allOf": [
          {
            "$ref": "types/identifier.json"
          },
          {
            "type": "string",
            "$filters": "typeIdentifier"
          }
        ]
      },
      "minProperties": 1,
      "additionalProperties": {
        "type": "object",
        "propertyNames": {
          "title": "Defending type",
          "allOf": [
            {
              "$ref": "types/identifier.json"
            },
            {
              "type": "string",
              "$filters": "typeIdentifier"
            }
          ]
        },
        "minProperties": 1,
        "additionalProperties": {
          "title": "Efficacy",
          "type": "integer",
          "enum": [
            0,
            50,
            100,
            200
          ]
        }
      }
    }
  },
  "additionalProperties": false,
  "required": [
    "version_groups",
    "efficacy"
  ]
}