flow package
Submodules
models.flow.skill_check module
- class models.flow.skill_check.SkillCheck(skill_name, dc, auto_pass=False, auto_fail=False)
Bases:
objectRepresents a skill check in a DnD-like system.
- Parameters:
skill_name (str) – The name of the skill (e.g., “perception”, “athletics”).
dc (int) – The difficulty class to beat.
auto_pass (bool, optional) – If True, the check automatically succeeds.
auto_fail (bool, optional) – If True, the check automatically fails.
- attempt(character_stats, advantage=False, disadvantage=False)
Attempt the skill check.
- Parameters:
character_stats (dict) – Dictionary mapping skill names to modifiers.
advantage (bool, optional) – If True, roll with advantage.
disadvantage (bool, optional) – If True, roll with disadvantage.
- Returns:
True if the check succeeds, False otherwise.
- Return type:
bool