gchar.games.arknights

Character

class gchar.games.arknights.Character(raw_data: dict)[source]

A class for modeling characters in the Arknights game.

Here is an example of operator data from prts.wiki

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
    "data-adapt": "普通",
    "data-atk": "102",
    "data-birth_place": "未公开",
    "data-block": "1",
    "data-cost": "3",
    "data-def": "28",
    "data-en": "U-Official",
    "data-flex": "缺陷",
    "data-group": "",
    "data-hp": "385",
    "data-id": "U007",
    "data-interval": "1.3s",
    "data-ja": "",
    "data-logo": "罗德岛",
    "data-nation": "罗德岛",
    "data-obtain_method": "活动获得",
    "data-phy": "普通",
    "data-plan": "缺陷",
    "data-position": "远程位",
    "data-potential": "`",
    "data-profession": "辅助",
    "data-race": "札拉克",
    "data-rarity": "0",
    "data-re_deploy": "200s",
    "data-res": "0",
    "data-sex": "女",
    "data-skill": "缺陷",
    "data-sortid": "274",
    "data-subprofession": "吟游者",
    "data-tag": "控场",
    "data-team": "",
    "data-tolerance": "普通",
    "data-trust": "120,20,0",
    "data-zh": "U-Official"
}
property clazz

Get the class of the character.

Returns:

The class of the character.

Return type:

Clazz

property rarity

Get the rarity of the character.

Returns:

The rarity of the character.

Return type:

Rarity

EnglishName

class gchar.games.arknights.EnglishName(name: Union[str, List[str]])[source]

A class for modeling English names of characters in the Arknights game.

JapaneseName

class gchar.games.arknights.JapaneseName(name: str)[source]

A class for modeling Japanese names of characters in the Arknights game.

ChineseName

class gchar.games.arknights.ChineseName(name: str)[source]

A class for modeling Chinese names of characters in the Arknights game.

ChineseAliasName

class gchar.games.arknights.ChineseAliasName(name: str)[source]

A class for modeling Chinese alias names of characters in the Arknights game.

Rarity

enum gchar.games.arknights.Rarity(value)[source]

A class for modeling the rarity of characters in the Arknights game.

Member Type:

int

Valid values are as follows:

ONE = <Rarity.ONE: 1>
TWO = <Rarity.TWO: 2>
THREE = <Rarity.THREE: 3>
FOUR = <Rarity.FOUR: 4>
FIVE = <Rarity.FIVE: 5>
SIX = <Rarity.SIX: 6>

The Enum and its members also have the following methods:

classmethod loads(val) → gchar.games.arknights.property.Rarity[source]

Load the rarity from a value.

Parameters:

val (int) – The value representing the rarity.

Returns:

The rarity enum.

Return type:

Rarity

Raises:
  • ValueError – If the value is invalid.

  • TypeError – If the type of the value is invalid.

Clazz

enum gchar.games.arknights.Clazz(value)[source]

A class for modeling the class of characters in the Arknights game.

Valid values are as follows:

GUARD = <Clazz.GUARD: 1>
DEFENDER = <Clazz.DEFENDER: 2>
CASTER = <Clazz.CASTER: 3>
SNIPER = <Clazz.SNIPER: 4>
SPECIALIST = <Clazz.SPECIALIST: 5>
SUPPORTER = <Clazz.SUPPORTER: 6>
MEDIC = <Clazz.MEDIC: 7>
VANGUARD = <Clazz.VANGUARD: 8>

The Enum and its members also have the following methods:

classmethod loads(val) → gchar.games.arknights.property.Clazz[source]

Load the class from a value.

Parameters:

val (str) – The value representing the class.

Returns:

The class enum.

Return type:

Clazz

Raises:
  • ValueError – If the value is invalid.

  • TypeError – If the type of the value is invalid.