仮RPGの進捗ノート20250120-20250126
仮RPGの進捗を記載するノートです。20250120-20250126分。
仮RPGの進捗を記載するノートです。20240930-20241006分。
//============================================================================= // TT_DefeatedEnemyDisplay.js // ---------------------------------------------------------------------------- // Copyright (c) 2024 たくろう_りらっくすーぷ // This software is released under the MIT License. // http://opensource.org/licenses/mit-license.php // ---------------------------------------------------------------------------- // Last Updated: 2024/10/01 // // Version // 1.0.0 2024/10/01 初版 // ---------------------------------------------------------------------------- // [Blog] : https://re-lacksoup-recipenote.bullet.site/ // [X(Twitter)]: https://x.com/relacksoup //============================================================================= /*: * @plugindesc 倒れた敵も敵ターゲット選択画面に表示し続け、非活性状態で表示します。 (Version 1.0.0) * @author たくろう_りらっくすーぷ * * @help * このプラグインは、倒れた敵を含むすべての敵をターゲット選択画面に表示し続け、 * 倒れた敵を非活性状態で表示します。(Version 1.0.0) * * ◆プラグインパラメーター * 今のところありません * * ◆使用方法: * プラグインを導入するだけで機能します。追加の設定は必要ありません。 * * ◆機能: * 1. すべての敵(倒れた敵を含む)が敵ターゲット選択画面に表示されます。 * 2. 倒れた敵は非活性状態(薄く表示)で、異なる文字色で表示されます。 * 3. 倒れた敵は選択できません。 * * ◆注意 * このプラグインは、RPGツクールMVのコアスクリプトを変更します。 * 他のバトル関連のプラグインと競合する可能性があるため、 * プラグインマネージャーでの順序に注意してください。 */ (function() { // ウィンドウに表示する敵リストを作成する Window_BattleEnemy.prototype.refresh = function() { this._enemies = $gameTroop.members(); Window_Selectable.prototype.refresh.call(this); }; // 敵の選択可能状態を判定する Window_BattleEnemy.prototype.isCurrentItemEnabled = function() { var enemy = this.enemy(); return enemy && enemy.isAlive(); }; // 敵の表示名を取得する Window_BattleEnemy.prototype.enemyName = function(enemy) { return enemy.name(); }; // 敵の名前を描画する Window_BattleEnemy.prototype.drawItem = function(index) { var enemy = this._enemies[index]; var name = this.enemyName(enemy); var rect = this.itemRectForText(index); this.changePaintOpacity(enemy.isAlive()); this.contents.fontSize = this.standardFontSize(); if (enemy.isAlive()) { this.resetTextColor(); } else { this.changeTextColor(this.deathColor()); } this.drawText(name, rect.x, rect.y, rect.width); this.changePaintOpacity(true); }; // 倒れた敵の文字色を定義する Window_BattleEnemy.prototype.deathColor = function() { return this.textColor(7); // 灰色 (デフォルトカラーパレットの7番目) }; })();