Any way to disable a party member's passive effects while out of battle?

I have a party member in my game that has a 200% Pharmacology value, so that a healing item that normally heals 50 HP will instead heal 100 HP. In battle, this works as intended - if he uses the item, it heals for double, and if someone else uses the item, it heals for only 50 HP.

Problem is, as long as that character is in the party, healing items will also heal the party for double while outside of battle. Is there any way to restrict this character's Pharmacology value to only work during battle?
I could be mistaken. But I think that only happens if that character is the Party Leader.

Aside from rearranging the party. I think you can go into rmmz_object.js and set the PHArmacology property to return "1" when not in battle.

if ($gameParty.inBattle()) {return this.sparam(3)} else {return 1};

Or, you can edit the itemEffectRecoverHp and itemEffectRecoverMp functions (also in rmmz_objects.js) That's where it multiples the recovery value by the character's .pha

Those are the only 2 places in the core scripts where it's called. I can't account for any plugins that might get this value differently.
I could be mistaken. But I think that only happens if that character is the Party Leader.

Aside from rearranging the party. I think you can go into rmmz_object.js and set the PHArmacology property to return "1" when not in battle.

if ($gameParty.inBattle()) {return 1} else {return this.sparam(3)};

Or, you can edit the itemEffectRecoverHp and itemEffectRecoverMp functions (also in rmmz_objects.js) That's where it multiples the recovery value by the character's .pha

Those are the only 2 places in the core scripts where it's called. I can't account for any plugins that might get this value differently.

Nah, the character in question isn't party leader.

I'd rather not mess with the default scripts directly, since who knows how it could affect other things. Is there a plugin that might fix it?
JavaScript:
/*
 * --------------------------------------------------
 * No PHArmacology outside of battle
 * 2023 Coyotecraft
 * --------------------------------------------------
 *
 */

/*:
 * @target MZ
 * @url https://www.arpgmaker.com
 * @plugindesc Sets a character's PHArmacology multiplier to 1 outside of battle.
 * @author Coyotecraft
 * @help
 * No plugin commands.
 *
 */

(() => {

Object.defineProperties(Game_BattlerBase.prototype, {
    // PHArmacology
    pha: {
        get: function() {
            if ($gameParty.inBattle()) {return this.sparam(3)} else {return 1};
        },
        configurable: true
    }
});


})();
JavaScript:
/*
 * --------------------------------------------------
 * No PHArmacology outside of battle
 * 2023 Coyotecraft
 * --------------------------------------------------
 *
 */

/*:
 * @target MZ
 * @url https://www.arpgmaker.com
 * @plugindesc Sets a character's PHArmacology multiplier to 1 outside of battle.
 * @author Coyotecraft
 * @help
 * No plugin commands.
 *
 */

(() => {

Object.defineProperties(Game_BattlerBase.prototype, {
    // PHArmacology
    pha: {
        get: function() {
            if ($gameParty.inBattle()) {return this.sparam(3)} else {return 1};
        },
        configurable: true
    }
});


})();
Seems like it works! Thanks! 😀

Original thread: https://forums.rpgmakerweb.com/threads/any-way-to-disable-a-party-members-passive-effects-while-out-of-battle.154228/