Skip to content

Battle Item

py_unite_db.models.BattleItem

Bases: Item

Class representing a Battle Item.

Get all battle items from the api with UniteDb.battle_items.

In the game, you can select one battle item per battle.

Source code in py_unite_db/models/battle_item.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
class BattleItem(Item):
    """Class representing a Battle Item.

    Get all battle items from the api with
    [`UniteDb.battle_items`][py_unite_db.UniteDb].

    In the game, you can select one battle item per battle.
    """

    cooldown: int = Field(..., description="The cooldown of the item in seconds.")
    unlock_level: int = Field(
        ..., description="The trainer level at which this item is unlocked."
    )

    @staticmethod
    def _transform(v: dict[str, Any]) -> dict[str, Any]:
        v["unlock_level"] = v.pop("level")
        return v

cooldown: int = Field(..., description='The cooldown of the item in seconds.') class-attribute instance-attribute

description: str = Field(..., description='Description of this item.') class-attribute instance-attribute

display_name: str = Field(..., description='Display name of this item.') class-attribute instance-attribute

name: str = Field(..., description='Name of this item.') class-attribute instance-attribute

tier: Tier = Field(..., description='What tier unite-db consider this item to be.') class-attribute instance-attribute

unlock_level: int = Field(..., description='The trainer level at which this item is unlocked.') class-attribute instance-attribute