diff --git a/app/functions/roll_ability_check.py b/app/functions/roll_ability_check.py index e1be450..5817a67 100644 --- a/app/functions/roll_ability_check.py +++ b/app/functions/roll_ability_check.py @@ -2,9 +2,14 @@ from app.functions.roll_dices import roll_dices def roll_ability_check(score, multiplier): + result = dict() threshold = score * multiplier + result['threshold'] = threshold rolled = roll_dices(1, 100, False).get('result') + result['rolled'] = rolled if rolled < threshold: - return {'threshold': threshold, 'rolled': rolled, 'success': True} + result['success'] = True else: - return {'threshold': threshold, 'rolled': rolled, 'success': False} + result['success'] = False + + return result