Files
GameLauncher/plugins/BattleTurnRecoverMp.js
T

32 lines
938 B
JavaScript

/*:
* @target MZ MV
* @plugindesc 戦闘ターン開始時およびコマンド選択時に味方全員のMPを全回復します。
* @author GameLauncher
*
* @help
* 戦闘中、ターン開始時や行動決定時にパーティメンバー全員のMPを最大値まで回復します。
*/
(() => {
'use strict';
const forceFullRecoverPartyMp = function() {
if ($gameParty) {
$gameParty.battleMembers().forEach(function(actor) {
actor.setMp(actor.mmp);
});
}
};
const _BattleManager_startTurn = BattleManager.startTurn;
BattleManager.startTurn = function() {
forceFullRecoverPartyMp();
_BattleManager_startTurn.call(this);
};
const _BattleManager_startInput = BattleManager.startInput;
BattleManager.startInput = function() {
forceFullRecoverPartyMp();
_BattleManager_startInput.call(this);
};
})();