Skip to content

Evolutions

pokelance.models.abstract.utils.evolutions ⚓︎

Bases: BaseModel

A chain link resource.

Attributes:

Name Type Description
is_baby bool

Whether or not this link is for a baby Pokémon.

species NamedResource

The Pokémon species at this point in the evolution chain.

evolution_details List[EvolutionDetail]

A list of details regarding the specific details of the referenced Pokémon species evolution.

evolves_to List[ChainLink]

A list of chain links.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

EvolutionDetail ⚓︎

Bases: BaseModel

An evolution detail resource.

Attributes:

Name Type Description
version_group NamedResource

The version group in which the evolution was introduced.

is_default bool

Whether the evolution is considered as the expected evolution in a main series game. Each unique Pokémon variety of a line capable of evolution should have exactly one 'default' evolution. For example, the Meowth species has three default evolutions as there are three distinct varieties it can evolve into: Persian, Alolan Persian, and Perrserker.

item Optional[NamedResource]

The item required to cause evolution this into Pokémon species.

trigger NamedResource

The type of event that triggers evolution into this Pokémon species.

gender Optional[GenderEnum]

Gender of the evolving Pokémon species must be in order to evolve.

held_item Optional[NamedResource]

The item the evolving Pokémon species must be holding during the evolution trigger event.

known_move Optional[NamedResource]

The move that must be known by the evolving Pokémon species during the evolution trigger event.

known_move_type Optional[NamedResource]

The evolving Pokémon species must know a move with this type during the evolution trigger event.

location Optional[NamedResource]

The location the evolution must be triggered at.

min_affection Optional[int]

The minimum required level of affection the evolving Pokémon species must have.

min_beauty Optional[int]

The minimum required level of beauty the evolving Pokémon species must have.

min_happiness Optional[int]

The minimum required level of happiness the evolving Pokémon species must have.

min_level Optional[int]

The minimum required level of the evolving Pokémon species.

near_special_rock bool

Whether or not you need to be near a Moss Rock or Icy Rock to evolve into this Pokémon species.

needs_multiplayer bool

Whether or not multiplayer link play is needed to evolve into this Pokémon species (e.g. Union Circle).

needs_overworld_rain bool

Whether or not it must be raining in the overworld to cause evolution this Pokémon species.

party_species Optional[NamedResource]

The specific Pokémon species that must be in the players party in order for the evolution to occur.

party_type Optional[NamedResource]

The player must have a Pokémon of this type in their party during the evolution trigger event.

relative_physical_stats Optional[int]

The required relation between the Pokémon's Attack and Defense stats.

time_of_day str

The time of day the evolution must be triggered at.

trade_species Optional[NamedResource]

The specific Pokémon species that must be traded with the evolving Pokémon species.

turn_upside_down bool

Whether or not the 3DS needs to be turned upside-down as this Pokémon levels up.

region Optional[NamedResource]

The required region in which this evolution can occur.

base_form Optional[NamedResource]

The required form for which this evolution can occur.

evolved_form Optional[NamedResource]

The form to which this evolution occurs.

used_move Optional[NamedResource]

The move that must be used by the evolving Pokémon species during the evolution trigger event in order to evolve into this Pokémon species.

min_move_count Optional[int]

The minimum number of times a move must be used in order to evolve into this Pokémon species.

min_steps Optional[int]

The minimum number of steps that must be taken in order to evolve into this Pokémon species.

min_damage_taken Optional[int]

The minimum amount of damage taken during the evolution trigger event in order to evolve into this Pokémon species.

simplified_details property ⚓︎

Return a simplified dictionary of the evolution details.

Prunes out any empty or None values, and only includes concrete or non-empty values.

to_dict() ⚓︎

Convert the model to a dict

Returns:

Type Description
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
    -------
    t.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(
        self, filter=attrs.filters.exclude(attrs.fields(BaseModel).raw), value_serializer=_serializer
    )

Comments