11 lines
369 B
Python
11 lines
369 B
Python
from app.functions.roll_dices import roll_dices
|
|
|
|
|
|
def roll_ability_check(score, multiplier):
|
|
threshold = score * multiplier
|
|
rolled = roll_dices(1, 100, False).get('result')
|
|
if rolled < threshold:
|
|
return {'threshold': threshold, 'rolled': rolled, 'success': True}
|
|
else:
|
|
return {'threshold': threshold, 'rolled': rolled, 'success': False}
|