MZ Changing the Substitute "entry point"

Where can I edit what maximum % of HP are required for the Substitute attribute to kick in?
Change isDying() to hpRate() like below and then edit the rate (currently 0.5)

BattleManager.checkSubstitute = function(target) {
return target.hpRate() < 0.5 && !this._action.isCertainHit();
};
Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/changing-the-substitute-entry-point.178252/