pokelance.models.abstract.utils.moves ⚓︎

ContestComboDetail ⚓︎

Bases: BaseModel

A contest combo detail resource.

Attributes:
  • use_before (NamedResource) –

    A detail of moves this move can be used before, i.e. leading into this move.

  • use_after (NamedResource) –

    A detail of moves this move can be used after, i.e. result in this move being used.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

ContestComboSet ⚓︎

Bases: BaseModel

A contest combo set resource.

Attributes:

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

MoveFlavorText ⚓︎

Bases: BaseModel

A move flavor text resource.

Attributes:
  • flavor_text (str) –

    The localized flavor text for an api resource in a specific language.

  • language (NamedResource) –

    The language this name is in.

  • version_group (NamedResource) –

    The version group that uses this flavor text.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

MoveMetaData ⚓︎

Bases: BaseModel

A move meta data resource.

Attributes:
  • ailment (NamedResource) –

    The status ailment this move inflicts on its target.

  • category (NamedResource) –

    The category of move this move falls under, e.g. damage or ailment.

  • min_hits (int) –

    The minimum number of times this move hits. Null if it always only hits once.

  • max_hits (int) –

    The maximum number of times this move hits. Null if it always only hits once.

  • min_turns (int) –

    The minimum number of turns this move continues to take effect. Null if it always only lasts one turn.

  • max_turns (int) –

    The maximum number of turns this move continues to take effect. Null if it always only lasts one turn.

  • drain (int) –

    HP drain (if positive) or Recoil damage (if negative), in percent of damage done.

  • healing (int) –

    The amount of hp gained by the attacking Pokemon, in percent of it's maximum HP.

  • crit_rate (int) –

    Critical hit rate bonus.

  • ailment_chance (int) –

    The likelihood this attack will cause an ailment.

  • flinch_chance (int) –

    The likelihood this attack will cause the target Pokémon to flinch.

  • stat_chance (int) –

    The likelihood this attack will cause a stat change in the target Pokémon.

to_dict() ⚓︎

Convert the model to a dict

Returns:
  • Dict[str, Any]

    The model as a dict.

Source code in pokelance/models/_base.py
Python
def to_dict(self) -> t.Dict[str, t.Any]:
    """Convert the model to a dict

    Returns
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)