I feel like I've seen people ask this before, but I wasn't sure how to phrase the search terms.
I'm trying to make a spell that makes the player regenerate AP faster as long as they avoid completely exhausting their AP. If the player hits 0 AP, the bonus is supposed to go away until they fully regenerate their AP. My problem is that I have no idea how to get the player's actual maximum AP. I can get their base value, but I don't know how to get that after modifications, like hardcore penalties, AP bonuses, and so on.
Is there a reliable way to get this value?