PokeAPI / PokeAPI/pokeapi

Adding resource for Z Moves

Open
#586 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
5.4k
Forks
1.2k
Avg merge
2d 5h
Merged PRs (30d)
21

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the existing /moves, /items, /types, and /pokemon resources, then compare their current relationships with the proposed Z-Move and Z-Crystal model. Done means the two new resources and the listed attributes and relationships are represented consistently across the API.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.