DnD_5e.character_classes.ranger module

class DnD_5e.character_classes.ranger.Ranger(**kwargs)[source]

Bases: SpellCaster, Character

Ranger character class

get_favored_enemies()[source]
Returns:

favored enemies

Return type:

set of strings

has_favored_enemy(enemy) bool[source]

Determine whether the given enemy is favored or not

Parameters:

enemy (Creature or str) – the enemy or name of the enemy

Returns:

True if enemy is a favored enemy, False otherwise

Return type:

bool

get_favored_terrains() set[source]
Returns:

favored terrains

Return type:

set of strings

has_favored_terrain(terrain) bool[source]

Determine whether the given terrain is favored or not

Parameters:

terrain (str) – the terrain to look at

Returns:

True if terrain is a favored terrain, False otherwise

Return type:

bool