Items and Loadouts

class arez.Device[source]

Represents a Device - those are usually cards, talents and shop items.

You can find these on the CacheEntry.devices attribute.

Inherits from CacheObject.

id

ID of the device.

Type

int

name

Name of the device.

Type

str

type

The type of the device.

Type

DeviceType

raw_description

The raw device’s description, possibly containting scale placeholder fields.

See also: description.

Type

str

icon_url

The URL of this device’s icon.

Type

str

ability

The ability this device affects, or a CacheObject with only the name set, denoting the affected part of the champion.

The usual names you can find here are Weapon and Armor, or Unknown in cases where this information couldn’t be parsed.

Type

Union[Ability, CacheObject]

champion

The champion this device belongs to.

This is a CacheObject with incomplete cache, and None for shop items.

Type

Optional[Union[Champion, CacheObject]]

base

The base value of the card’s or shop item’s scaling.

0.0 for talents.

Type

float

scale

The scale value of the card’s or shop item’s scaling.

0.0 for talents.

Type

float

cooldown

The cooldown of this device, in seconds.

0 if there is no cooldown.

Type

int

price

The price of this device.

0 if there’s no price (it’s free).

Type

int

unlocked_at

The champion’s mastery level required to unlock this device. Applies only to talents.

0 means it’s unlocked by default.

Type

int

description(level)[source]

Formats the item’s description, based on the level of the device provided. This replaces the scale placeholder fields with the calculated value.

Parameters

level (int) –

The level of the device.

This should range 1-3 for shop items and 1-5 for cards.

Returns

The formatted device’s description.

Return type

str

class arez.Loadout[source]

Represents a Champion’s Loadout.

You can get this from the PartialPlayer.get_loadouts method.

id

ID of the loadout.

Type

int

name

Name of the loadout.

Type

str

player

The player this loadout belongs to.

Type

Union[PartialPlayer, Player]

champion

The champion this loadout belongs to.

With incomplete cache, this will be a CacheObject with the name and ID set.

Type

Union[Champion, CacheObject]

cards

A list of loadout cards this loadout consists of.

Type

List[LoadoutCard]

class arez.LoadoutCard[source]

Represents a Loadout Card.

card

The actual card that belongs to this loadout.

CacheObject with incomplete cache.

Type

Union[Device, CacheObject]

points

The amount of loadout points that have been assigned to this card.

Type

int

description()[source]

The formatted card’s description, based on the points assigned.

If the card is a CacheObject, this will be an empty string.

Type

str

class arez.MatchLoadout[source]

Represents a loadout used in a match.

cards

A list of loadout cards used.

Will be empty if the player hasn’t picked a loadout during the match.

Type

List[LoadoutCard]

talent

The talent used.

With incomplete cache, this will be a CacheObject with the name and ID set.

None when the player hasn’t picked a talent during the match.

Type

Optional[Union[Device, CacheObject]]

passive

The passive used. Currently, this only applies to Octavia, but may affect other champions in the future.

Type

Optional[Passive]

class arez.MatchItem[source]

Represents an item shop’s purchase.

item

The purchased item.

CacheObject with incomplete cache.

Type

Union[Device, CacheObject]

level

The level of the item purchased.

Type

int

description()[source]

The formatted item’s description, based on it’s level.

If the item is a CacheObject, this will be an empty string.

Type

str