不确定会不会有bug,有待更多测试
1.更换行动清空规则(这一步可以不做,但会导致多次行动的角色在任意一次取消行动时清空所有刚选完的技能。改动后,仅在其中触发过本插件多次技能的前提下才会触发清空。)
Game_Battler.prototype.resetMulticast = function() { if(this._isMulticast){ this.clearActions(); if (this.canMove()) { let actionTimes = this.makeActionTimes(); this._actions = []; for (let i = 0; i < actionTimes; i++) { this._actions.push(new Game_Action(this)); } } } this._isMulticast = false; this._multicastType = 0; this._multicastSkills = []; if (Imported.YEP_X_SkillCostItems) { $gameParty.restoreContainers(this._mcItems, this._mcWeapons, this._mcArmors); this._mcItems = JsonEx.makeDeepCopy($gameParty._items); this._mcWeapons = JsonEx.makeDeepCopy($gameParty._weapons); this._mcArmors = JsonEx.makeDeepCopy($gameParty._armors); } };
Game_Battler.prototype.resetMulticast = function() {
if(this._isMulticast){
this.clearActions();
if (this.canMove()) {
let actionTimes = this.makeActionTimes();
this._actions = [];
for (let i = 0; i < actionTimes; i++) {
this._actions.push(new Game_Action(this));
}
}
}
this._isMulticast = false;
this._multicastType = 0;
this._multicastSkills = [];
if (Imported.YEP_X_SkillCostItems) {
$gameParty.restoreContainers(this._mcItems, this._mcWeapons, this._mcArmors);
this._mcItems = JsonEx.makeDeepCopy($gameParty._items);
this._mcWeapons = JsonEx.makeDeepCopy($gameParty._weapons);
this._mcArmors = JsonEx.makeDeepCopy($gameParty._armors);
}
};
2.将startActorCommandSelection全部改为selectPreviousCommand
dingk.Multicast.SB_selectPreviousCommand = Scene_Battle.prototype.selectPreviousCommand; Scene_Battle.prototype.selectPreviousCommand = function() { dingk.Multicast.SB_selectPreviousCommand.call(this); let actor = BattleManager.actor(); if (Imported.YEP_X_SkillCostItems) { actor._mcItems = JsonEx.makeDeepCopy($gameParty._items); actor._mcWeapons = JsonEx.makeDeepCopy($gameParty._weapons); actor._mcArmors = JsonEx.makeDeepCopy($gameParty._armors); } if(actor){actor.resetMulticast(); this._skillWindow.resetMulticast();} };
dingk.Multicast.SB_selectPreviousCommand = Scene_Battle.prototype.selectPreviousCommand;
Scene_Battle.prototype.selectPreviousCommand = function() {
dingk.Multicast.SB_selectPreviousCommand.call(this);
let actor = BattleManager.actor();
if (Imported.YEP_X_SkillCostItems) {
actor._mcItems = JsonEx.makeDeepCopy($gameParty._items);
actor._mcWeapons = JsonEx.makeDeepCopy($gameParty._weapons);
actor._mcArmors = JsonEx.makeDeepCopy($gameParty._armors);
}
if(actor){actor.resetMulticast();
this._skillWindow.resetMulticast();}
};
|