*Sigh* You probably tired of me already but there is still minor bug/inconsistence with energyMax. Game using one expression to calculate energyMax if fitness<1000 and another expression if fitness>1000. Thas cause a setback of energyMax when fitness reaches 1000. I started game with energyMax=10 and used "Go for the run outside" repeatedly, my energyMax increased to 12, than it dropped to 10 (when fitness reached 1000) and after that started to increase again without problem (it is 17 now).
It is just minor inconvenience and You may not want to fix it but it is still there. May be for TODO list. Easiest way is just to forget about starting expression for energyMax and use energyMax=10 while fitness<1000. If You for some reason still want to use different ways to calculate energyMax with fitness<1000 and fitness>1000 you want to be sure that both expressions give same result at fitness=1000 or there will be "jump down" or "jump up" at that threshold. For example You can use
if energyMax[you]<25 and fitness[you]>1000: energyMax[you]=2+fitness[you]/100
You are right about there being a bug but wrong about the reason. I searched all of the code for every instance of energyMax and found one line of code that was adding to energyMax just for the run[you] stat. That code isn't needed anymore so I commented it out.
I changed the formula to make it harder to gain more energyMax after looking at my full playthrough save game. I have a 14K fitness score. If the old formula was used I'd end up with 14,000/100=140 energyMax if it wasn't limited to 25. It is reasonable for players to get a fitness score of 10K during a playthrough.
Current formula:
if energyMax[you]<25 and fitness[you]>1000: energyMax[you]=fitness[you]/100
New formula (you don't have this code yet):
if energyMax[you]<25 and fitness[you]>2000: energyMax[you]=fitness[you]/200
The minimum of 10 and maximum of 25 haven't changed.
So once a player reaches a fitness score of 5000, they will max out at 25 energyMax.
I also removed all of the energy[you]= and energyMax[you]= code from character generation. The formula will handle all the numbers now so that code wasn't needed.
I added the 'run' and 'dance' stats that were missing from the character description screen. All the stats that affect fitness are on the same row.
I also adjusted all of the stat bonuses and penalties for the various upbringing choices: boxing, street, dance, education
In general, the bonuses have been increased. For example, if you choose 'boxing' and 'street' during character creation (with a toned body type), your stats will look like this:
Muscle: 1982
Boxing: 1010
Martial Arts/Kung Fu: 200
Wrestling: 200
Run: 600
Dance: 0
fitness[you]=run[you]+boxing[you]+kungfu[you]+sambo[you]+dance[you]
1010+200+200+600+0=2010
That still puts you at an energyMax of 10, however every 200 fitness that you gain will raise your energyMax by 1. If you remain diligent with keeping up on your exercise, 50% - 75% of the way through the game you'll max out at 25. If I left the formula the way it is now, you'd max out at 25 fairly quickly (roughly 25% of the way through the game). I'm open to feedback but this appears to be a reasonable solution (not too fast and not too slow).
If you'd like to play with these changes I've attached new code. Your bug should be fixed.