Skip to content

ThiefSkills

thief_skills

ThiefSkills dataclass

Immutable container for thief skill percentages.

Each field represents the percentage chance of success for a specific thief ability.

Attributes:

Name Type Description
open_locks int

Chance to open locked objects

pick_pockets int

Chance to steal items unnoticed

find_traps int

Chance to detect traps

remove_traps int

Chance to disarm traps

move_silently int

Chance to move quietly

climb_walls int

Chance to climb surfaces

hide_in_shadows int

Chance to remain hidden

hear_noise int

Chance to detect faint sounds

Source code in src/rpgleveler/core/thief_skills.py
 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
37
38
@dataclass(frozen=True)
class ThiefSkills:
    """
    Immutable container for thief skill percentages.

    Each field represents the percentage chance of success for a specific thief
    ability.

    Attributes:
        open_locks: Chance to open locked objects
        pick_pockets: Chance to steal items unnoticed
        find_traps: Chance to detect traps
        remove_traps: Chance to disarm traps
        move_silently: Chance to move quietly
        climb_walls: Chance to climb surfaces
        hide_in_shadows: Chance to remain hidden
        hear_noise: Chance to detect faint sounds
    """
    open_locks: int
    pick_pockets: int
    find_traps: int
    remove_traps: int
    move_silently: int
    climb_walls: int
    hide_in_shadows: int
    hear_noise: int

    def to_dict(self) -> dict[str, int]:
        return vars(self)

    @classmethod
    def from_dict(cls, data: dict[str, int]) -> ThiefSkills:
        return cls(**data)