2024-06-25 21:26:04 +00:00
|
|
|
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:
|
2024-06-30 11:01:34 +00:00
|
|
|
return {'threshold': threshold, 'rolled': rolled, 'success': True}
|
2024-06-25 21:26:04 +00:00
|
|
|
else:
|
2024-06-30 11:01:34 +00:00
|
|
|
return {'threshold': threshold, 'rolled': rolled, 'success': False}
|