Just added these few lines to select how many times do you want to increase the capacity, with a check of the input.
Changes:
Checking if the input is valid
valid = False
while not valid:
try:
increase_times = int(input("How many times do you want to increase the capacity? (" + Fore.YELLOW + Style.BRIGHT + "+5 per time" + Style.RESET_ALL + "): "))
valid = True
except ValueError:
print(Fore.RED + Style.BRIGHT + "That's not a valid number.")
### Checking if you have enough Dragon Stones
if increase_times > get_user()['user']['stone']:
print(Fore.RED + Style.BRIGHT+ "You don't have enough Dragon Stones.")
pass
### Increasing the capacity
else:
for _ in range(increase_times):
increase_capacity()
Just added these few lines to select how many times do you want to increase the capacity, with a check of the input.
Changes:
Checking if the input is valid