code:
//=============================================================================
// Yanfly Engine Plugins - Skill Core
// YEP_SkillCore.js
//=============================================================================

var Imported = Imported || {};
Imported.YEP_SkillCore = true;

var Yanfly = Yanfly || {};
Yanfly.Skill = Yanfly.Skill || {};

//=============================================================================
/*:
 * @plugindesc v1.00 Skills are now given more functions and the ability to
 * require different types of costs.
 * @author Yanfly Engine Plugins
 *
 * @param ---General---
 * @default
 *
 * @param Cost Padding
 * @desc If a skill has multiple costs, this is the amount of pixels
 * used as padding in between the costs.
 * @default 4
 *
 * @param Command Alignment
 * @desc Adjusts the text alignment of the skill type window.
 * left     center     right
 * @default center
 *
 * @param ---HP Costs---
 * @default
 *
 * @param HP Format
 * @desc Adjusts the way HP cost appears in the skill list window.
 * %1 - Cost     %2 - MP
 * @default %1%2
 *
 * @param HP Font Size
 * @desc Adjusts the font size used to display HP.
 * Default: 28
 * @default 20
 *
 * @param HP Text Color
 * @desc Adjusts the text color used from the Window skin for HP.
 * Default: 21
 * @default 18
 *
 * @param HP Icon
 * @desc Choose what icon to use to represent HP costs.
 * Use 0 if you wish to not use an icon.
 * @default 162
 *
 * @param ---MP Costs---
 * @default
 *
 * @param MP Format
 * @desc Adjusts the way MP cost appears in the skill list window.
 * %1 - Cost     %2 - MP
 * @default %1%2
 *
 * @param MP Font Size
 * @desc Adjusts the font size used to display MP.
 * Default: 28
 * @default 20
 *
 * @param MP Text Color
 * @desc Adjusts the text color used from the Window skin for MP.
 * Default: 23
 * @default 23
 *
 * @param MP Icon
 * @desc Choose what icon to use to represent MP costs.
 * Use 0 if you wish to not use an icon.
 * @default 165
 *
 * @param ---TP Costs---
 * @default
 *
 * @param TP Format
 * @desc Adjusts the way TP cost appears in the skill list window.
 * %1 - Cost     %2 - TP
 * @default %1%2
 *
 * @param TP Font Size
 * @desc Adjusts the font size used to display TP.
 * Default: 28
 * @default 20
 *
 * @param TP Text Color
 * @desc Adjusts the text color used from the Window skin for TP.
 * Default: 29
 * @default 29
 *
 * @param TP Icon
 * @desc Choose what icon to use to represent TP costs.
 * Use 0 if you wish to not use an icon.
 * @default 164
 *
 * @help
 * ============================================================================
 * Introduction
 * ============================================================================
 *
 * Skills in RPG's consist of three main components: Costs, Damage, and
 * Effects. Although not all components are required for a skill, they
 * certainly make up a good chunk of it. Damage will be handled by another
 * plugin, but this plugin will provide a core handling for skill costs and
 * skill effects.
 *
 * This plugin also includes the ability for battlers to swap their HP, MP,
 * and/or TP gauges for something different if it would fit the character
 * better (for example, some classes don't use MP and/or TP).
 *
 * ============================================================================
 * Notetags
 * ============================================================================
 *
 * These notetags can adjust either skill costs or special skill effects.
 *
 * Skill Notetags:
 *   <HP Cost: x>
 *   Changes the skill to have x as its HP cost. RPG Maker MV's editor lacks
 *   HP cost functions so this would allow skills to use HP as their cost.
 *
 *   <HP Cost: x%>
 *   Changes the skill to cost a percentage of the character's MaxHP value.
 *
 *   <MP Cost: x>
 *   Changes the skill to have x as its MP cost.
 *   This helps bypass the database's hard limit of 9999.
 *
 *   <MP Cost: x%>
 *   Changes the skill to cost a percentage of the character's MaxMP value.
 *
 *   <TP Cost: x>
 *   Changes the skill to have x as its TP cost.
 *   This helps bypass the database's hard limit of 99.
 *
 *   <TP Cost: x%>
 *   Changes the skill to cost a percentage of the character's MaxTP value.
 *   Although the default MaxTP is 100, this tag will be useful for any
 *   plugins that will alter a character's MaxTP values.
 *
 * ============================================================================
 * Gauge Swapping
 * ============================================================================
 *
 * This plugin also lets you swap around the HP, MP, and TP Gauges to any order
 * you want assuming that all the plugins you use will keep the same order of
 * HP, MP, and TP and does not override the default gauge drawing process. If
 * you use any plugin extensions, they can be swaped in as well.
 *
 * Note: If you do not have 'Display TP in Battle' checked under the System tab
 * in the database, nothing will be shown for the third slot.
 *
 * Class Notetag:
 *   <Swap Gauge x: y>
 *   This will change gauge x (1, 2, or 3) to y. Replace y with 'HP', 'MP', or
 *   'TP' to have it display that gauge type in that gauge slot. If you wish
 *   for that slot to display nothing, insert 'Nothing' or 'Null' in place of
 *   y in the notetag.
 *
 * Weapon, Armor, and State Notetags:
 *   <Swap Gauge x: y>
 *   Actors with equipment or states  that contain these notetags or enemies
 *   with states that contain these notetags will display those swapped gauges
 *   in place of the default settings or settings defined by the Class or
 *   Enemy notetags.
 *
 *   Priority will go in the following order:
 *     Weapons, Armors, States, Class, Enemy
 *
 * ============================================================================
 * Lunatic Mode - Skill Costs
 * ============================================================================
 *
 * For users who want more control over skill costs and skill effects, there
 * exists notetags that allow you to apply code to the costs and/or effects of
 * a skill. For effects, this will also extend towards item control, as well.
 *
 *   <Custom HP Cost>       Example: <Custom HP Cost>
 *    code                            cost += $gameVariables.value(1);
 *    code                           </Custom HP Cost>
 *   </Custom HP Cost>
 *   This allows the skill to have a custom HP cost based off of code. For the
 *   piece of code, 'cost' is a variable already predefined with the HP Cost
 *   and the HP percentage cost.
 *
 *   <Custom MP Cost>       Example: <Custom MP Cost>
 *    code                            cost += $gameVariables.value(1);
 *    code                           </Custom MP Cost>
 *   </Custom MP Cost>
 *   This allows the skill to have a custom MP cost based off of code. For the
 *   piece of code, 'cost' is a variable already predefined with the MP Cost
 *   and the MP percentage cost.
 *
 *   <Custom TP Cost>       Example: <Custom TP Cost>
 *    code                            cost += $gameVariables.value(1);
 *    code                           </Custom TP Cost>
 *   </Custom TP Cost>
 *   This allows the skill to have a custom TP cost based off of code. For the
 *   piece of code, 'cost' is a variable already predefined with the TP Cost
 *   and the TP percentage cost.
 *
 * ============================================================================
 * Lunatic Mode - The Skill Phases
 * ============================================================================
 *
 * For this skill, multiple effects are applied and at different phases. The
 * various phases are as follows:
 *
 *    Before Effect Phase (influenced by this plugin)
 *    if skill successfully lands:
 *    - Pre-Damage Effect Phase (influenced by this plugin)
 *    - Damage Phase
 *    - Post-Damage Effect Phase (influenced by this plugin)
 *    - Item Trait Effects Phase
 *    After Effect Phase (influenced by this plugin)
 *
 * There's four phases which can be influenced by this plugin. Two of which do
 * not matter if the effect successfully lands or not, two of which do matter
 * if the skill does land.
 *
 * Skill and Item Notetags:
 *   <Before Eval>    <Pre-Damage Eval>    <Post-Damage Eval>    <After Eval>
 *    code             code                 code                  code
 *    code             code                 code                  code
 *   </Before Eval>   </Pre-Damage Eval>   </Post-Damage Eval>   </After Eval>
 *   If you wish to use custom effects for your skill, you can insert the
 *   respective notetags into the skill (or item) noteboxes and it will run the
 *   code that appears in between the tags. However, using any form of comments
 *   in this tag will block out code that follows.
 */
/*:ja
 * @plugindesc スキルシステムにより多くの機能を実装し、
 * コストの設定などができるようになります。
 * @author Yanfly Engine Plugins
 *
 * @param ---一般---
 * @default
 *
 * @param Cost Padding
 * @desc 1つのスキルが複数のコスト表示を持っている場合、
 * コスト間のパディングに用いられるピクセル数を指定します。
 * @default 4
 *
 * @param Command Alignment
 * @desc スキルタイプウィンドウでの、テキストの揃え方を指定します。
 * left(左)     center(中央)     right(右)
 * @default center
 *
 * @param ---HP消費---
 * @default
 *
 * @param HP Format
 * @desc スキルリストウィンドウでHPコストがどのように表示されるか調整します。
 * %1 - コスト     %2 - HP
 * @default %1%2
 *
 * @param HP Font Size
 * @desc HPを表示する際のフォントサイズを指定します。
 * Default: 28
 * @default 20
 *
 * @param HP Text Color
 * @desc HPのウィンドウスキンに使われるテキストカラーを指定します。
 * Default: 21
 * @default 18
 *
 * @param HP Icon
 * @desc HPコストを表すアイコンを指定します。
 * アイコン不要な場合は0を入力してください。
 * @default 162
 *
 * @param ---MP消費---
 * @default
 *
 * @param MP Format
 * @desc スキルリストウィンドウでMPコストがどのように表示されるか調整します。
 * %1 - コスト     %2 - MP
 * @default %1%2
 *
 * @param MP Font Size
 * @desc MPを表示する際のフォントサイズを指定します。
 * Default: 28
 * @default 20
 *
 * @param MP Text Color
 * @desc MPのウィンドウスキンに使われるテキストカラーを指定します。
 * Default: 23
 * @default 23
 *
 * @param MP Icon
 * @desc HPコストを表すアイコンを指定します。
 * アイコン不要な場合は0を入力してください。
 * @default 165
 *
 * @param ---TP Costs---
 * @default
 *
 * @param TP Format
 * @desc スキルリストウィンドウでTPコストがどのように表示されるか調整します。
 * %1 - コスト     %2 - TP
 * @default %1%2
 *
 * @param TP Font Size
 * @desc TPを表示する際のフォントサイズを指定します。
 * Default: 28
 * @default 20
 *
 * @param TP Text Color
 * @desc TPのウィンドウスキンに使われるテキストカラーを指定します。
 * Default: 29
 * @default 29
 *
 * @param TP Icon
 * @desc TPコストを表すアイコンを指定します。
 * アイコン不要な場合は0を入力してください。
 * @default 164
 *
 * @help
 * ============================================================================
 * Introduction
 * ============================================================================
 *
 * RPGにおいてスキルは、コスト・ダメージ・エフェクトの3つで構成されています。
 * 全てが必須というわけではありませんが、
 * これらの要素はスキルを構成する上で、大きな役割を占めています。
 * このプラグインでは上記3つのうち、コストとエフェクトのハンドリングを行います。
 *
 * またこのプラグインでは、HPやMP, TPゲージの表示を入れ替えて、
 * バトラーそれぞれの特徴により適した表示を行うことができます。
 * (MPやTPゲージを元々持たないクラスが居るため)
 *
 * ============================================================================
 * Notetags
 * ============================================================================
 *
 * 下記のNotetagはスキルコスト・特殊スキルエフェクトどちらにも適用できます。
 *
 * Skill Notetags:
 *   <HP Cost: x>
 *   スキル使用時に x だけHPを消費させます。
 *
 *   <HP Cost: x%>
 *   スキル使用時に、キャラクターの最大HPに対して x % を消費させます。
 *
 *   <MP Cost: x>
 *   スキル使用時に x だけMPを消費させます。
 *   この際、データベースの制限値である9999を無視することができます。
 *
 *   <MP Cost: x%>
 *   スキル使用時に、キャラクターの最大MPに対して x % を消費させます。
 *
 *   <TP Cost: x>
 *   スキル使用時に x だけTPを消費させます。
 *   この際、データベースの制限値である99を無視することができます。
 *
 *   <TP Cost: x%>
 *   スキル使用時に、キャラクターの最大TPに対して x % を消費させます。
 *   デフォルトの最大TPは100ですが、この最大値を変更させる
 *   プラグインに対してもこのタグは有効です。
 *
 * ============================================================================
 * Gauge Swapping
 * ============================================================================
 *
 * 全てのプラグインがHP/MP/TPを同様の法則で持っており、かつ
 * デフォルトのゲージ描画処理を上書きしないという前提のもとであれば、
 * HP/MP/TPゲージを好きな順番に入れ替えることができます。
 * 拡張プラグインを使っている場合でも、同様に入れ替えを行うことができます。
 *
 * 注＊データベースのシステムタブで「バトル画面で TP を表示」を
 * 有効にしていない場合、3つ目のスロットには何も表示されません。
 *
 * クラスのNotetag:
 *   <Swap Gauge x: y>
 *   ゲージ x (1,2,3)を y に変更します。 y の部分を'HP' 'MP' 'TP'
 *   に変更することで、ゲージスロットにゲージの種類を表示できます。
 *   スロットに何も表示させたくない場合は、y の部分に
 *   'Nothing' か 'Null' と入力してください。
 *
 * 武器、防具、ステートのNotetags:
 *   <Swap Gauge x: y>
 *   これらのNotetagを含む装備やステートを持っているアクターや敵については、
 *   デフォルトセッティングや、クラス/敵のNotetagで設定されたゲージの代わりに、
 *   カスタムされたゲージを表示できます。
 *
 *   下記の順序で優先順位付けが行われます:
 *     武器＞防具＞ステート＞クラス＞敵
 *
 * ============================================================================
 * Lunatic Mode - Skill Costs
 * ============================================================================
 *
 * スキルコストとエフェクトについて、より高度な操作を行いたいユーザー向けに、
 * それらに適用できるNotetagを以下に記します。
 * エフェクトについては、アイテムコントロール向けに拡張することもできます。
 *
 *   <Custom HP Cost>           例: <Custom HP Cost>
 *    code                            cost += $gameVariables.value(1);
 *    code                           </Custom HP Cost>
 *   </Custom HP Cost>
 *   スキルに、コードに基づいたカスタムHPコストを持たせることができます。
 *   'cost'はHPコストとHPコスト%によって定義済みの変数です。
 *
 *   <Custom MP Cost>           例: <Custom MP Cost>
 *    code                            cost += $gameVariables.value(1);
 *    code                           </Custom MP Cost>
 *   </Custom MP Cost>
 *   スキルに、コードに基づいたカスタムMPコストを持たせることができます。
 *   'cost'はMPコストとMPコスト%によって定義済みの変数です。
 *
 *   <Custom TP Cost>            例: <Custom TP Cost>
 *    code                            cost += $gameVariables.value(1);
 *    code                           </Custom TP Cost>
 *   </Custom TP Cost>
 *   スキルに、コードに基づいたカスタムTPコストを持たせることができます。
 *   'cost'はTPコストとTPコスト%によって定義済みの変数です。
 *
 * ============================================================================
 * Lunatic Mode - The Skill Phases
 * ============================================================================
 *
 * スキルに対して、複数のエフェクトがいくつかの段階で適用されます。
 * 各段階について以下に記します。
 *
 *    Before Effect Phase (このプラグインにより作用)
 *    スキルがヒットした場合:
 *    - Pre-Damage Effect Phase (このプラグインにより作用)
 *    - Damage Phase
 *    - Post-Damage Effect Phase (このプラグインにより作用)
 *    - Item Trait Effects Phase
 *    After Effect Phase (このプラグインにより作用)
 *
 * 上記のうち4段階がこのプラグインの影響を受けます。
 * そのうち2つは、スキルがヒットするか否かには左右されません。
 *
 * スキルとアイテムのNotetags:
 *   <Before Eval>    <Pre-Damage Eval>    <Post-Damage Eval>    <After Eval>
 *    code             code                 code                  code
 *    code             code                 code                  code
 *   </Before Eval>   </Pre-Damage Eval>   </Post-Damage Eval>   </After Eval>
 *   スキルに対してカスタムエフェクトを利用したい場合は、それぞれのNotetagを
 *   スキル(もしくはアイテム)のNoteboxに挿入し、タグ間のコードを実行できます。
 *   このタグ内に、どのような形式であれコメントを挿入してしまうと、
 *   後に続くコードは遮断されてしまいます。
 */

//=============================================================================

//=============================================================================
// Parameter Variables
//=============================================================================

Yanfly.Parameters = PluginManager.parameters("YEP_SkillCore");
Yanfly.Param = Yanfly.Param || {};
Yanfly.Icon = Yanfly.Icon || {};

Yanfly.Param.SCCCostPadding = Number(Yanfly.Parameters["Cost Padding"]);
Yanfly.Param.SCCTextAlign = String(Yanfly.Parameters["Command Alignment"]);
Yanfly.Param.SCCTpFormat = String(Yanfly.Parameters["TP Format"]);
Yanfly.Param.SCCTpFontSize = Number(Yanfly.Parameters["TP Font Size"]);
Yanfly.Param.SCCTpTextColor = Number(Yanfly.Parameters["TP Text Color"]);
Yanfly.Icon.Tp = Number(Yanfly.Parameters["TP Icon"]);
Yanfly.Param.SCCMpFormat = String(Yanfly.Parameters["MP Format"]);
Yanfly.Param.SCCMpFontSize = Number(Yanfly.Parameters["MP Font Size"]);
Yanfly.Param.SCCMpTextColor = Number(Yanfly.Parameters["MP Text Color"]);
Yanfly.Icon.Mp = Number(Yanfly.Parameters["MP Icon"]);
Yanfly.Param.SCCHpFormat = String(Yanfly.Parameters["HP Format"]);
Yanfly.Param.SCCHpFontSize = Number(Yanfly.Parameters["HP Font Size"]);
Yanfly.Param.SCCHpTextColor = Number(Yanfly.Parameters["HP Text Color"]);
Yanfly.Icon.Hp = Number(Yanfly.Parameters["HP Icon"]);

//=============================================================================
// DataManager
//=============================================================================

Yanfly.Skill.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
DataManager.isDatabaseLoaded = function () {
  if (!Yanfly.Skill.DataManager_isDatabaseLoaded.call(this)) return false;
  this.processSkillNotetags($dataSkills);
  this.processObjectNotetags($dataSkills);
  this.processObjectNotetags($dataItems);
  this.processGSCNotetags1($dataClasses);
  this.processGSCNotetags1($dataEnemies);
  this.processGSCNotetags2($dataWeapons);
  this.processGSCNotetags2($dataArmors);
  this.processGSCNotetags2($dataStates);
  return true;
};

DataManager.processSkillNotetags = function (group) {
  var note1 = /<(?:MP COST):[ ](\d+)>/i;
  var note2 = /<(?:MP COST):[ ](\d+)([%％])>/i;
  var note3 = /<(?:TP COST):[ ](\d+)>/i;
  var note4 = /<(?:TP COST):[ ](\d+)([%％])>/i;
  var note5 = /<(?:HP COST):[ ](\d+)>/i;
  var note6 = /<(?:HP COST):[ ](\d+)([%％])>/i;
  var noteMpEval1 = /<(?:MP COST EVAL|custom mp cost)>/i;
  var noteMpEval2 = /<\/(?:MP COST EVAL|custom mp cost)>/i;
  var noteTpEval1 = /<(?:TP COST EVAL|custom tp cost)>/i;
  var noteTpEval2 = /<\/(?:TP COST EVAL|custom tp cost)>/i;
  var noteHpEval1 = /<(?:HP COST EVAL|custom hp cost)>/i;
  var noteHpEval2 = /<\/(?:HP COST EVAL|custom hp cost)>/i;
  for (var n = 1; n < group.length; n++) {
    var obj = group[n];
    var notedata = obj.note.split(/[\r\n]+/);

    obj.hpCost = 0;
    obj.hpCostPer = 0.0;
    obj.mpCostPer = 0.0;
    obj.tpCostPer = 0.0;
    var evalMode = "none";
    obj.hpCostEval = "";
    obj.mpCostEval = "";
    obj.tpCostEval = "";

    for (var i = 0; i < notedata.length; i++) {
      var line = notedata[i];
      if (line.match(note1)) {
        obj.mpCost = parseInt(RegExp.$1);
      } else if (line.match(note2)) {
        obj.mpCostPer = parseFloat(RegExp.$1 * 0.01);
      } else if (line.match(note3)) {
        obj.tpCost = parseInt(RegExp.$1);
      } else if (line.match(note4)) {
        obj.tpCostPer = parseFloat(RegExp.$1 * 0.01);
      } else if (line.match(note5)) {
        obj.hpCost = parseInt(RegExp.$1);
      } else if (line.match(note6)) {
        obj.hpCostPer = parseFloat(RegExp.$1 * 0.01);
      } else if (line.match(noteMpEval1)) {
        evalMode = "mp";
      } else if (line.match(noteMpEval2)) {
        evalMode = "none";
      } else if (line.match(noteTpEval1)) {
        evalMode = "tp";
      } else if (line.match(noteTpEval2)) {
        evalMode = "none";
      } else if (line.match(noteHpEval1)) {
        evalMode = "hp";
      } else if (line.match(noteHpEval2)) {
        evalMode = "none";
      } else if (evalMode === "mp") {
        obj.mpCostEval = obj.mpCostEval + line + "\n";
      } else if (evalMode === "tp") {
        obj.tpCostEval = obj.tpCostEval + line + "\n";
      } else if (evalMode === "hp") {
        obj.hpCostEval = obj.hpCostEval + line + "\n";
      }
    }
  }
};

DataManager.processObjectNotetags = function (group) {
  var note1 = /<(?:BEFORE EVAL)>/i;
  var note2 = /<\/(?:BEFORE EVAL)>/i;
  var note3 = /<(?:PRE-DAMAGE EVAL)>/i;
  var note4 = /<\/(?:PRE-DAMAGE EVAL)>/i;
  var note5 = /<(?:POST-DAMAGE EVAL)>/i;
  var note6 = /<\/(?:POST-DAMAGE EVAL)>/i;
  var note7 = /<(?:AFTER EVAL)>/i;
  var note8 = /<\/(?:AFTER EVAL)>/i;
  for (var n = 1; n < group.length; n++) {
    var obj = group[n];
    var notedata = obj.note.split(/[\r\n]+/);

    var customMode = "none";
    obj.customBeforeEval = "";
    obj.customPreDamageEval = "";
    obj.customPostDamageEval = "";
    obj.customAfterEval = "";

    for (var i = 0; i < notedata.length; i++) {
      var line = notedata[i];
      if (line.match(note1)) {
        customMode = "before";
      } else if (line.match(note2)) {
        customMode = "none";
      } else if (line.match(note3)) {
        customMode = "pre-damage";
      } else if (line.match(note4)) {
        customMode = "none";
      } else if (line.match(note5)) {
        customMode = "post-damage";
      } else if (line.match(note6)) {
        customMode = "none";
      } else if (line.match(note7)) {
        customMode = "after";
      } else if (line.match(note8)) {
        customMode = "none";
      } else if (customMode === "before") {
        obj.customBeforeEval = obj.customBeforeEval + line + "\n";
      } else if (customMode === "pre-damage") {
        obj.customBeforeEval = obj.customPreDamageEval + line + "\n";
      } else if (customMode === "post-damage") {
        obj.customBeforeEval = obj.customPostDamageEval + line + "\n";
      } else if (customMode === "after") {
        obj.customBeforeEval = obj.customAfterEval + line + "\n";
      }
    }
  }
};

DataManager.processGSCNotetags1 = function (group) {
  for (var n = 1; n < group.length; n++) {
    var obj = group[n];
    var notedata = obj.note.split(/[\r\n]+/);

    obj.gauge1 = "HP";
    obj.gauge2 = "MP";
    obj.gauge3 = "TP";

    obj.gaugeIcon1 = 0;
    obj.gaugeIcon2 = 0;
    obj.gaugeIcon3 = 0;

    for (var i = 0; i < notedata.length; i++) {
      var line = notedata[i];
      if (line.match(/<(?:SWAP GAUGE|gauge)[ ](\d+):[ ](.*)>/i)) {
        var gauge = parseInt(RegExp.$1);
        var text = String(RegExp.$2).toUpperCase();
        if (["HP", "MP", "TP", "NOTHING", "NULL"].contains(text)) {
          if (gauge === 1) obj.gauge1 = text;
          if (gauge === 2) obj.gauge2 = text;
          if (gauge === 3) obj.gauge3 = text;
        }
      }
    }
  }
};

DataManager.processGSCNotetags2 = function (group) {
  for (var n = 1; n < group.length; n++) {
    var obj = group[n];
    var notedata = obj.note.split(/[\r\n]+/);

    obj.gauge1 = "UNDEFINED";
    obj.gauge2 = "UNDEFINED";
    obj.gauge3 = "UNDEFINED";

    obj.gaugeIcon1 = "UNDEFINED";
    obj.gaugeIcon2 = "UNDEFINED";
    obj.gaugeIcon3 = "UNDEFINED";

    for (var i = 0; i < notedata.length; i++) {
      var line = notedata[i];
      if (line.match(/<(?:SWAP GAUGE|gauge)[ ](\d+):[ ](.*)>/i)) {
        var gauge = parseInt(RegExp.$1);
        var text = String(RegExp.$2).toUpperCase();
        if (["HP", "MP", "TP", "NOTHING", "NULL"].contains(text)) {
          if (gauge === 1) obj.gauge1 = text;
          if (gauge === 2) obj.gauge2 = text;
          if (gauge === 3) obj.gauge3 = text;
        }
      }
    }
  }
};

//=============================================================================
// Game_BattlerBase
//=============================================================================

Game_BattlerBase.prototype.skillHpCost = function (skill) {
  var cost = skill.hpCost;
  var item = skill;
  var a = this;
  var user = this;
  var subject = this;
  var s = $gameSwitches._data;
  var v = $gameVariables._data;
  cost += this.mhp * skill.hpCostPer;
  eval(skill.hpCostEval);
  return Math.max(0, Math.floor(cost));
};

Game_BattlerBase.prototype.skillMpCost = function (skill) {
  var cost = skill.mpCost;
  var item = skill;
  var a = this;
  var user = this;
  var subject = this;
  var s = $gameSwitches._data;
  var v = $gameVariables._data;
  cost += this.mmp * skill.mpCostPer;
  eval(skill.mpCostEval);
  return Math.max(0, Math.floor(cost * this.mcr));
};

Game_BattlerBase.prototype.skillTpCost = function (skill) {
  var cost = skill.tpCost;
  var item = skill;
  var a = this;
  var user = this;
  var subject = this;
  var s = $gameSwitches._data;
  var v = $gameVariables._data;
  cost += this.maxTp() * skill.tpCostPer;
  eval(skill.tpCostEval);
  return Math.max(0, Math.floor(cost));
};

Yanfly.Skill.Game_BattlerBase_canPaySkillCost =
  Game_BattlerBase.prototype.canPaySkillCost;
Game_BattlerBase.prototype.canPaySkillCost = function (skill) {
  if (!this.canPaySkillHpCost(skill)) return false;
  return Yanfly.Skill.Game_BattlerBase_canPaySkillCost.call(this, skill);
};

Game_BattlerBase.prototype.canPaySkillHpCost = function (skill) {
  return this._hp > this.skillHpCost(skill);
};

Yanfly.Skill.Game_BattlerBase_paySkillCost =
  Game_BattlerBase.prototype.paySkillCost;
Game_BattlerBase.prototype.paySkillCost = function (skill) {
  Yanfly.Skill.Game_BattlerBase_paySkillCost.call(this, skill);
  this.paySkillHpCost(skill);
};

Game_BattlerBase.prototype.paySkillHpCost = function (skill) {
  this._hp -= this.skillHpCost(skill);
};

Game_BattlerBase.prototype.gauge1 = function () {
  return "HP";
};

Game_BattlerBase.prototype.gauge2 = function () {
  return "MP";
};

Game_BattlerBase.prototype.gauge3 = function () {
  return "TP";
};

Game_BattlerBase.prototype.gaugeIcon1 = function () {
  return 0;
};

Game_BattlerBase.prototype.gaugeIcon2 = function () {
  return 0;
};

Game_BattlerBase.prototype.gaugeIcon3 = function () {
  return 0;
};

//=============================================================================
// Game_Actor
//=============================================================================

Game_Actor.prototype.gauge1 = function () {
  for (var i = 0; i < this.equips().length; ++i) {
    var equip = this.equips()[i];
    if (!equip) continue;
    if (equip.gauge1 === "UNDEFINED") continue;
    return equip.gauge1;
  }
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gauge1 === "UNDEFINED") continue;
    return state.gauge1;
  }
  return this.currentClass().gauge1;
};

Game_Actor.prototype.gauge2 = function () {
  for (var i = 0; i < this.equips().length; ++i) {
    var equip = this.equips()[i];
    if (!equip) continue;
    if (equip.gauge2 === "UNDEFINED") continue;
    return equip.gauge2;
  }
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gauge2 === "UNDEFINED") continue;
    return state.gauge2;
  }
  return this.currentClass().gauge2;
};

Game_Actor.prototype.gauge3 = function () {
  for (var i = 0; i < this.equips().length; ++i) {
    var equip = this.equips()[i];
    if (!equip) continue;
    if (equip.gauge3 === "UNDEFINED") continue;
    return equip.gauge3;
  }
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gauge3 === "UNDEFINED") continue;
    return state.gauge3;
  }
  return this.currentClass().gauge3;
};

Game_Actor.prototype.gaugeIcon1 = function () {
  for (var i = 0; i < this.equips().length; ++i) {
    var equip = this.equips()[i];
    if (!equip) continue;
    if (equip.gaugeIcon1 === "UNDEFINED") continue;
    return equip.gaugeIcon1;
  }
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gaugeIcon1 === "UNDEFINED") continue;
    return state.gaugeIcon1;
  }
  return this.currentClass().gaugeIcon1;
};

Game_Actor.prototype.gaugeIcon2 = function () {
  for (var i = 0; i < this.equips().length; ++i) {
    var equip = this.equips()[i];
    if (!equip) continue;
    if (equip.gaugeIcon2 === "UNDEFINED") continue;
    return equip.gaugeIcon2;
  }
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gaugeIcon2 === "UNDEFINED") continue;
    return state.gaugeIcon2;
  }
  return this.currentClass().gaugeIcon2;
};

Game_Actor.prototype.gaugeIcon3 = function () {
  for (var i = 0; i < this.equips().length; ++i) {
    var equip = this.equips()[i];
    if (!equip) continue;
    if (equip.gaugeIcon3 === "UNDEFINED") continue;
    return equip.gaugeIcon3;
  }
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gaugeIcon3 === "UNDEFINED") continue;
    return state.gaugeIcon3;
  }
  return this.currentClass().gaugeIcon3;
};

//=============================================================================
// Game_Enemy
//=============================================================================

Game_Enemy.prototype.gauge1 = function () {
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gauge1 === "UNDEFINED") continue;
    return state.gauge1;
  }
  return this.enemy().gauge1;
};

Game_Enemy.prototype.gauge2 = function () {
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gauge2 === "UNDEFINED") continue;
    return state.gauge2;
  }
  return this.enemy().gauge2;
};

Game_Enemy.prototype.gauge3 = function () {
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gauge1 === "UNDEFINED") continue;
    return state.gauge1;
  }
  return this.enemy().gauge3;
};

Game_Enemy.prototype.gaugeIcon1 = function () {
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gaugeIcon1 === "UNDEFINED") continue;
    return state.gaugeIcon1;
  }
  return this.enemy().gaugeIcon1;
};

Game_Enemy.prototype.gaugeIcon2 = function () {
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gaugeIcon2 === "UNDEFINED") continue;
    return state.gaugeIcon2;
  }
  return this.enemy().gaugeIcon2;
};

Game_Enemy.prototype.gaugeIcon3 = function () {
  for (var i = 0; i < this.states().length; ++i) {
    var state = this.states()[i];
    if (!state) continue;
    if (state.gaugeIcon3 === "UNDEFINED") continue;
    return state.gaugeIcon3;
  }
  return this.enemy().gaugeIcon3;
};

//=============================================================================
// Game_Action
//=============================================================================

Yanfly.Skill.Game_Action_apply = Game_Action.prototype.apply;
Game_Action.prototype.apply = function (target) {
  this.applyBeforeEffect(target);
  this.applyBeforeEval(target);
  Yanfly.Skill.Game_Action_apply.call(this, target);
  this.applyAfterEffect(target);
  this.applyAfterEval(target);
};

Game_Action.prototype.applyBeforeEffect = function (target) {};

Game_Action.prototype.applyBeforeEval = function (target) {
  var item = this.item();
  var a = this.subject();
  var b = target;
  var user = this.subject();
  var subject = this.subject();
  var s = $gameSwitches._data;
  var v = $gameVariables._data;
  eval(item.customBeforeEval);
};

Game_Action.prototype.applyAfterEffect = function (target) {};

Game_Action.prototype.applyAfterEval = function (target) {
  var item = this.item();
  var a = this.subject();
  var b = target;
  var user = this.subject();
  var subject = this.subject();
  var s = $gameSwitches._data;
  var v = $gameVariables._data;
  eval(item.customAfterEval);
};

Yanfly.Skill.Game_Action_executeDamage = Game_Action.prototype.executeDamage;
Game_Action.prototype.executeDamage = function (target, value) {
  this.applyPreDamageEffect(target, value);
  this.applyPreDamageEval(target, value);
  Yanfly.Skill.Game_Action_executeDamage.call(this, target, value);
  this.applyPostDamageEffect(target, value);
  this.applyPostDamageEval(target, value);
};

Game_Action.prototype.applyPreDamageEffect = function (target, value) {};

Game_Action.prototype.applyPreDamageEval = function (target, value) {
  var item = this.item();
  var a = this.subject();
  var b = target;
  var user = this.subject();
  var subject = this.subject();
  var s = $gameSwitches._data;
  var v = $gameVariables._data;
  eval(item.customPreDamageEval);
};

Game_Action.prototype.applyPostDamageEffect = function (target, value) {};

Game_Action.prototype.applyPostDamageEval = function (target, value) {
  var item = this.item();
  var a = this.subject();
  var b = target;
  var user = this.subject();
  var subject = this.subject();
  var s = $gameSwitches._data;
  var v = $gameVariables._data;
  eval(item.customPostDamageEval);
};

//=============================================================================
// Window_Base
//=============================================================================

Yanfly.Skill.Window_Base_drawActorHp = Window_Base.prototype.drawActorHp;
Window_Base.prototype.drawActorHp = function (actor, x, y, width) {
  if (actor.gauge1() === "HP") {
    Yanfly.Skill.Window_Base_drawActorHp.call(this, actor, x, y, width);
  } else if (actor.gauge1() === "MP") {
    Yanfly.Skill.Window_Base_drawActorMp.call(this, actor, x, y, width);
  } else if (actor.gauge1() === "TP") {
    Yanfly.Skill.Window_Base_drawActorTp.call(this, actor, x, y, width);
  }
};

Yanfly.Skill.Window_Base_drawActorMp = Window_Base.prototype.drawActorMp;
Window_Base.prototype.drawActorMp = function (actor, x, y, width) {
  if (actor.gauge2() === "HP") {
    Yanfly.Skill.Window_Base_drawActorHp.call(this, actor, x, y, width);
  } else if (actor.gauge2() === "MP") {
    Yanfly.Skill.Window_Base_drawActorMp.call(this, actor, x, y, width);
  } else if (actor.gauge2() === "TP") {
    Yanfly.Skill.Window_Base_drawActorTp.call(this, actor, x, y, width);
  }
};

Yanfly.Skill.Window_Base_drawActorTp = Window_Base.prototype.drawActorTp;
Window_Base.prototype.drawActorTp = function (actor, x, y, width) {
  if (actor.gauge3() === "HP") {
    Yanfly.Skill.Window_Base_drawActorHp.call(this, actor, x, y, width);
  } else if (actor.gauge3() === "MP") {
    Yanfly.Skill.Window_Base_drawActorMp.call(this, actor, x, y, width);
  } else if (actor.gauge3() === "TP") {
    Yanfly.Skill.Window_Base_drawActorTp.call(this, actor, x, y, width);
  }
};

//=============================================================================
// Window_SkillList
//=============================================================================

Window_SkillType.prototype.itemTextAlign = function () {
  return Yanfly.Param.SCCTextAlign;
};

//=============================================================================
// Window_SkillList
//=============================================================================

Window_SkillList.prototype.drawSkillCost = function (skill, wx, wy, width) {
  var dw = width;
  dw = this.drawTpCost(skill, wx, wy, dw);
  dw = this.drawMpCost(skill, wx, wy, dw);
  dw = this.drawHpCost(skill, wx, wy, dw);
  dw = this.drawOtherCost(skill, wx, wy, dw);
};

Window_SkillList.prototype.drawTpCost = function (skill, wx, wy, dw) {
  if (this._actor.skillTpCost(skill) <= 0) {
    return dw;
  }
  if (Yanfly.Icon.Tp > 0) {
    var iw = wx + dw - Window_Base._iconWidth;
    this.drawIcon(Yanfly.Icon.Tp, iw, wy + 2);
    dw -= Window_Base._iconWidth + 2;
  }
  this.changeTextColor(this.textColor(Yanfly.Param.SCCTpTextColor));
  var fmt = Yanfly.Param.SCCTpFormat;
  var text = fmt.format(
    Yanfly.Util.toGroup(this._actor.skillTpCost(skill)),
    TextManager.tpA
  );
  this.contents.fontSize = Yanfly.Param.SCCTpFontSize;
  this.drawText(text, wx, wy, dw, "right");
  this.resetFontSettings();
  return dw - this.textWidth(text) - Yanfly.Param.SCCCostPadding;
};

Window_SkillList.prototype.drawMpCost = function (skill, wx, wy, dw) {
  if (this._actor.skillMpCost(skill) <= 0) {
    return dw;
  }
  if (Yanfly.Icon.Mp > 0) {
    var iw = wx + dw - Window_Base._iconWidth;
    this.drawIcon(Yanfly.Icon.Mp, iw, wy + 2);
    dw -= Window_Base._iconWidth + 2;
  }
  this.changeTextColor(this.textColor(Yanfly.Param.SCCMpTextColor));
  var fmt = Yanfly.Param.SCCMpFormat;
  var text = fmt.format(
    Yanfly.Util.toGroup(this._actor.skillMpCost(skill)),
    TextManager.mpA
  );
  this.contents.fontSize = Yanfly.Param.SCCMpFontSize;
  this.drawText(text, wx, wy, dw, "right");
  this.resetFontSettings();
  return dw - this.textWidth(text) - Yanfly.Param.SCCCostPadding;
};

Window_SkillList.prototype.drawHpCost = function (skill, wx, wy, dw) {
  if (this._actor.skillHpCost(skill) <= 0) {
    return dw;
  }
  if (Yanfly.Icon.Hp > 0) {
    var iw = wx + dw - Window_Base._iconWidth;
    this.drawIcon(Yanfly.Icon.Hp, iw, wy + 2);
    dw -= Window_Base._iconWidth + 2;
  }
  this.changeTextColor(this.textColor(Yanfly.Param.SCCHpTextColor));
  var fmt = Yanfly.Param.SCCHpFormat;
  var text = fmt.format(
    Yanfly.Util.toGroup(this._actor.skillHpCost(skill)),
    TextManager.hpA
  );
  this.contents.fontSize = Yanfly.Param.SCCHpFontSize;
  this.drawText(text, wx, wy, dw, "right");
  this.resetFontSettings();
  return dw - this.textWidth(text) - Yanfly.Param.SCCCostPadding;
};

Window_SkillList.prototype.drawOtherCost = function (skill, wx, wy, dw) {
  return dw;
};

//=============================================================================
// Utilities
//=============================================================================

Yanfly.Util = Yanfly.Util || {};

if (!Yanfly.Util.toGroup) {
  Yanfly.Util.toGroup = function (inVal) {
    return inVal;
  };
}

//=============================================================================
// End of File
//=============================================================================


code:
//=============================================================================
// Yanfly Engine Plugins - Victory Aftermath
// YEP_VictoryAftermath.js
//=============================================================================

var Imported = Imported || {};
Imported.YEP_VictoryAftermath = true;

var Yanfly = Yanfly || {};
Yanfly.VA = Yanfly.VA || {};

//=============================================================================
/*:
 * @plugindesc v1.00 Display an informative window after a battle is over
 * instead of message box text stating what the party earned.
 * @author Yanfly Engine Plugins
 *
 * @param ---General---
 * @default
 *
 * @param Victory Order
 * @desc This is the order the victory sequence will play out.
 * Separate each part with a space.
 * @default exp custom drops
 *
 * @param ---BGM---
 * @default
 *
 * @param Victory BGM
 * @desc This will be the BGM used when the battle is over.
 * @default Ship3
 *
 * @param BGM Volume
 * @desc This will be the volume of the BGM played.
 * @default 90
 *
 * @param BGM Pitch
 * @desc This will be the pitch of the BGM played.
 * @default 100
 *
 * @param BGM Pan
 * @desc This will be the pan of the BGM played.
 * @default 0
 *
 * @param ---Battle Results---
 * @default
 *
 * @param Cheer Wait
 * @desc This will be how many frames the actors will cheer for
 * before the Victory Aftermath windows appear.
 * @default 90
 *
 * @param Battle Results Text
 * @desc This is the text used for the battle results text.
 * @default Battle Results
 *
 * @param Battle Drops Text
 * @desc This is the text used for the drops gained in battle.
 * @default Battle Spoils
 *
 * @param ---EXP Window---
 * @default
 *
 * @param Level Up Text
 * @desc The text to be used when leveling up.
 * @default LEVEL UP!
 *
 * @param Max Level Text
 * @desc The text to be used when the actor is Max Level.
 * @default MAX LEVEL
 *
 * @param Gained EXP Text
 * @desc The text to label how much EXP was gained in battle.
 * @default Gained EXP
 *
 * @param Gained EXP Format
 * @desc The text to display how much EXP was gained in battle.
 * @default +%1
 *
 * @param EXP Gauge Color 1
 * @desc The skin color used in EXP Gauge Color 1 shown in the
 * Victory Aftermath Window.
 * @default 30
 *
 * @param EXP Gauge Color 2
 * @desc The skin color used in EXP Gauge Color 2 shown in the
 * Victory Aftermath Window.
 * @default 31
 *
 * @param Level Gauge Color 1
 * @desc The skin color used for the EXP Gauge Color 1 if the actor
 * has leveled up.
 * @default 14
 *
 * @param Level Gauge Color 2
 * @desc The skin color used for the EXP Gauge Color 2 if the actor
 * has leveled up.
 * @default 6
 *
 * @param Gauge Ticks
 * @desc This is how many ticks will occur before the gained EXP
 * gauge is full. Each tick is 4 frames.
 * @default 15
 *
 * @param Tick SE
 * @desc This will be the sound used while the EXP gauge fills up.
 * @default Absorb2
 *
 * @param Tick Volume
 * @desc This will be the volume of the BGM played.
 * @default 90
 *
 * @param Tick Pitch
 * @desc This will be the pitch of the BGM played.
 * @default 150
 *
 * @param Tick Pan
 * @desc This will be the pan of the BGM played.
 * @default 0
 *
 * @help
 * ============================================================================
 * Introduction
 * ============================================================================
 *
 * This plugin swaps out the victory messages from the default battle system in
 * favor of more informative windows to display. Adjust the parameters to
 * change the settings to fit your game.
 *
 * ============================================================================
 * Victory Aftermath
 * ============================================================================
 *
 * In the parameters, there's a 'Victory Order' parameter. This parameter lets
 * you choose the order of the steps in the Victory Aftermath.
 *
 * The default order is as follows:
 *           exp         Displays the EXP window.
 *           custom      Displays any custom plugin extensions.
 *           drops       Displays the drops window.
 *
 * If you switch the order of these steps, add steps, or remove steps from the
 * 'Victory Order' plugin, the Victory Aftermath will correspond to any changes
 * you have made.
 *
 * ============================================================================
 * Plugin Commands
 * ============================================================================
 *
 * If you wish to alter the Victory Aftermath sequence a bit, you can use the
 * following Plugin Commands.
 *
 * Plugin Commands:
 *   DisableVictoryAftermath   - Disables the Victory Aftermath sequence and
 *                               bypasses the Victory Aftermath music, too.
 *   EnableVictoryAftermath    - Enables the Victory Aftermath sequence if
 *                               it has been previously disabled.
 *   DisableVictoryMusic       - Disables the Victory Aftermath music to just
 *                               continue playing whatever was playing.
 *   EnableVictoryMusic        - Enables the Victory Aftermath music if it has
 *                               been previously disabled.
 */
/*:ja
 * @plugindesc 戦闘終了時の情報表示をカスタムします
 * @author Yanfly Engine Plugins
 *
 * @param ---一般---
 * @default
 *
 * @param Victory Order
 * @desc 勝利時の情報表示が、どのような順番で行われるか指定します。
 * それぞれのパートはスペースで区切ってください。
 * @default exp custom drops
 *
 * @param ---BGM---
 * @default
 *
 * @param Victory BGM
 * @desc 戦闘終了時のBGMを指定します。
 * @default Ship3
 *
 * @param BGM Volume
 * @desc 戦闘終了時のBGMボリュームを指定します。
 * @default 90
 *
 * @param BGM Pitch
 * @desc 戦闘終了時のBGMピッチを指定します。
 * @default 100
 *
 * @param BGM Pan
 * @desc 戦闘終了時のBGMパンを指定します。
 * @default 0
 *
 * @param ---戦闘結果---
 * @default
 *
 * @param Cheer Wait
 * @desc 勝利報告ウィンドウが表示される前に、
 * アクターが喜ぶフレーム数を指定します。
 * @default 90
 *
 * @param Battle Results Text
 * @desc 戦闘結果表示に使われるテキストを変更します。
 * @default 戦闘結果
 *
 * @param Battle Drops Text
 * @desc 戦闘で獲得したアイテム表示に使われるテキストを変更します。
 * @default 獲得物
 *
 * @param ---経験値---
 * @default
 *
 * @param Level Up Text
 * @desc レベルアップ時に使われるテキストを変更します。
 * @default LEVEL UP!
 *
 * @param Max Level Text
 * @desc アクターが最大レベルの時に使われるテキストを変更します。
 * @default MAX LEVEL
 *
 * @param Gained EXP Text
 * @desc 戦闘で得られた経験値表示に使われるテキストを変更します。
 * @default 獲得経験値
 *
 * @param Gained EXP Format
 * @desc 戦闘で得られた経験値量の表示フォーマットを指定します。
 * @default +%1
 *
 * @param EXP Gauge Color 1
 * @desc 勝利報告ウィンドウのEXP(経験値)ゲージに使われる
 * ゲージカラー1を指定します。
 * @default 30
 *
 * @param EXP Gauge Color 2
 * @desc 勝利報告ウィンドウのEXP(経験値)ゲージに使われる
 * ゲージカラー2を指定します。
 * @default 31
 *
 * @param Level Gauge Color 1
 * @desc アクターがレベルアップした際に、
 * EXP(経験値)ゲージに使われるゲージカラー1を指定します。
 * @default 14
 *
 * @param Level Gauge Color 2
 * @desc アクターがレベルアップした際に、
 * EXP(経験値)ゲージに使われるゲージカラー2を指定します。
 * @default 6
 *
 * @param Gauge Ticks
 * @desc 獲得経験値が満たされるまでに起こるチック数を指定します。
 * 1チック = 4フレームです。
 * @default 15
 *
 * @param Tick SE
 * @desc EXPゲージが上昇する際に鳴る音を設定します。
 * @default Absorb2
 *
 * @param Tick Volume
 * @desc EXPゲージが上昇する際に鳴る音のボリュームを設定します。
 * @default 90
 *
 * @param Tick Pitch
 * @desc EXPゲージが上昇する際に鳴る音のピッチを設定します。
 * @default 150
 *
 * @param Tick Pan
 * @desc EXPゲージが上昇する際に鳴る音のパンを設定します。
 * @default 0
 *
 * @help
 * ============================================================================
 * Introduction
 * ============================================================================
 *
 * このプラグインでは、デフォルトの勝利メッセージの代わりに、
 * より有益な情報ウィンドウ表示させることができます。
 * パラメータを調整し、ゲームに合わせてセッティングを変更してください。
 *
 * ============================================================================
 * Victory Aftermath
 * ============================================================================
 *
 * パラメータ内に'Victory Order'というパラメータがあります。
 * このパラメータでは、勝利報告画面での表示順序を指定することができます。
 *
 * デフォルトの順序は下記のようになっています:
 *           exp         経験値画面の表示
 *           custom      カスタムプラグインによる画面の表示
 *           drops       獲得物画面の表示
 *
 * これらの順序を変更したり、追加したり、削除したりすると、
 * 勝利報告画面はその変更を反映します。
 *
 * ============================================================================
 * Plugin Commands
 * ============================================================================
 *
 * 勝利報告の順序を少し変更したい時は、下記のコマンドを使用してください。
 *
 * プラグインコマンド:
 *   DisableVictoryAftermath   - 勝利報告、およびその音楽を無効化します。
 *   EnableVictoryAftermath    - 無効化された勝利報告を、再度有効化します。
 *   DisableVictoryMusic       - 勝利BGMを無効化し、その時に流れている音楽を
 *                               優先して再生し続けます。
 *   EnableVictoryMusic        - 無効化された勝利BGMを、再度有効化します。
 */

//=============================================================================

//=============================================================================
// Parameter Variables
//=============================================================================

Yanfly.Parameters = PluginManager.parameters("YEP_VictoryAftermath");
Yanfly.Param = Yanfly.Param || {};

Yanfly.Param.VAOrder = String(Yanfly.Parameters["Victory Order"]);
Yanfly.Param.VACheerWait = Number(Yanfly.Parameters["Cheer Wait"]);
Yanfly.Param.VABgmName = String(Yanfly.Parameters["Victory BGM"]);
Yanfly.Param.VABgmVol = Number(Yanfly.Parameters["BGM Volume"]);
Yanfly.Param.VABgmPitch = Number(Yanfly.Parameters["BGM Pitch"]);
Yanfly.Param.VABgmPan = Number(Yanfly.Parameters["BGM Pan"]);
Yanfly.Param.VATickName = String(Yanfly.Parameters["Tick SE"]);
Yanfly.Param.VATickVol = Number(Yanfly.Parameters["Tick Volume"]);
Yanfly.Param.VATickPitch = Number(Yanfly.Parameters["Tick Pitch"]);
Yanfly.Param.VATickPan = Number(Yanfly.Parameters["Tick Pan"]);
Yanfly.Param.VAGaugeTicks = Number(Yanfly.Parameters["Gauge Ticks"]);
Yanfly.Param.ColorExp1 = Number(Yanfly.Parameters["EXP Gauge Color 1"]);
Yanfly.Param.ColorExp2 = Number(Yanfly.Parameters["EXP Gauge Color 2"]);
Yanfly.Param.ColorLv1 = Number(Yanfly.Parameters["Level Gauge Color 1"]);
Yanfly.Param.ColorLv2 = Number(Yanfly.Parameters["Level Gauge Color 2"]);
Yanfly.Param.VALevelUp = String(Yanfly.Parameters["Level Up Text"]);
Yanfly.Param.VAMaxLv = String(Yanfly.Parameters["Max Level Text"]);
Yanfly.Param.VAGainedExp = String(Yanfly.Parameters["Gained EXP Text"]);
Yanfly.Param.VABattleResults = String(Yanfly.Parameters["Battle Results Text"]);
Yanfly.Param.VAGainedExpfmt = String(Yanfly.Parameters["Gained EXP Format"]);
Yanfly.Param.VABattleDrops = String(Yanfly.Parameters["Battle Drops Text"]);

//=============================================================================
// BattleManager
//=============================================================================

BattleManager.processVictory = function () {
  $gameParty.performVictory();
  if (this.isVictoryPhase()) return;
  $gameParty.removeBattleStates();
  this._victoryPhase = true;
  if ($gameSystem.skipVictoryAftermath()) {
    this.processSkipVictory();
  } else {
    this.processNormalVictory();
  }
};

BattleManager.isVictoryPhase = function () {
  return this._victoryPhase;
};

BattleManager.isFinishedVictoryCheer = function () {
  return ++this._victoryCheerWait >= Yanfly.Param.VACheerWait;
};

BattleManager.processSkipVictory = function () {
  this.makeRewards();
  this.gainRewards();
  this.replayBgmAndBgs();
  this.endBattle(0);
};

BattleManager.processNormalVictory = function () {
  if (!$gameSystem.skipVictoryMusic()) this.playVictoryMe();
  this.makeRewards();
  this.startVictoryPhase();
};

Yanfly.VA.BattleManager_playVictoryMe = BattleManager.playVictoryMe;
BattleManager.playVictoryMe = function () {
  Yanfly.VA.BattleManager_playVictoryMe.call(this);
  this.playVictoryBGM();
};

BattleManager.playVictoryBGM = function () {
  var victoryBgm = {
    name: Yanfly.Param.VABgmName,
    volume: Yanfly.Param.VABgmVol,
    pitch: Yanfly.Param.VABgmPitch,
    pan: Yanfly.Param.VABgmPan,
  };
  AudioManager.playBgm(victoryBgm);
};

BattleManager.startVictoryPhase = function () {
  this._victoryCheerWait = 0;
  this._victoryStep = 0;
  this.prepareVictoryInfo();
};

BattleManager.prepareVictoryInfo = function () {
  $gameParty.battleMembers().forEach(function (actor) {
    ImageManager.loadFace(actor.faceName());
    actor._preVictoryExp = actor.currentExp();
    actor._preVictoryLv = actor._level;
  }, this);
  this.gainRewards();
  $gameParty.battleMembers().forEach(function (actor) {
    actor._expGained = actor.currentExp() - actor._preVictoryExp;
    actor._postVictoryLv = actor._level;
  }, this);
};

BattleManager.processVictoryFinish = function () {
  $gameParty.clearVictoryData();
  this.endBattle(0);
  this.replayBgmAndBgs();
  this._victoryPhase = false;
};

//=============================================================================
// Game_System
//=============================================================================

Yanfly.VA.Game_System_initialize = Game_System.prototype.initialize;
Game_System.prototype.initialize = function () {
  Yanfly.VA.Game_System_initialize.call(this);
  this._skipVictoryAftermath = false;
  this._skipVictoryMusic = false;
};

Game_System.prototype.skipVictoryAftermath = function () {
  return this._skipVictoryAftermath;
};

Game_System.prototype.skipVictoryMusic = function () {
  return this._skipVictoryMusic;
};

//=============================================================================
// Game_Actor
//=============================================================================

Yanfly.VA.Game_Actor_shouldDisplayLevelUp =
  Game_Actor.prototype.shouldDisplayLevelUp;
Game_Actor.prototype.shouldDisplayLevelUp = function () {
  if ($gameParty.inBattle()) return false;
  return Yanfly.VA.Game_Actor_shouldDisplayLevelUp.call(this);
};

Game_Actor.prototype.clearVictoryData = function () {
  this._preVictoryExp = undefined;
  this._preVictoryLv = undefined;
  this._expGained = undefined;
  this._postVictoryLv = undefined;
};

//=============================================================================
// Game_Party
//=============================================================================

Game_Party.prototype.clearVictoryData = function () {
  for (var i = 0; i < this.members().length; ++i) {
    var actor = this.members()[i];
    if (!actor) continue;
    actor.clearVictoryData();
  }
};

//=============================================================================
// Game_Interpreter
//=============================================================================

Yanfly.VA.Game_Interpreter_pluginCommand =
  Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function (command, args) {
  Yanfly.VA.Game_Interpreter_pluginCommand.call(this, command, args);
  if (command === "DisableVictoryAftermath") {
    $gameSystem._skipVictoryAftermath = true;
  }
  if (command === "EnableVictoryAftermath") {
    $gameSystem._skipVictoryAftermath = false;
  }
  if (command === "DisableVictoryMusic") {
    $gameSystem._skipVictoryMusic = true;
  }
  if (command === "EnableVictoryMusic") {
    $gameSystem._skipVictoryMusic = false;
  }
};

Game_Interpreter.prototype.gotoSceneParty = function () {
  if (!$gameParty.inBattle()) SceneManager.push(Scene_Party);
  return true;
};

Game_Interpreter.prototype.lockActor = function (args, value) {
  for (i = 0; i < args.length; i++) {
    var actorId = Number(args[i]);
    if ($gameActors.actor(actorId)) {
      $gameActors.actor(actorId)._locked = value;
    }
  }
};

Game_Interpreter.prototype.requireActor = function (args, value) {
  for (i = 0; i < args.length; i++) {
    var actorId = Number(args[i]);
    if ($gameActors.actor(actorId)) {
      $gameActors.actor(actorId)._required = value;
    }
  }
};

//=============================================================================
// Window_VictoryTitle
//=============================================================================

function Window_VictoryTitle() {
  this.initialize.apply(this, arguments);
}

Window_VictoryTitle.prototype = Object.create(Window_Base.prototype);
Window_VictoryTitle.prototype.constructor = Window_VictoryTitle;

Window_VictoryTitle.prototype.initialize = function () {
  var width = this.windowWidth();
  var height = this.windowHeight();
  Window_Base.prototype.initialize.call(this, 0, 0, width, height);
  this.refresh(Yanfly.Param.VABattleResults);
  this.openness = 0;
};

Window_VictoryTitle.prototype.windowWidth = function () {
  return Graphics.boxWidth;
};

Window_VictoryTitle.prototype.windowHeight = function () {
  return this.fittingHeight(1);
};

Window_VictoryTitle.prototype.refresh = function (text) {
  this.contents.clear();
  this.drawText(text, 0, 0, this.contents.width, "center");
};

//=============================================================================
// Window_VictoryExp
//=============================================================================

function Window_VictoryExp() {
  this.initialize.apply(this, arguments);
}

Window_VictoryExp.prototype = Object.create(Window_Selectable.prototype);
Window_VictoryExp.prototype.constructor = Window_VictoryExp;

Window_VictoryExp.prototype.initialize = function () {
  var wy = this.fittingHeight(1);
  var width = this.windowWidth();
  var height = this.windowHeight();
  Window_Selectable.prototype.initialize.call(this, 0, wy, width, height);
  this.defineTickSound();
  this.refresh();
  AudioManager.playSe(this._tickSound);
  this._tick = 0;
  this.openness = 0;
};

Window_VictoryExp.prototype.windowWidth = function () {
  return Graphics.boxWidth;
};

Window_VictoryExp.prototype.windowHeight = function () {
  return Graphics.boxHeight - this.fittingHeight(1);
};

Window_VictoryExp.prototype.maxItems = function () {
  return $gameParty.maxBattleMembers();
};

Window_VictoryExp.prototype.itemHeight = function () {
  var clientHeight = this.height - this.padding * 2;
  return Math.floor(clientHeight / this.maxItems());
};

Window_VictoryExp.prototype.defineTickSound = function () {
  this._tickSound = {
    name: Yanfly.Param.VATickName,
    volume: Yanfly.Param.VATickVol,
    pitch: Yanfly.Param.VATickPitch,
    pan: Yanfly.Param.VATickPan,
  };
};

Window_VictoryExp.prototype.update = function () {
  Window_Selectable.prototype.update.call(this);
  if (this.openness >= 255) this.updateTicks();
};

Window_VictoryExp.prototype.updateTicks = function () {
  if (this._tick >= Yanfly.Param.VAGaugeTicks) return;
  if (Graphics.frameCount % 4 !== 0) return;
  if (Input.isPressed("ok") || TouchInput.isPressed()) {
    this._tick = Yanfly.Param.VAGaugeTicks;
  } else {
    this._tick += 1;
  }
  this.drawAllGauges();
};

Window_VictoryExp.prototype.drawAllGauges = function () {
  var topIndex = this.topIndex();
  for (var i = 0; i < this.maxPageItems(); i++) {
    var index = topIndex + i;
    if (index < this.maxItems()) this.drawItemGauge(index);
  }
};

Window_VictoryExp.prototype.drawItem = function (index) {
  var actor = $gameParty.battleMembers()[index];
  if (!actor) return;
  this.drawActorProfile(actor, index);
};

Window_VictoryExp.prototype.drawActorProfile = function (actor, index) {
  var rect = this.itemRect(index);
  var fw = Window_Base._faceWidth;
  this.drawActorFace(actor, rect.x + 1, rect.y + 1, fw, rect.height - 2);
};

Window_VictoryExp.prototype.drawItemGauge = function (index) {
  var actor = $gameParty.battleMembers()[index];
  if (!actor) return;
  this.drawActorGauge(actor, index);
};

Window_VictoryExp.prototype.gaugeRect = function (index) {
  var rect = this.itemRect(index);
  var fw = Window_Base._faceWidth;
  rect.x += fw + this.standardPadding() * 2;
  rect.width -= fw * 2 + this.standardPadding() * 4;
  return rect;
};

Window_VictoryExp.prototype.clearGaugeRect = function (index) {
  var rect = this.gaugeRect(index);
  this.contents.clearRect(rect.x, rect.y, rect.width, rect.height);
};

Window_VictoryExp.prototype.drawActorGauge = function (actor, index) {
  this.clearGaugeRect(index);
  var rect = this.gaugeRect(index);
  this.changeTextColor(this.normalColor());
  this.drawActorName(actor, rect.x + 2, rect.y);
  this.drawLevel(actor, rect);
  this.drawExpGauge(actor, rect);
  this.drawExpValues(actor, rect);
  this.drawExpGained(actor, rect);
};

Window_VictoryExp.prototype.drawLevel = function (actor, rect) {
  if (this.actorExpRate(actor) >= 1.0) {
    var text = Yanfly.Util.toGroup(actor._postVictoryLv);
  } else {
    var text = Yanfly.Util.toGroup(actor._preVictoryLv);
  }
  this.drawText(text, rect.x + 2, rect.y, rect.width - 4, "right");
  var ww =
    rect.width -
    4 -
    this.textWidth("0" + Yanfly.Util.toGroup(actor.maxLevel()));
  this.changeTextColor(this.systemColor());
  this.drawText(TextManager.levelA, rect.x + 2, rect.y, ww, "right");
};

Window_VictoryExp.prototype.actorExpRate = function (actor) {
  var actorLv = actor._preVictoryLv;
  if (actorLv === actor.maxLevel()) return 1.0;
  var bonusExp =
    (1.0 * actor._expGained * this._tick) / Yanfly.Param.VAGaugeTicks;
  var nowExp = actor._preVictoryExp - actor.expForLevel(actorLv) + bonusExp;
  var nextExp = actor.expForLevel(actorLv + 1) - actor.expForLevel(actorLv);
  return ((1.0 * nowExp) / nextExp).clamp(0.0, 1.0);
};

Window_VictoryExp.prototype.drawExpGauge = function (actor, rect) {
  var rate = this.actorExpRate(actor);
  if (rate >= 1.0) {
    var color1 = this.textColor(Yanfly.Param.ColorLv1);
    var color2 = this.textColor(Yanfly.Param.ColorLv2);
  } else {
    var color1 = this.textColor(Yanfly.Param.ColorExp1);
    var color2 = this.textColor(Yanfly.Param.ColorExp2);
  }
  var wy = rect.y + this.lineHeight();
  this.drawGauge(rect.x, wy, rect.width, rate, color1, color2);
};

Window_VictoryExp.prototype.drawExpValues = function (actor, rect) {
  var wy = rect.y + this.lineHeight();
  var actorLv = actor._preVictoryLv;
  var bonusExp =
    (1.0 * actor._expGained * this._tick) / Yanfly.Param.VAGaugeTicks;
  var nowExp = actor._preVictoryExp - actor.expForLevel(actorLv) + bonusExp;
  var nextExp = actor.expForLevel(actorLv + 1) - actor.expForLevel(actorLv);
  if (actorLv === actor.maxLevel()) {
    var text = Yanfly.Param.VAMaxLv;
  } else if (nowExp >= nextExp) {
    var text = Yanfly.Param.VALevelUp;
  } else {
    var text = Yanfly.Util.toGroup(parseInt(nextExp - nowExp));
  }
  this.changeTextColor(this.normalColor());
  this.drawText(text, rect.x + 2, wy, rect.width - 4, "right");
};

Window_VictoryExp.prototype.drawExpGained = function (actor, rect) {
  var wy = rect.y + this.lineHeight() * 2;
  this.changeTextColor(this.systemColor());
  this.drawText(
    Yanfly.Param.VAGainedExp,
    rect.x + 2,
    wy,
    rect.width - 4,
    "left"
  );
  var bonusExp =
    (1.0 * actor._expGained * this._tick) / Yanfly.Param.VAGaugeTicks;
  var expParse = Yanfly.Util.toGroup(parseInt(bonusExp));
  var expText = Yanfly.Param.VAGainedExpfmt.format(expParse);
  this.changeTextColor(this.normalColor());
  this.drawText(expText, rect.x + 2, wy, rect.width - 4, "right");
};

Window_VictoryExp.prototype.isReady = function () {
  return this._tick >= Yanfly.Param.VAGaugeTicks;
};

//=============================================================================
// Window_VictoryDrop
//=============================================================================

function Window_VictoryDrop() {
  this.initialize.apply(this, arguments);
}

Window_VictoryDrop.prototype = Object.create(Window_ItemList.prototype);
Window_VictoryDrop.prototype.constructor = Window_VictoryDrop;

Window_VictoryDrop.prototype.initialize = function (titleWindow) {
  var wy = titleWindow.height;
  var ww = Graphics.boxWidth;
  var wh = Graphics.boxHeight - wy;
  Window_ItemList.prototype.initialize.call(this, 0, wy, ww, wh);
  this.openness = 0;
  this.refresh();
};

Window_VictoryDrop.prototype.makeItemList = function () {
  if (BattleManager._rewards.gold > 0) {
    this._data = ["gold", null];
  } else {
    this._data = [];
  }
  this._dropItems = [];
  this._dropWeapons = [];
  this._dropArmors = [];
  this.extractDrops();
};

Window_VictoryDrop.prototype.extractDrops = function () {
  BattleManager._rewards.items.forEach(function (item) {
    if (!item) return;
    if (DataManager.isItem(item)) this._dropItems.push(item.id);
    if (DataManager.isWeapon(item)) this._dropWeapons.push(item.id);
    if (DataManager.isArmor(item)) this._dropArmors.push(item.id);
  }, this);
  this._dropItems.sort(function (a, b) {
    return a - b;
  });
  this._dropWeapons.sort(function (a, b) {
    return a - b;
  });
  this._dropArmors.sort(function (a, b) {
    return a - b;
  });
  this._dropItems.forEach(function (id) {
    var item = $dataItems[id];
    if (item && !this._data.contains(item)) this._data.push(item);
  }, this);
  this._dropWeapons.forEach(function (id) {
    var item = $dataWeapons[id];
    if (item && !this._data.contains(item)) this._data.push(item);
  }, this);
  this._dropArmors.forEach(function (id) {
    var item = $dataArmors[id];
    if (item && !this._data.contains(item)) this._data.push(item);
  }, this);
};

Window_VictoryDrop.prototype.drawItem = function (index) {
  var item = this._data[index];
  if (!item) return;
  this.drawGold(item, index);
  this.drawDrop(item, index);
};

Window_VictoryDrop.prototype.drawGold = function (item, index) {
  if (item !== "gold") return;
  var rect = this.itemRect(index);
  rect.width -= this.textPadding();
  var value = BattleManager._rewards.gold;
  var currency = TextManager.currencyUnit;
  this.drawCurrencyValue(value, currency, rect.x, rect.y, rect.width);
};

Window_VictoryDrop.prototype.drawDrop = function (item, index) {
  if (
    !DataManager.isItem(item) &&
    !DataManager.isWeapon(item) &&
    !DataManager.isArmor(item)
  )
    return;
  var rect = this.itemRect(index);
  rect.width -= this.textPadding();
  this.drawItemName(item, rect.x, rect.y, rect.width);
  this.drawItemNumber(item, rect.x, rect.y, rect.width);
};

Window_VictoryDrop.prototype.drawItemNumber = function (item, x, y, width) {
  if (!this.needsNumber()) return;
  var numItems = Yanfly.Util.toGroup(this.numItems(item));
  var size = Yanfly.Param.ItemQuantitySize || 28;
  this.contents.fontSize = size;
  this.drawText("\u00d7" + numItems, x, y, width, "right");
  this.resetFontSettings();
};

Window_VictoryDrop.prototype.numItems = function (item) {
  if (DataManager.isItem(item)) {
    return Yanfly.Util.getCount(item.id, this._dropItems);
  }
  if (DataManager.isWeapon(item)) {
    return Yanfly.Util.getCount(item.id, this._dropWeapons);
  }
  if (DataManager.isArmor(item)) {
    return Yanfly.Util.getCount(item.id, this._dropArmors);
  }
  return 0;
};

//=============================================================================
// Scene_Battle
//=============================================================================

Yanfly.VA.Scene_Battle_update = Scene_Battle.prototype.update;
Scene_Battle.prototype.update = function () {
  Yanfly.VA.Scene_Battle_update.call(this);
  this.updateVictoryAftermath();
};

Scene_Battle.prototype.processNextVictoryStep = function () {
  var step = this._victorySteps.shift();
  if (step) {
    this.processVictoryStep(step.toUpperCase());
  } else {
    this.processVictoryFinish();
  }
};

Scene_Battle.prototype.processVictoryStep = function (step) {
  this._victoryStep = step;
};

Scene_Battle.prototype.processVictoryFinish = function () {
  this._victoryTitleWindow.close();
  BattleManager.processVictoryFinish();
};

Scene_Battle.prototype.isVictoryStep = function (value) {
  return this._victoryStep && this._victoryStep === value;
};

Scene_Battle.prototype.updateVictoryAftermath = function () {
  if (!BattleManager.isVictoryPhase()) return;
  if (!BattleManager.isFinishedVictoryCheer()) return;
  this.activateVictoryStep();
  this.updateVictorySteps();
};

Scene_Battle.prototype.activateVictoryStep = function () {
  if (this._activateVictoryStep) return;
  this._activateVictoryStep = true;
  this.createVictoryTitle();
  this._victorySteps = this.createVictorySteps();
  this.createVictorySteps();
  this.processNextVictoryStep();
};

Scene_Battle.prototype.createVictorySteps = function () {
  var steps = Yanfly.Param.VAOrder.split(" ");
  var array = [];
  for (var i = 0; i < steps.length; ++i) {
    var step = steps[i];
    if (step.toUpperCase() === "CUSTOM") {
      array = this.addCustomVictorySteps(array);
    } else {
      array.push(step.toUpperCase());
    }
  }
  return array;
};

Scene_Battle.prototype.addCustomVictorySteps = function (array) {
  return array;
};

Scene_Battle.prototype.updateVictorySteps = function () {
  if (this.isVictoryStep("EXP")) this.updateVictoryExp();
  if (this.isVictoryStep("DROPS")) this.updateVictoryDrops();
};

Scene_Battle.prototype.updateVictoryExp = function () {
  if (!this._victoryExpWindow) {
    this.createVictoryExp();
  } else if (this._victoryExpWindow.isReady()) {
    if (this.victoryTriggerContinue()) this.finishVictoryExp();
  }
};

Scene_Battle.prototype.createVictoryTitle = function () {
  this._statusWindow.hide();
  this._logWindow.hide();
  this._victoryTitleWindow = new Window_VictoryTitle();
  this.addWindow(this._victoryTitleWindow);
  this._victoryTitleWindow.open();
};

Scene_Battle.prototype.createVictoryExp = function () {
  this._victoryTitleWindow.refresh(Yanfly.Param.VABattleResults);
  this._victoryExpWindow = new Window_VictoryExp();
  this.addWindow(this._victoryExpWindow);
  this._victoryExpWindow.open();
};

Scene_Battle.prototype.finishVictoryExp = function () {
  SoundManager.playOk();
  this._victoryExpWindow.close();
  this.processNextVictoryStep();
};

Scene_Battle.prototype.updateVictoryDrops = function () {
  if (!this._victoryDropWindow) {
    this.createVictoryDrop();
  } else if (this._victoryDropWindow.isOpen()) {
    if (this.victoryTriggerContinue()) this.finishVictoryDrop();
  }
};

Scene_Battle.prototype.createVictoryDrop = function () {
  this._victoryTitleWindow.refresh(Yanfly.Param.VABattleDrops);
  this._victoryDropWindow = new Window_VictoryDrop(this._victoryTitleWindow);
  this.addWindow(this._victoryDropWindow);
  this._victoryDropWindow.open();
  this._victoryDropWindow.activate();
  this._victoryDropWindow.select(0);
};

Scene_Battle.prototype.finishVictoryDrop = function () {
  SoundManager.playOk();
  this._victoryDropWindow.close();
  this.processNextVictoryStep();
};

Scene_Battle.prototype.victoryTriggerContinue = function () {
  if (Input.isTriggered("ok") || TouchInput.isTriggered()) return true;
  if (Input.isTriggered("cancel")) return true;
  return false;
};

//=============================================================================
// Utilities
//=============================================================================

Yanfly.Util = Yanfly.Util || {};

if (!Yanfly.Util.toGroup) {
  Yanfly.Util.toGroup = function (inVal) {
    return inVal;
  };
}

Yanfly.Util.getCount = function (value, arr) {
  var occur = 0;
  for (var i = 0; i < arr.length; i++) {
    if (arr[i] === value) occur++;
  }
  return occur;
};

//=============================================================================
// End of File
//=============================================================================

repo_name: dazed/translations

license: unknown