DnD_5e.character_classes.barbarian module

class DnD_5e.character_classes.barbarian.Barbarian(**kwargs)[source]

Bases: Character

Barbarian 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: rage slots, rage state

Parameters:

other – the Barbarian to compare

Returns:

True if self is identical to other, False otherwise

Return type:

bool

get_rage_slots() int[source]
Returns:

rage slots

Return type:

non-negative integer

get_rage_damage_bonus() int[source]
Returns:

rage damage bonus

Return type:

int

is_raging() bool[source]
Returns:

True if self is raging, False otherwise

Return type:

bool

start_rage()[source]

Go into a rage state

Returns:

None

stop_rage()[source]

Stop the rage state

Returns:

None

start_reckless()[source]

Enter this state when attacking recklessly. It lasts for one round.

Returns:

None

stop_reckless()[source]

End the reckless state. This happens after one round of recklessly attacking.

Returns:

None

make_saving_throw(save_type: str, adv=0)[source]

Roll a saving throw of the given type. This is different from the superclass method in that it is affected by raging and the “danger sense” feature.

Parameters:
  • save_type (one of these strings: "strength", "dexterity", "constitution", "intelligence", "wisdom", "charisma") – the kind of saving throw to make

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

Returns:

the number rolled for the saving throw

Return type:

int

become_unconscious()[source]

Go unconscious. This differs from the superclass method in that self may drop to 1 hit point instead due to the “relentless rage” feature. If self saves, then self drops to 1 hit point. Otherwise, self is unconscious and has current hp of 0

Returns:

None

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

Attack a given target using a given attack. This differs from the superclass method in that if self is recklessly attacking, the attack has advantage

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