pokeapi icon indicating copy to clipboard operation
pokeapi copied to clipboard

Adding resource for Z Moves

Open SirSkaro opened this issue 4 years ago • 1 comments

Request

Issue #426 talks about request documentation on Z Moves as well as Z Crystals. However, would like to go a step further and request that Z Moves and Z Crystals get their own resources (/z-moves and /z-crystals, respectively).

In my opinion, Z Moves are fundamentally different from the regular Moves.

  • Damaging Z-Moves do not have a standard base power. The powers of the type-specific damaging Z-Moves follow a conversion table (with exceptions, such as OH-KO moves and Struggle). This means that a simple client-side look-up table needs to be nuanced.
  • Non-damaging Z-Moves (status Moves turned into a Z-Move) have the added affect of changing stats, healing, and more.
  • Z-Moves do not exist by themselves. They get their attributes by either the combination of a Type and a Move or a Move and a Pokemon.

There is currently no means of relating a Pokemon-specific Z-Move to a Pokemon, a status Z-Move to it secondary effects, a Z-Move to a regular Move, or a Z-Crystal to its corresponding Z-Move. In addition there is no way to get the base power of a Z-Move. There are missing relationships that cannot be reasonably captured by having Z-Moves bundled into the /moves resource.

As pointed out in #426, there are currently two separate resources for each Move that is a "logical Z-Move". One for the special category and one for the physical. I believe this is unintuitive and and unhelpful way of presenting the data.

There is less argument for having Z-Crystals broken out into their own resource, but they suffer from a similar issue that Z-Moves do in that bundling them with the /items resource limits how they can be related to other resources. Since a Z-Move should ideally be related to a Z-Crystal, to me it makes more sense to have a 1-to-1 relationship between /z-moves and /z-crystals rather than /z-moves and /items.

Possible Solution

  • Create a resource /z-moves
    • includes standard name, description, generation, and names
  • Create a resource /z-crystals
    • includes standard name, description, generation, and names
  • Add a 1-to-1 relationship from /z-moves to /z-crystals
  • Add a 1-to-1 relationship from /z-moves to /moves
  • Add attribute "z_move_base_power" to /moves
  • Add attribute "z_move_effects" to /moves (outlining the secondary effects of status moves turned Z-Move)
  • Add 1-to-many relationship from /types to /z-crystals (multiple Z-Crystals per Type)
  • Add 1-to-1 relationship from /types to /z-moves
  • Add optional 1-to-1 relationship from /z-move to /pokemon (some Z-Moves are Pokemon-specific. E.g. "Light that Burns the Sky" is exclusive to Ultra Necrozma)

SirSkaro avatar Mar 07 '21 22:03 SirSkaro

This is a really good explanation and argument. I'm keen to understand how some of our sources, like Veekun's pokedex, have discussed adding these. Do we have any insight into how the game's data structures themselves categorize them?

It ultimately doesn't matter, but if someone has done the leg work for us already then we should build off the shoulders of giants.

phalt avatar Mar 08 '21 00:03 phalt