Skip to content

enhancement: adding 'card' traits #2124

Description

@whosthatbloke

Data affected

  • Card
  • Set
  • Serie
  • Other
  • new Data Type

Please explain in more details what idea you have

There is currently no information in any of the cards to state they are a 'tera' Pokemon or a 'Future' Pokemon, so we cannot query them. Therefore, I propose we add a an optional 'trait' to a card.

They are independent from card names, stages, etc... The simply provide additional information about the card. It's a simple type of arrays:

 export type CardTrait =
    | "ancient"
    | "future"
    | "tera"
    | "single-strike"
    | "rapid-strike"
    | "fusion-strike";


// In the relevant files we'd put something like: 
traits?: Array<CardTrait>

Using an array of 'trait' gives us the ability handle situations such as:

const card: Card = {
	dexId: [386],
	set: Set,

	name: {
		en: "Deoxys"
                 ...
        }
	traits: ["single-strike", "rapid-strike", "fusion-strike"],

More often than not we'll have a single trait, but this is future proof.

I've already implemented this on my fork. It doesn't introduce any breaking changes as this is simply optional field, similar to other conventions used in the project.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions