Skip to content

Berry

pokelance.models.abstract.berry ⚓︎

Berry ⚓︎

Bases: BaseModel

A berry resource.

Attributes:

Name Type Description
id int

The identifier for this berry resource.

name str

The name for this berry resource.

growth_time int

Time it takes the tree to grow one stage, in hours. Berry trees go through four of these growth stages before they can be picked.

max_harvest int

The maximum number of these berries that can grow on one tree in Generation IV.

natural_gift_power int

The power of the move "Natural Gift" when used with this Berry.

size int

Berries are actually items. This is the number of those items.

smoothness int

The speed at which this Berry dries out the soil as it grows. A higher rate means the soil dries more quickly.

soil_dryness int

The firmness of this berry, used in making Pokéblocks or Poffins.

flavors List[BerryFlavorMap]

A list of references to each flavor a berry can have and the potency of each of those flavors in regard to this berry.

item NamedResource

The item that corresponds to this berry.

natural_gift_type NamedResource

The type inherited by "Natural Gift" when used with this Berry.

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
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

BerryFirmness ⚓︎

Bases: BaseModel

A berry firmness resource.

Attributes:

Name Type Description
id int

The identifier for this berry firmness resource.

name str

The name for this berry firmness resource.

berries List[NamedResource]

A list of the berries with this firmness.

names List[Name]

A list of the name of this berry firmness listed in different languages.

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
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)

BerryFlavor ⚓︎

Bases: BaseModel

A berry flavor resource.

Attributes:

Name Type Description
id int

The identifier for this berry flavor resource.

name str

The name for this berry flavor resource.

berries List[FlavorBerryMap]

A list of the berries with this flavor.

contest_type NamedResource

The contest type that correlates with this berry flavor.

names List[Name]

The name of this berry flavor listed in different languages.

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
    -------
    typing.Dict[str, Any]
        The model as a dict.
    """
    return attrs.asdict(self)