I've finally managed to get some support in fixing up the code and the gym cooldowns are now working correctly
Just a tip: 30 minutes (regular) and 12 hours (super) is way too long of a cooldown period, unless it were per ability (strength, defense, speed, agility), as that is only 6 page views in 30 minutes. You want users on your game for longer than 30 minutes, as they could accomplish the gold/battle stuff in 30 minutes too. Time on screen would probably average out to about 15 minutes per day because of that limitation (perhaps 45 minutes for more dedicated users, over the span of an entire day).
I'd want them to be playing for 2+ consecutive hours or more, which is still possible with more features. But as for now, you have limited yourself to a very narrow window of keeping someone engaged and playing at one time. Not good if you want to eventually add ads as your average user time would be very low, a statistic that advertisers might want to know before selling some serious ad space.
I would recommend not doing 0.01% and 0.1% (a fixed number) and making it a range for both regular and super. This way, you can take the cooldown to 5 minutes/1 hour, and allow for training across all 4 abilities. Your page views and time on page will drastically increase with this simple implementation.
The hope is to get it in a good enough state to actually play for more than 5 minutes a time
The tip is an immediate fix for that.
the players I have waiting for this game are all cash cows ready to spend $$$.
I'd at first introduce skinning the character you decide to develop as money = an unfair advantage. Then, you could consider unique weapons, etc., but not unique enough that a non-paying member couldn't catch up with more gym time.
I will absolutely make provision for anyone who's been helping to have a healthy premium package added to their game account when the game eventually launches
Soon a levelling system will be implemented so you'll be able to level up and gain access to further game areas.
You hard-coded the gym (0.01/0.1%) into the game, and another idea here is to not hard-code this. I had levels in a database table that had the requirements necessary for each level so that I could easily modify experience, battle stats, etc., in order to advance to the next level without having to find the code where the level-up achievements are met and code it back in.
I could easily see level 2 was 50 experience, and could adjust that to 100 experience if it were too easy. Then, I added other things like number of battles won, which had to be hard-coded in to check if they could advance with what they have, but once that was in, leveling up was all determined based on statistics set in the database for each level so I wouldn't need to code in 100 levels, and could always add 101, 102, 103... levels without messing with the code.