Skip to content

pokemon_move_methods and version_groups assume 1-indexed lists with no gaps #1567

Description

@SnorlaxMonster

The API is hardcoded to assume the IDs in pokemon_move_methods.csv and version_groups.csv directly correspond to a 1-indexed list.

This means that adding a new item to either list of ID 0, or having a sequence of IDs with any gaps in it (e.g. if 9,xd-purification was deleted so that it could be merged with 7,colosseum-purification), the IDs all get skewed.

When I tried adding a pokemon_move_method of ID 0 in #1532 (comment), it was treated as ID -1 (wrapping around to the last item in the list, zygarde-cube) and skewed all of the other move methods. In that PR, it was agreed that addressing this bug was out-of-scope, so I'm opening a separate issue for it.

Ideally, looking up a pokemon_move_method or version_group should be matching on the index number, not assuming that the list has a particular structure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions