gammatools/app/functions/roll_encounter.py

10 lines
286 B
Python
Raw Normal View History

from app.functions.roll_dices import roll_dices
from app.tables.encounters import EncounterTable
def roll_encounter(terrain):
roll = roll_dices(1, 20, False).get('result')
et = EncounterTable()
creature = et.get_encounter(roll, terrain)
return {"encounter": creature}