DnD_5e.features package

Module contents

class DnD_5e.features.Feature[source]

Bases: object

This class represents features (class features, race features, background features etc.) that change a Combatant’s stats or how a Combatant can act

classmethod get_ol_methods()[source]
Returns:

the methods that this class overloads

Return type:

list of name, value tuples (name is a str for the name of the function, value is the method object)

class DnD_5e.features.UnarmoredDefenseBarbarian[source]

Bases: Feature

classmethod get_unarmored_ac(src)[source]
Parameters:

src – the Combatant this Feature applies to

Returns:

unarmored ac (10 + dex + con)

class DnD_5e.features.FastMovementBarbarian[source]

Bases: Feature

classmethod get_speed(src)[source]
Parameters:

src – the Combatant this Feature applies to

Returns:

speed + 10 (when src isn’t wearing heavy armor)

class DnD_5e.features.ArcheryFightingStyle[source]

Bases: Feature

classmethod get_weapon_attack_mod(src, weapon)[source]

Get modifiers for weapon attacks.

Update method: returns the difference from what src would get normally (i.e., return 2 for ranged_attack_mod to say ranged_attack_mod is 2 greater than normal)

Parameters:
  • src – the Combatant this Feature applies to

  • weapon (Weapon) – the weapon to look at

Returns:

attack modifier

Return type:

int

class DnD_5e.features.DefenseFightingStyle[source]

Bases: Feature

classmethod get_ac(src)[source]

Get ac for the combatant.

Update method: returns the difference from what src would get normally (i.e., return 1 to say ac is 1 greater than normal)

Parameters:

src – the Combatant this Feature applies to

Returns:

ac

Return type:

positive integer

class DnD_5e.features.UnarmoredDefenseMonk[source]

Bases: Feature

classmethod get_unarmored_ac(src)[source]
Parameters:

src – the Combatant this Feature applies to

Returns:

unarmored ac (10 + dex + con)

class DnD_5e.features.DraconicResilience[source]

Bases: Feature

classmethod get_unarmored_ac(src)[source]

Note: this doesn’t apply the hit point maximum effects.

Parameters:

src – the Combatant this Feature applies to

Returns:

unarmored ac (10 + dex + con)