Possible to call a max parameter value?

I'd like to write a formula that calls the max parameter value for a user.  What I mean is...

Say actor's agility is 50, and enemy's agility is 40.

current skill formula says:  if a.agi > b.agi -->  success / create effect

The problem for me is, let's say the actor gets a debuff to his agility, and now it's at 30.  I want the skill formula to still succeed--I want it to look up the 'max' agility value, not the debuffed value.  Is this possible?
I'm... not sure if it's possible.  Mostly because I've never attempted it before.

I guess where I would start is by assigning a variable to that particular stat and then having the formula use the value of that variable.  However, I'm not actually sure if it takes the default stat (before equipment bonuses and buffs/debuffs are applied) or if it uses whatever said stat is currently.

If it doesn't work the way you intend...  You might actually need a script to accomplish that.
It would be possible to get the base param without any alterations (via the Change Param event command [.add_param method] or features and buffs)

Go to Game_Battler (or Game_BattlerBase, no sure which), find the def param(param_id) and you'll see how the param calls return value is obtained... From there, you'd probably want to obtain the first value only.

Now if you want to still include param bonuses from the event command and features that add to the param and just remove the negative ones, that would be harder as you'd need to probably iterate thru the whole features list and get all positive modifications and not the negatives
What I'd want is to be able to choose which value I'm looking at, depending on the formula.  for example,

swift strike - if user's agi (regardless of buffs or debuffs) is higher than enemy's, do bonus dmg

lucky strike - if user's luk (including any buffs or debuffs) is higher than enemy's, do bonus dmg

so I'd want to look at the base value in the first skill, but not in the second. 
try using a.param_base[6] and see if it doesn't error and returns the value of agi without buffs...
going to sleep now but will try that tomorrow and post how it goes, thank you!
w8, got to check Ace and realized it should be

a.param_base(6) for user, b.param_base(6)  for target

For the list of IDs for each param, you can look at the upper part of Game_BattlerBase
OH, that seems to work! Thank you so much!
This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/possible-to-call-a-max-parameter-value.36994/