From 0b6c71a15bb03d4644cb5d67e1a023833c278fcd Mon Sep 17 00:00:00 2001 From: futokoro Date: Tue, 4 Dec 2018 19:43:11 +0900 Subject: [PATCH] upload --- FTKR_AltTB_BattleEventConditions.ja.md | 3 +- FTKR_AltTB_BattleEventConditions.js | 15 +- FTKR_AltTB_SelectTouchedActor.js | 17 ++- FTKR_AlternatingTurnBattle.ja.md | 3 +- FTKR_AlternatingTurnBattle.js | 189 +++++++++++++++++-------- FTKR_BattleActionPoints.ja.md | 3 +- FTKR_BattleActionPoints.js | 43 ++++-- README.md | 14 +- 8 files changed, 193 insertions(+), 94 deletions(-) diff --git a/FTKR_AltTB_BattleEventConditions.ja.md b/FTKR_AltTB_BattleEventConditions.ja.md index 007d3d1..1ecf8bf 100644 --- a/FTKR_AltTB_BattleEventConditions.ja.md +++ b/FTKR_AltTB_BattleEventConditions.ja.md @@ -102,7 +102,8 @@ FTKR_AltTB_BattleEventConditions.js | バージョン | 公開日 | 更新内容 | | --- | --- | --- | -| [ver1.0.0](FTKR_AltTB_BattleEventConditions.js) | 2018/12/02 | 新規作成 | +| [ver1.0.1](FTKR_AltTB_BattleEventConditions.js) | 2018/12/04 | バトルイベントの条件が一部反映されない不具合を修正 | +| ver1.0.0 | 2018/12/02 | 新規作成 | # ライセンス diff --git a/FTKR_AltTB_BattleEventConditions.js b/FTKR_AltTB_BattleEventConditions.js index 975b70c..e07b80c 100644 --- a/FTKR_AltTB_BattleEventConditions.js +++ b/FTKR_AltTB_BattleEventConditions.js @@ -4,8 +4,8 @@ // プラグインNo : 93 // 作成者   : フトコロ // 作成日   : 2018/12/02 -// 最終更新日 : -// バージョン : v1.0.0 +// 最終更新日 : 2018/12/04 +// バージョン : v1.0.1 //============================================================================= var Imported = Imported || {}; @@ -17,7 +17,7 @@ FTKR.AltTB.BEC = FTKR.AltTB.BEC || {}; //============================================================================= /*: - * @plugindesc v1.0.0 バトルイベントにFTKR_AltTB専用のターン条件を設定できる + * @plugindesc v1.0.1 バトルイベントにFTKR_AltTB専用のターン条件を設定できる * @author フトコロ * * @help @@ -64,6 +64,9 @@ FTKR.AltTB.BEC = FTKR.AltTB.BEC || {}; * 変更来歴 *----------------------------------------------------------------------------- * + * v1.0.1 - 2018/12/04 : 不具合修正 + * 1. バトルイベントの条件が一部反映されない不具合を修正。 + * * v1.0.0 - 2018/12/02 : 初版作成 * *----------------------------------------------------------------------------- @@ -138,10 +141,8 @@ if(Imported.FTKR_AltTB) (function() { var _Game_Troop_meetsConditions = Game_Troop.prototype.meetsConditions; Game_Troop.prototype.meetsConditions = function(page) { var c = page.conditions; - var result = _Game_Troop_meetsConditions.call(this, page); - if (!c.turnStarting && !c.playerTurnStarting && !c.playerTurnEnding && - !c.enemyTurnStarting && !c.enemyTurnEnding && !result) { - return false; // Conditions not set + if (!_Game_Troop_meetsConditions.call(this, page)) { + return false; } if (c.turnStarting) { if (!BattleManager.isTurnStart()) { diff --git a/FTKR_AltTB_SelectTouchedActor.js b/FTKR_AltTB_SelectTouchedActor.js index 8329ae3..71b6cc0 100644 --- a/FTKR_AltTB_SelectTouchedActor.js +++ b/FTKR_AltTB_SelectTouchedActor.js @@ -3,9 +3,9 @@ // FTKR_AltTB_SelectTouchedActor.js // プラグインNo : 92 // 作成者 : フトコロ -// 作成日 : 2018/12/01 -// 最終更新日 : -// バージョン : v1.0.0 +// 作成日 : 2018/12/02 +// 最終更新日 : 2018/12/04 +// バージョン : v1.0.1 //============================================================================= var Imported = Imported || {}; @@ -17,7 +17,7 @@ FTKR.AltTB.STA = FTKR.AltTB.STA || {}; //============================================================================= /*: - * @plugindesc v1.0.0 ステータスウィンドウ内をクリックして、その行または列のアクターを選択する + * @plugindesc v1.0.1 ステータスウィンドウ内をクリックして、その行または列のアクターを選択する * @author フトコロ * * @help @@ -61,7 +61,10 @@ FTKR.AltTB.STA = FTKR.AltTB.STA || {}; * 変更来歴 *----------------------------------------------------------------------------- * - * v1.0.0 - 2018/12/01 : 初版作成 + * v1.0.1 - 2018/12/04 : 不具合修正 + * 1. アクターを選択するとエラーになる不具合を修正。 + * + * v1.0.0 - 2018/12/02 : 初版作成 * *----------------------------------------------------------------------------- */ @@ -129,7 +132,7 @@ if(Imported.FTKR_AltTB) (function() { if (this.isTouchedInsideDeactive()) { var index = this.isCursorIndexOnMouse(); if (index >= 0 && BattleManager.isTouchedOutsideActorCommandWindow()) { - if ($gameParty.members()[index].canInput() || !FTKR.AltTB.disableChangeActorWPCA) { + if ($gameParty.members()[index].canInput()) { this.changeActorOnMouse(index); } else { SoundManager.playBuzzer(); @@ -142,7 +145,7 @@ if(Imported.FTKR_AltTB) (function() { }; Window_BattleStatus.prototype.changeActorOnMouse = function(index) { - BattleManager.setNextCommand(index); + BattleManager.changeActorAltTB(index); this.select(BattleManager.actor().index()); BattleManager._actorCommandWindow.setup(BattleManager.actor()); SoundManager.playCursor(); diff --git a/FTKR_AlternatingTurnBattle.ja.md b/FTKR_AlternatingTurnBattle.ja.md index 490917e..7453067 100644 --- a/FTKR_AlternatingTurnBattle.ja.md +++ b/FTKR_AlternatingTurnBattle.ja.md @@ -116,7 +116,8 @@ AttackChain.js | バージョン | 公開日 | 更新内容 | | --- | --- | --- | -| [ver2.0.0](FTKR_AlternatingTurnBattle.js) | 2018/12/02 | 行動回数に関する処理を見直し、別プラグインに独立
アクションポイントに関する処理を見直し、別プラグインに独立
タッチまたはクリックでコマンド選択中のアクターを変更する機能を別プラグインに独立
ターン中の処理を全面見直し
行動制約のあるパーティーメンバーの行動処理を見直し
アクターの自動戦闘の効果が出るように変更 | +| [ver2.0.1](FTKR_AlternatingTurnBattle.js) | 2018/12/02 | プラグインパラメータ Disable Change When Party Cannot Act を削除しパーティーが行動できなくなった時に、自動でパーティーコマンドに戻すように変更
パーティーが行動できなくなった時に、ターン終了コマンドに自動でカーソルを合わせる機能を追加 | +| ver2.0.0 | 2018/12/02 | 行動回数に関する処理を見直し、別プラグインに独立
アクションポイントに関する処理を見直し、別プラグインに独立
タッチまたはクリックでコマンド選択中のアクターを変更する機能を別プラグインに独立
ターン中の処理を全面見直し
行動制約のあるパーティーメンバーの行動処理を見直し
アクターの自動戦闘の効果が出るように変更 | | [ver1.6.2](archive/FTKR_AlternatingTurnBattle_1.6.2.js) | 2018/11/17 | 行動制限付きステートを付与したターンに解除した場合に、戦闘が止まってしまう不具合を修正。この場合は、行動できずにターンを終了するようにしました。 | | ver1.6.1 | 2018/11/11 | ACを無効にした場合に、エネミーターンが終了しない不具合を修正
「逃げる」コマンドに失敗した時に、1ターン余計に進んでしまう不具合を修正
「逃げる」コマンドを実行し戦闘終了させた時に、画面外に逃げたSVアクターが画面内に戻ってきてしまう不具合を修正 | | ver1.6.0 | 2018/11/09 | アクターコマンドおおびアイテム・スキルウィンドウのアクションポイントを非表示にする機能を追加 | diff --git a/FTKR_AlternatingTurnBattle.js b/FTKR_AlternatingTurnBattle.js index 152e510..c959748 100644 --- a/FTKR_AlternatingTurnBattle.js +++ b/FTKR_AlternatingTurnBattle.js @@ -4,8 +4,8 @@ // プラグインNo : 75 // 作成者 : フトコロ // 作成日 : 2018/04/08 -// 最終更新日 : 2018/12/02 -// バージョン : v2.0.0 +// 最終更新日 : 2018/12/04 +// バージョン : v2.0.1 //============================================================================= var Imported = Imported || {}; @@ -16,7 +16,7 @@ FTKR.AltTB = FTKR.AltTB || {}; //============================================================================= /*: - * @plugindesc v2.0.0 敵味方交互にターンが進むターン制戦闘システム + * @plugindesc v2.0.1 敵味方交互にターンが進むターン制戦闘システム * @author フトコロ * * @param TurnEnd Command @@ -33,7 +33,7 @@ FTKR.AltTB = FTKR.AltTB || {}; * @default 0 * * @param Start Actor Command - * @desc プレイヤーターンでアクターのコマンドから始める + * @desc プレイヤーターンで先頭のアクターを選択した状態から始める * @type boolean * @on 有効 * @off 無効 @@ -46,13 +46,13 @@ FTKR.AltTB = FTKR.AltTB || {}; * @off 無効 * @default false * - * @param Disable Change When Party Cannot Act - * @desc パーティーが行動できなくなった時に、アクターを変更する操作を禁止して、パーティーコマンドに戻す。 + * @param Enabled Auto Select TurnEnd Command + * @desc パーティーが行動できなくなった時に、パーティーコマンドの「ターン終了」に自動でカーソルを合わせる。 * @type boolean * @on 有効 * @off 無効 * @default false - * + * * @param Confused Action Timing * @desc 行動制約ステートによるアクターの行動タイミングを設定する。 * @type select @@ -129,8 +129,8 @@ FTKR.AltTB = FTKR.AltTB || {}; * FTKR_AlternatingTurnBattle.js * * ↓このプラグインよりも下に登録↓ - * FTKR_BattleActionTimes.js (バトル画面に行動回数を表示) * FTKR_BattleActionPoints.js (消費コストにアクションポイントを追加) + * FTKR_BattleActionTimes.js (バトル画面に行動回数を表示) * FTKR_BattleWindowLayout.js (バトル画面のコマンドの位置を変更) * FTKR_CSS_BattleStatus.js (バトル画面のステータス表示を変更) * FTKR_DisplayCommandFrame.js (カーソルの変わりに枠や画像を表示) @@ -154,6 +154,12 @@ FTKR.AltTB = FTKR.AltTB || {}; * 変更来歴 *----------------------------------------------------------------------------- * + * v2.0.1 - 2018/12/04 : 不具合修正 + * 1. プラグインパラメータ Disable Change When Party Cannot Act を削除し + * パーティーが行動できなくなった時に、自動でパーティーコマンドに戻すように変更。 + * 2. パーティーが行動できなくなった時に、ターン終了コマンドに自動でカーソルを + * 合わせる機能を追加。 + * * v2.0.0 - 2018/12/02 : 全面仕様変更、ヘルプを削除 * 1. 行動回数に関する処理を見直し、別プラグインに独立。 * 2. アクションポイントに関する処理を見直し、別プラグインに独立。 @@ -194,7 +200,7 @@ FTKR.AltTB = FTKR.AltTB || {}; changePlayer : (paramParse(parameters['Change Player']) || 0), startActorCmd : (paramParse(parameters['Start Actor Command']) || false), enableAutoTurnEnd : (paramParse(parameters['Enable Auto Player Turn End']) || false), - disableChangeActorWPCA : (paramParse(parameters['Disable Change When Party Cannot Act']) || false), + enabledAutoTurnEndCmd : (paramParse(parameters['Enabled Auto Select TurnEnd Command']) || false), confusedActionTiming : +(paramParse(parameters['Confused Action Timing']) || 0), disableAC : (paramParse(parameters['Disable AC']) || false), activatedSv : (paramParse(parameters['Activated Sv Actor Sign']) || 0), @@ -202,7 +208,7 @@ FTKR.AltTB = FTKR.AltTB || {}; notSelectActivatedActor : (paramParse(parameters['Cannot Select Activated Actor']) || false), }; - FTKR.test = false; + FTKR.test = true; //============================================================================= // BattleManager @@ -278,16 +284,14 @@ FTKR.AltTB = FTKR.AltTB || {}; }; /*---------------------------------------------------------------------- - isPartyTurn + _isPlayerTurn -----------------------------------------------------------------------*/ BattleManager.changeTrunSide = function() { if (FTKR.AltTB.notActivatedSv && this._isPlayerTurn) { $gameParty.setActionState(''); } this._isPlayerTurn = !this._isPlayerTurn; - this._isGroupTurnStart = true; this.clearInputCount(); - if (FTKR.AltTB.enableAP) this.changeAPWindow(); }; /*---------------------------------------------------------------------- @@ -317,7 +321,7 @@ FTKR.AltTB = FTKR.AltTB || {}; //書き換え BattleManager.selectNextCommand = function() { do { - if ($gameParty.canInput() || !FTKR.AltTB.disableChangeActorWPCA) { + if ($gameParty.canInput()) { if (this._actorIndex + 1 >= $gameParty.size()) { this.changeActorAltTB(0); } else { @@ -332,7 +336,7 @@ FTKR.AltTB = FTKR.AltTB || {}; //書き換え BattleManager.selectPreviousCommand = function() { do { - if ($gameParty.canInput() || !FTKR.AltTB.disableChangeActorWPCA) { + if ($gameParty.canInput()) { if (this._actorIndex - 1 < 0) { this.changeActorAltTB($gameParty.size() - 1); } else { @@ -421,10 +425,10 @@ FTKR.AltTB = FTKR.AltTB || {}; if (!this.isBusy() && !this.updateEvent()) { switch (this._phase) { case 'start': - this.updateStart(); + this.updateStart();//変更 break; case 'turnStart': - this.updateTurnStart(); + this.updateTurnStart();//追加 break; case 'turn': this.updateTurn(); @@ -432,9 +436,6 @@ FTKR.AltTB = FTKR.AltTB || {}; case 'action': this.updateAction(); break; - case 'actionEnd': - this.updateActionEnd(); - break; case 'turnEnd': this.updateTurnEnd(); break; @@ -445,6 +446,23 @@ FTKR.AltTB = FTKR.AltTB || {}; } }; + //書き換え + BattleManager.updateEvent = function() { + switch (this._phase) { + case 'start': + case 'turnStart': + case 'turn': + case 'turnEnd': + if (this.isActionForced()) { + this.processForcedAction(); + return true; + } else { + return this.updateEventMain(); + } + } + return this.checkAbort(); + }; + //書き換え BattleManager.checkAbort = function() { if ($gameParty.isEmpty() || this.isAborting()) { @@ -532,37 +550,50 @@ FTKR.AltTB = FTKR.AltTB || {}; -----------------------------------------------------------------------*/ //書き換え BattleManager.updateTurn = function() { + if (FTKR.test) console.log('updateTurn'); $gameParty.requestMotionRefresh(); if (!this.checkGroupTurnEnd()) { if (this._isGroupTurnStart) { this.updateGroupTurnStart(); this._isGroupTurnStart = false; - } else if (!this.checkChangePartyMode()){ - this.updateGroupDuringTurn(); + } else if (!this.checkChangePlayerMode()){ + this.updateDuringGroupTurn(); } } }; + //group turn end BattleManager.checkGroupTurnEnd = function() { if (this.isPlayerTurnEnd()) { - this._phase = 'turn'; - this.changeTrunSide(); - this._isGroupTurnStart = true; + this.updatePlayerTurnEnd(); return true; } else if (this.isEnemyTurnEnd()) { - this._phase = 'turnEnd'; + this.updateEnemyTurnEnd(); return true; } return false; }; + BattleManager.updatePlayerTurnEnd = function() { + this._phase = 'turn'; + this.changeTrunSide(); + this._isGroupTurnStart = true; + }; + + BattleManager.updateEnemyTurnEnd = function() { + this._phase = 'turnEnd'; + }; + + //group turn start BattleManager.updateGroupTurnStart = function() { + if (FTKR.test) console.log('updateGroupTurnStart'); if (FTKR.AltTB.startActorCmd && this.isPlayerInputTurn()) { this.selectNextCommand(); } }; - BattleManager.checkChangePartyMode = function() { + //during group turn + BattleManager.checkChangePlayerMode = function() { if (this._isPlayerTurn) { if (this.isPlayerInputTurnEnd()) { this._isGroupTurnStart = true; @@ -577,15 +608,16 @@ FTKR.AltTB = FTKR.AltTB || {}; return false; }; - BattleManager.updateGroupDuringTurn = function() { + BattleManager.updateDuringGroupTurn = function() { if (this.isPlayerInputTurn()) { this.updatePlayerInputTurn(); } else { - this.updateNormalDuringTurn(); + this.updateDuringNormalTurn(); } }; BattleManager.updatePlayerInputTurn = function() { + if (FTKR.test) console.log('updatePlayerInputTurn'); if (this.checkAutoTurnChange()) { this.commandTurnEnd(); } else { @@ -605,7 +637,7 @@ FTKR.AltTB = FTKR.AltTB || {}; BattleManager.autoSelectNextActor = function() { if (!FTKR.AltTB.notSelectActivatedActor || !this.actor()) return; - if (!$gameParty.canInput() && FTKR.AltTB.disableChangeActorWPCA) { + if (!$gameParty.canInput()) { this.clearActorAltTB(); } else { if (!this.actor().canInput()) { @@ -616,7 +648,11 @@ FTKR.AltTB = FTKR.AltTB || {}; } }; - BattleManager.updateNormalDuringTurn = function() { + BattleManager.updateDuringNormalTurn = function() { + if (FTKR.test) { + var name = this._subject ? this._subject.name() : ''; + console.log('updateDuringNormalTurn', name); + } if (!this._subject) { this._subject = this.getNextSubject(); } @@ -649,18 +685,19 @@ FTKR.AltTB = FTKR.AltTB || {}; subject.removeCurrentAction(); }; + /*---------------------------------------------------------------------- + action フェーズ + -----------------------------------------------------------------------*/ //書き換え BattleManager.endAction = function() { - if (FTKR.test) console.log('endAction', this._subject.name()); - this._phase = 'actionEnd'; + if (FTKR.test) console.log('endAction', this._subject.name(), this._subject.numActions()); +// this._phase = 'actionEnd'; this._logWindow.endAction(this._subject); + this.updateActionEnd(); }; - /*---------------------------------------------------------------------- - actionEnd フェーズ - -----------------------------------------------------------------------*/ BattleManager.updateActionEnd = function() { - if (FTKR.test) console.log('updateActionEnd', this._subject.name(), this._subject.numActions()); +// if (FTKR.test) console.log('updateActionEnd', this._subject.name(), this._subject.numActions()); this._phase = 'turn'; var subject = this._subject; subject.onAllActionsEnd(); @@ -707,7 +744,7 @@ FTKR.AltTB = FTKR.AltTB || {}; Game_Battler.prototype.removeCurrentAction = function() { if (!FTKR.AltTB.disableAC) { this._actions.shift(); - console.log('removeCurrentAction', this.name(), this.numActions()); + if (FTKR.test) console.log('removeCurrentAction', this.name(), this.numActions()); } }; @@ -756,7 +793,7 @@ FTKR.AltTB = FTKR.AltTB || {}; this._partyCommandWindow = new Window_PartyCommand(); this._partyCommandWindow.setHandler('fight', this.commandFight.bind(this)); this._partyCommandWindow.setHandler('escape', this.commandEscape.bind(this)); - this._partyCommandWindow.setHandler('turnEnd', this.commandTurnEnd.bind(this)); + this._partyCommandWindow.setHandler('turnEnd', this.commandTurnEnd.bind(this));//追加 this._partyCommandWindow.deselect(); this.addWindow(this._partyCommandWindow); }; @@ -779,6 +816,14 @@ FTKR.AltTB = FTKR.AltTB || {}; BattleManager.commandTurnEnd(); }; + var _Scene_Battle_startPartyCommandSelection = Scene_Battle.prototype.startPartyCommandSelection; + Scene_Battle.prototype.startPartyCommandSelection = function() { + _Scene_Battle_startPartyCommandSelection.call(this); + if (!$gameParty.canInput() && FTKR.AltTB.enabledAutoTurnEndCmd) { + this._partyCommandWindow.selectSymbol('turnEnd'); + } + }; + //書き換え Scene_Battle.prototype.createActorCommandWindow = function() { this._actorCommandWindow = new Window_ActorCommand(); @@ -786,10 +831,10 @@ FTKR.AltTB = FTKR.AltTB || {}; this._actorCommandWindow.setHandler('skill', this.commandSkill.bind(this)); this._actorCommandWindow.setHandler('guard', this.commandGuard.bind(this)); this._actorCommandWindow.setHandler('item', this.commandItem.bind(this)); - this._actorCommandWindow.setHandler('pageup', this.commandPageup.bind(this)); - this._actorCommandWindow.setHandler('pagedown',this.commandPagedown.bind(this)); - this._actorCommandWindow.setHandler('cancel', this.commandCancel.bind(this)); - this._actorCommandWindow.setStatusWindow(this._statusWindow); + this._actorCommandWindow.setHandler('pageup', this.commandPageup.bind(this));//追加 + this._actorCommandWindow.setHandler('pagedown',this.commandPagedown.bind(this));//追加 + this._actorCommandWindow.setHandler('cancel', this.commandCancel.bind(this));//変更 + this._actorCommandWindow.setStatusWindow(this._statusWindow);//追加 this.addWindow(this._actorCommandWindow); }; @@ -848,15 +893,29 @@ FTKR.AltTB = FTKR.AltTB || {}; this.setup(BattleManager.actor()); }; + Window_ActorCommand.prototype.selectNextActor = function() { + if ($gameParty.canInput()) { + BattleManager.selectNextCommand(); + this.changeInputWindow(); + SoundManager.playCursor(); + } else { + SoundManager.playBuzzer(); + } + }; + + Window_ActorCommand.prototype.selectPreviousActor = function() { + if ($gameParty.canInput()) { + BattleManager.selectPreviousCommand(); + this.changeInputWindow(); + SoundManager.playCursor(); + } else { + SoundManager.playBuzzer(); + } + }; + Window_ActorCommand.prototype.cursorRight = function(wrap) { if (FTKR.AltTB.changePlayer === 1) { - if ($gameParty.canInput() || !FTKR.AltTB.disableChangeActorWPCA) { - BattleManager.selectNextCommand(); - this.changeInputWindow(); - SoundManager.playCursor(); - } else { - SoundManager.playBuzzer(); - } + this.selectNextActor(); } else { Window_Selectable.prototype.cursorRight.call(this, wrap); } @@ -864,13 +923,7 @@ FTKR.AltTB = FTKR.AltTB || {}; Window_ActorCommand.prototype.cursorLeft = function(wrap) { if (FTKR.AltTB.changePlayer === 1) { - if ($gameParty.canInput() || !FTKR.AltTB.disableChangeActorWPCA) { - BattleManager.selectPreviousCommand(); - this.changeInputWindow(); - SoundManager.playCursor(); - } else { - SoundManager.playBuzzer(); - } + this.selectPreviousActor(); } else { Window_Selectable.prototype.cursorLeft.call(this, wrap); } @@ -921,9 +974,6 @@ FTKR.AltTB = FTKR.AltTB || {}; case 'actionTargetList': this.updateActionTargetList() break; - case 'actionEnd': - this.updateActionEnd(); - break; case 'turnEnd': this.updateTurnEnd(); break; @@ -934,6 +984,25 @@ FTKR.AltTB = FTKR.AltTB || {}; } }; + BattleManager.updateEvent = function() { + if (this._processingForcedAction) return false; + switch (this._phase) { + case 'start': + case 'turnStart': + case 'turn': + case 'turnEnd': + case 'actionList': + case 'actionTargetList': + if (this.isActionForced()) { + this.processForcedAction(); + return true; + } else { + return this.updateEventMain(); + } + } + return this.checkAbort(); + }; + var _YPE_BEC_BattleManager_forceAction = BattleManager.forceAction; BattleManager.forceAction = function(battler) { if (this._subject) this._subject.clearResult(); diff --git a/FTKR_BattleActionPoints.ja.md b/FTKR_BattleActionPoints.ja.md index 48f2e6d..8457c42 100644 --- a/FTKR_BattleActionPoints.ja.md +++ b/FTKR_BattleActionPoints.ja.md @@ -586,7 +586,8 @@ FTKR_ADD_CURRENT_AP 1 | バージョン | 公開日 | 更新内容 | | --- | --- | --- | -| [ver1.0.1](FTKR_BattleActionPoints.js) | 2018/12/03 | プラグインコマンドの誤記修正 | +| [ver1.0.2](FTKR_BattleActionPoints.js) | 2018/12/04 | プラグインパラメータ Show AP Window が正しく反映されない不具合を修正 | +| ver1.0.1 | 2018/12/03 | プラグインコマンドの誤記修正 | | ver1.0.0 | 2018/12/02 | FTKR_BattleActionPoints v1.6.2 の、悪アクションポイントに関する処理を独立。処理を見直して別プラグインとして作成 | # ライセンス diff --git a/FTKR_BattleActionPoints.js b/FTKR_BattleActionPoints.js index fac7d5b..77f7bb4 100644 --- a/FTKR_BattleActionPoints.js +++ b/FTKR_BattleActionPoints.js @@ -4,8 +4,8 @@ // プラグインNo : 91 // 作成者 : フトコロ // 作成日 : 2018/12/02 -// 最終更新日 : 2018/12/03 -// バージョン : v1.0.1 +// 最終更新日 : 2018/12/04 +// バージョン : v1.0.2 //============================================================================= var Imported = Imported || {}; @@ -16,7 +16,7 @@ FTKR.BAP = FTKR.BAP || {}; //============================================================================= /*: - * @plugindesc v1.0.1 消費コスト用のパラメータ「アクションポイント(AP)」を導入するプラグイン + * @plugindesc v1.0.2 消費コスト用のパラメータ「アクションポイント(AP)」を導入するプラグイン * @author フトコロ * * @param Init Start AP @@ -225,7 +225,6 @@ FTKR.BAP = FTKR.BAP || {}; * 2. 以下のプラグインと組み合わせる場合は、プラグイン管理の順番に注意してください。 * * FTKR_CustomSimpleActorStatus.js (ステータス表示を変更) - * FTKR_FVActorAnimation.js (フロントビューでアクター画像にアニメーション) * FTKR_AlternatingTurnBattle.js * ↑このプラグインよりも上に登録↑ * FTKR_BattleActionPoints.js @@ -249,8 +248,11 @@ FTKR.BAP = FTKR.BAP || {}; * 変更来歴 *----------------------------------------------------------------------------- * + * v1.0.2 - 2018/12/04 : 不具合修正 + * 1. プラグインパラメータ Show AP Window が正しく反映されない不具合を修正。 + * * v1.0.1 - 2018/12/03 : 不具合修正 - * 1. プラグインコマンドの誤記修正。 + * 1. プラグインコマンドの誤記修正。 * * v1.0.0 - 2018/12/02 : 初版作成 * @@ -550,6 +552,7 @@ function Window_BattleActionPoint() { var _BattleManager_startInput = BattleManager.startInput; BattleManager.startInput = function() { + if (FTKR.BAP.showApWindow) this._partyApWindow.open(); this.turnRefreshAP(); _BattleManager_startInput.call(this); }; @@ -562,10 +565,24 @@ function Window_BattleActionPoint() { } }; + var _BattleManager_startTurn = BattleManager.startTurn; + BattleManager.startTurn = function() { + if (!Imported.FTKR_AltTB && FTKR.BAP.showApWindow !== 2) this._partyApWindow.close(); + _BattleManager_startTurn.call(this); + }; + + if (Imported.FTKR_AltTB) { + var _BattleManager_updatePlayerTurnEnd = BattleManager.updatePlayerTurnEnd; + BattleManager.updatePlayerTurnEnd = function() { + _BattleManager_updatePlayerTurnEnd.call(this); + if (FTKR.BAP.showApWindow !== 2) this._partyApWindow.close(); + }; + } + BattleManager.payItemApCost = function(battler) { if (battler && battler.isActor()) { var action = battler.inputtingAction(); - this._usedActionPoints.push($gameParty.payApCost(battler, action.item())); + this._usedActionPoints.push(battler.payApCost(action.item())); this._partyApWindow.refresh(); } }; @@ -669,7 +686,7 @@ function Window_BattleActionPoint() { if (FTKR.BAP.enabledForceActionApCost && !this.canPayAP(skill)) return; _Game_Battler_forceAction.call(this, skillId, targetIndex); if (FTKR.BAP.enabledForceActionApCost) { - $gameParty.payApCost(this, skill); + this.payApCost(skill); BattleManager._partyApWindow.refresh(); } }; @@ -697,6 +714,12 @@ function Window_BattleActionPoint() { },this); }; + Game_Actor.prototype.payApCost = function(item) { + var cost = this.itemApCost(item); + $gameParty.gainActionPoint(-cost); + return cost; + }; + //============================================================================= // Game_Party //============================================================================= @@ -781,12 +804,6 @@ function Window_BattleActionPoint() { this.refreshActionPoint(); }; - Game_Party.prototype.payApCost = function(actor, item) { - var cost = actor.itemApCost(item); - this._actionPoint -= cost; - return cost; - }; - Game_Party.prototype.growActionPoint = function(value) { this._maxActionPoint += value; this.refreshActionPoint(); diff --git a/README.md b/README.md index 27a63fc..81a027f 100644 --- a/README.md +++ b/README.md @@ -215,7 +215,7 @@ FTKR_CSS_GDMはFTKR_CustomSimpleActorStatusに統合しました | [FTKR_ExGuardEffect](FTKR_ExGuardEffect.js) | [あり](FTKR_ExGuardEffect.ja.md) | [v1.0.0](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_ExGuardEffect.js) | 2018/04/15 | 防御の効果を拡張する | | [FTKR_DisplayEnemyParameters](FTKR_DisplayEnemyParameters.js) | [あり](FTKR_DisplayEnemyParameters.ja.md) | [v1.0.0](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_DisplayEnemyParameters.js) | 2018/04/17 | 戦闘画面にエネミーのパラメータを表示する | | [FTKR_BattleActionTimes](FTKR_BattleActionTimes.js) | [あり](FTKR_BattleActionTimes.ja.md) | [v1.0.1](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_BattleActionTimes.js) | 2018/12/03 | 戦闘中の行動回数を表示・操作する | -| [FTKR_BattleActionPoints](FTKR_BattleActionPoints.js) | [あり](FTKR_BattleActionPoints.ja.md) | [v1.0.1](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_BattleActionPoints.js) | 2018/12/03 | 消費コスト用のパラメータ「アクションポイント(AP)」を導入する | +| [FTKR_BattleActionPoints](FTKR_BattleActionPoints.js) | [あり](FTKR_BattleActionPoints.ja.md) | [v1.0.2](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_BattleActionPoints.js) | 2018/12/04 | 消費コスト用のパラメータ「アクションポイント(AP)」を導入する | FTKR_BattleCommandIconはFTKR_ExBattleCommandに統合しました @@ -225,9 +225,9 @@ FTKR_BattleCommandIconはFTKR_ExBattleCommandに統合しました | プラグイン | マニュアル | ダウンロード | 更新日 | 説明 | |:-----------|:-----------:|:-------------|:-------------|:-------------| -| [FTKR_AlternatingTurnBattle](FTKR_AlternatingTurnBattle.js) | [仮版](FTKR_AlternatingTurnBattle.ja.md) | [v2.0.0](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_AlternatingTurnBattle.js) | 2018/12/02 | 敵味方交互にターンが進むターン制戦闘システム | -| [FTKR_AltTB_SelectTouchedActor](FTKR_AltTB_SelectTouchedActor.js) | なし | [v1.0.0](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_AltTB_SelectTouchedActor.js) | 2018/12/02 | ステータスウィンドウ内をクリックして、その行または列のアクターを選択する
<以下のプラグインが必要>
[FTKR_AlternatingTurnBattle](FTKR_AlternatingTurnBattle.js) | -| [FTKR_AltTB_BattleEventConditions](FTKR_AltTB_BattleEventConditions.js) | [あり](FTKR_AltTB_BattleEventConditions.ja.md) | [v1.0.0](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_AltTB_BattleEventConditions.js) | 2018/12/02 | バトルイベントにFTKR_AltTB専用のターン条件を設定できる
<以下のプラグインが必要>
[FTKR_AlternatingTurnBattle](FTKR_AlternatingTurnBattle.js) | +| [FTKR_AlternatingTurnBattle](FTKR_AlternatingTurnBattle.js) | [仮版](FTKR_AlternatingTurnBattle.ja.md) | [v2.0.1](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_AlternatingTurnBattle.js) | 2018/12/04 | 敵味方交互にターンが進むターン制戦闘システム | +| [FTKR_AltTB_SelectTouchedActor](FTKR_AltTB_SelectTouchedActor.js) | なし | [v1.0.1](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_AltTB_SelectTouchedActor.js) | 2018/12/04 | ステータスウィンドウ内をクリックして、その行または列のアクターを選択する
<以下のプラグインが必要>
[FTKR_AlternatingTurnBattle](FTKR_AlternatingTurnBattle.js) | +| [FTKR_AltTB_BattleEventConditions](FTKR_AltTB_BattleEventConditions.js) | [あり](FTKR_AltTB_BattleEventConditions.ja.md) | [v1.0.1](https://raw.githubusercontent.com/futokoro/RPGMaker/master/FTKR_AltTB_BattleEventConditions.js) | 2018/12/04 | バトルイベントにFTKR_AltTB専用のターン条件を設定できる
<以下のプラグインが必要>
[FTKR_AlternatingTurnBattle](FTKR_AlternatingTurnBattle.js) | [目次に戻る](#目次) @@ -321,6 +321,12 @@ FTKR_BattleCommandIconはFTKR_ExBattleCommandに統合しました 2018/12の更新情報 +### 2018/12/04 +* [FTKR_AlternatingTurnBattle](FTKR_AlternatingTurnBattle.ja.md) v2.0.1 +* [FTKR_BattleActionPoints](FTKR_BattleActionPoints.ja.md) v1.0.2 +* [FTKR_AltTB_SelectTouchedActor](FTKR_AltTB_SelectTouchedActor.js) v1.0.1 +* [FTKR_AltTB_BattleEventConditions](FTKR_AltTB_BattleEventConditions.ja.md) v1.0.1 + ### 2018/12/03 * [FTKR_BattleActionTimes](FTKR_BattleActionTimes.ja.md) v1.0.1 * [FTKR_BattleActionPoints](FTKR_BattleActionPoints.ja.md) v1.0.1