ultimate-angel-zerachiel/www/js/plugins/ActorCommand_kai.js
2024-01-17 11:38:37 -06:00

44 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//rpg_windows.jsから抜き出し
//バトルコマンドの編集。
//不要なバトルコマンドはコメントアウトすれば表示されない。
/*:
* @plugindesc 任意のタイミングで、アイテムを選択不可にします。
* @author ゆわか
*
* @param Variable ID
* @desc 表示状態を管理する変数のID。
* @default 0
*
* @help このプラグインには、プラグインコマンドはありません。
*
* デフォルトのコマンドのみに対応しています。
* パラメータで指定した変数の値を変更する事によって
* 表示状態を変えます。
*
*  0 表示
*  1 選択できないが、コマンドは表示
*  2 コマンドそのものを非表示
*
*クレジット不要・改変可
*/
(function () {
var parameters = PluginManager.parameters("ActorCommand_kai");
var variableId = Number(parameters["Variable ID"] || 0);
var sentakuhuka = false;
Window_ActorCommand.prototype.makeCommandList = function () {
if (this._actor) {
this.addAttackCommand(); //攻撃
this.addSkillCommands(); //スキル
this.addGuardCommand(); //防御
if ($gameVariables.value(variableId) == 0) {
this.addItemCommand(); //アイテム表示
}
if ($gameVariables.value(variableId) == 1) {
this.addCommand(TextManager.item, false, sentakuhuka); //アイテム使用不可だが表示
}
}
};
})();