another attempt to fix ability check
This commit is contained in:
		
							parent
							
								
									8621353105
								
							
						
					
					
						commit
						aa817b97d9
					
				@ -2,9 +2,14 @@ from app.functions.roll_dices import roll_dices
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def roll_ability_check(score, multiplier):
 | 
					def roll_ability_check(score, multiplier):
 | 
				
			||||||
 | 
					    result = dict()
 | 
				
			||||||
    threshold = score * multiplier
 | 
					    threshold = score * multiplier
 | 
				
			||||||
 | 
					    result['threshold'] = threshold
 | 
				
			||||||
    rolled = roll_dices(1, 100, False).get('result')
 | 
					    rolled = roll_dices(1, 100, False).get('result')
 | 
				
			||||||
 | 
					    result['rolled'] = rolled
 | 
				
			||||||
    if rolled < threshold:
 | 
					    if rolled < threshold:
 | 
				
			||||||
        return {'threshold': threshold, 'rolled': rolled, 'success': True}
 | 
					        result['success'] = True
 | 
				
			||||||
    else:
 | 
					    else:
 | 
				
			||||||
        return {'threshold': threshold, 'rolled': rolled, 'success': False}
 | 
					        result['success'] = False
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    return result
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user