Project1

标题: 有无大佬帮忙修复一下这个插件的衍生bug [打印本页]

作者: qq1293616440    时间: 3 天前
标题: 有无大佬帮忙修复一下这个插件的衍生bug
找到一个可以复刻FF“双重吟唱”技能的插件,但是这个插件会导致“行动次数增加”的特性失效。具体表现为具有该特性的角色会在本回合无限选择行动,而不会转到选择下一个角色的行动。
这个插件效果还是不错的,有点不太舍得抛弃他,所以上论坛来问问有无大佬能帮忙做个补丁修补一下 谢谢大家

dingk_Multicast.zip

5.58 KB, 下载次数: 5


作者: jie119168    时间: 前天 21:12
不确定会不会有bug,有待更多测试
1.更换行动清空规则(这一步可以不做,但会导致多次行动的角色在任意一次取消行动时清空所有刚选完的技能。改动后,仅在其中触发过本插件多次技能的前提下才会触发清空。)
JAVASCRIPT 代码复制
  1. Game_Battler.prototype.resetMulticast = function() {
  2.         if(this._isMulticast){
  3.                 this.clearActions();
  4.            if (this.canMove()) {
  5.                 let actionTimes = this.makeActionTimes();
  6.                 this._actions = [];
  7.                 for (let i = 0; i < actionTimes; i++) {
  8.                         this._actions.push(new Game_Action(this));
  9.                 }
  10.         }
  11.         }
  12.         this._isMulticast = false;
  13.         this._multicastType = 0;
  14.         this._multicastSkills = [];
  15.         if (Imported.YEP_X_SkillCostItems) {
  16.                 $gameParty.restoreContainers(this._mcItems, this._mcWeapons, this._mcArmors);
  17.                 this._mcItems = JsonEx.makeDeepCopy($gameParty._items);
  18.                 this._mcWeapons = JsonEx.makeDeepCopy($gameParty._weapons);
  19.                 this._mcArmors = JsonEx.makeDeepCopy($gameParty._armors);
  20.         }
  21. };

2.将startActorCommandSelection全部改为selectPreviousCommand
JAVASCRIPT 代码复制
  1. dingk.Multicast.SB_selectPreviousCommand = Scene_Battle.prototype.selectPreviousCommand;
  2. Scene_Battle.prototype.selectPreviousCommand = function() {
  3.         dingk.Multicast.SB_selectPreviousCommand.call(this);
  4.         let actor = BattleManager.actor();
  5.         if (Imported.YEP_X_SkillCostItems) {
  6.                 actor._mcItems = JsonEx.makeDeepCopy($gameParty._items);
  7.                 actor._mcWeapons = JsonEx.makeDeepCopy($gameParty._weapons);
  8.                 actor._mcArmors = JsonEx.makeDeepCopy($gameParty._armors);
  9.         }
  10.         if(actor){actor.resetMulticast();
  11.         this._skillWindow.resetMulticast();}
  12. };





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1