DnD_5e.character_classes.rogue module

class DnD_5e.character_classes.rogue.Rogue(**kwargs)[source]

Bases: Character

Rogue character class

current_eq(other) bool[source]

Compare self and other to determine if they are identical based on the attributes checked in equals and also these attributes: stroke of luck slots

Parameters:

other (Rogue) – the Rogue to compare

Returns:

True if self is identical to other, False otherwise

Return type:

bool

can_see(light_src: str) bool[source]

Determine whether self can see a given light source. If self can’t see according to superclass method, look at blindsense feature.

Parameters:

light_src (one of these strings: "normal", "dark", "magic") – a kind of light

Returns:

True if self can see light_src, False otherwise

Return type:

bool

get_adv_to_be_hit() int[source]

The sum of advantage (+1) and disadvantage (-1) circumstances affecting self is stored in self._adv_to_be_hit. Look at this number and return an integer indicating whether an attack against self has advantage, disadvantage, or neither. Look at the “elusive” feature.

Returns:

positive if attacks against self have advantage, negative if they have disadvantage, and 0 otherwise

Return type:

one of these integers: -1, 0, 1

get_stroke_of_luck_slots() int[source]
Returns:

stroke of luck slots

Return type:

non-negative integer

get_sneak_attack_dice() Tuple[int, int][source]
Returns:

sneak attack dice

Return type:

TYPE_DICE_TUPLE

can_make_sneak_attack(weapon, target, adv) bool[source]

Determine if self can make a sneak attack against target. NOT IMPLEMENTED YET

Parameters:
  • weapon (Weapon) – the Weapon used for the attack

  • target (Combatant) – the Combatant being attacked

  • adv (int) – advantage (positive), disadvantage (negative), or neither (0)

Returns:

True if self can make a sneak attack against target, False otherwise

Return type:

bool

roll_sneak_attack_dice() int[source]

Roll sneak attack dice

Returns:

the number rolled by the sneak attack dice

Return type:

non-negative integer

take_stroke_of_luck()[source]

Use the Stroke of Luck feature. NOT IMPLEMENTED YET.

Returns:

None

Raise:

ValueError if self has no stroke of luck slots

send_attack(target, attack, adv=0) int | None[source]

Attack a given target using a given attack. Roll and add sneak attack damage if applicable

Parameters:
  • target (Combatant) – the Combatant to attack

  • attack (Attack) – the Attack being made

  • adv (int) – indicates whether self has advantage for this attack

Returns:

the damage target took from attack, or None if the attack failed to hit