if mov > lvl*2 or stren > lvl*2 or defen > lvl*2 or hp > lvl*2:
next_stat = "Level"
elif defen < lvl*2 and defen <= mov and defen <= stren and defen <= hp:
next_stat = "Defence"
elif stren < lvl*2 and stren <= defen and stren <= mov and stren <= hp:
next_stat = "Strength"
elif hp < lvl*2 and hp <= defen and hp <= stren and hp <= mov:
next_stat = "Endurance"
elif mov < lvl*2 and mov <= defen and mov <= stren and mov <= hp:
next_stat = "Agility"
elif defen < lvl*2:
next_stat = "Defence"
else:
next_stat = "Level"
Trains all stats evenly with priority of Defence > Strength > Endurance > Agility, but first makes sure that the Level is sufficient.
I have also tested this for about 30 levels + 60 of each stat and it hasn't let me down yet.
coundn't be \/ ?
if mov > lvl*2 and stren > lvl*2 and defen > lvl*2 and hp > lvl*2:
next_stat = "Level"
elif defen < lvl*2 and defen <= mov and defen <= stren and defen <= hp:
next_stat = "Defence"
elif stren < lvl*2 and stren <= defen and stren <= mov and stren <= hp:
next_stat = "Strength"
elif hp < lvl*2 and hp <= defen and hp <= stren and hp <= mov:
next_stat = "Endurance"
elif mov < lvl*2 and mov <= defen and mov <= stren and mov <= hp:
next_stat = "Agility"
elif defen < lvl*2:
next_stat = "Defence"
else:
next_stat = "Level"
because this way prioritize level if i hade level 10 and 21 hp and 1 str will level up instead build str.
anyone help me