Dec-01-2021, 07:38 PM
You need the range of the generator to match the range of the checkers. Since Python starts at 0 I would generate values 0..99 to have 100 possible values for statpoint. Next I would write the if code differently
for i in range (level): statpoint = random.randint(0, 99) if statpoint < 20): HP = HP + 1 elif statpoint < 40: MP = MP + 1 elif statpoint < 60: ME = ME + 1 elif statpoint < 80: ATK = ATK + 1 else SPD = SPD + 1Your RPG is going to be pretty lonely with only 1 player and no NPC's. How do you keep track of stats for multiple characters?