Skip to content

Fall back to Sword & Shield data in moves command #234

@digitalghost-dev

Description

@digitalghost-dev

Some moves do not exist in Scarlet & Violet where the move command was searching for Flavor Text Entries. Falling back to grab data from Sword & Shield if entry.VersionGroup.Name == "scarlet-violet" is empty.

Example:

[15:32:08] ~ → poke-cli move thousand-arrows
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                ┃
┃  Thousand Arrows               ┃
┃                                ┃
┃  Type           |Ground        ┃
┃  Power          |90            ┃
┃  PP             |10            ┃
┃  Accuracy       |100           ┃
┃  Category       |Physical      ┃
┃  Effect Chance  |100%          ┃
┃  Priority       |0             ┃
┃                                ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                ┃
┃  Effect:                       ┃
┃                                ┃
┃                                ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

After:

[15:32:47] ~ → poke-cli move thousand-arrows
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                ┃
┃  Thousand Arrows               ┃
┃                                ┃
┃  Type           |Ground        ┃
┃  Power          |90            ┃
┃  PP             |10            ┃
┃  Accuracy       |100           ┃
┃  Category       |Physical      ┃
┃  Effect Chance  |100%          ┃
┃  Priority       |0             ┃
┃                                ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃                                ┃
┃  Effect:                       ┃
┃  This move also hits opposing  ┃
┃  Pokémon that are in           ┃
┃  the air. Those Pokémon are    ┃
┃  knocked down to               ┃
┃  the ground.                   ┃
┃                                ┃
┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛

Metadata

Metadata

Assignees

No one assigned

    Labels

    improvementImprovement to an existing feature.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions