查看: 2653|回复: 4

[有事请教] 求问大佬们有没有这个插件?

[复制链接]
梦石
0
星屑
3958
在线时间
445 小时
注册时间
2019-3-3
回帖
80
发表于 2019-3-3 16:42:09 来自手机 | 显示全部楼层 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有账号?注册会员

×
本帖最后由 多卡多卡 于 2019-3-3 16:43 编辑

那是一个可以通过战斗获得熟练度,从而自动习得技能的插件,和FF9差不多。名字是dsEquipmentSkillLearning.js,网站是http://gametkool.com/?p=1881,但里面的下载链接已经不能用了(可能需要科技?),所以请问大佬们能不能找到这个插件?
梦石
0
星屑
39336
在线时间
11161 小时
注册时间
2009-3-15
回帖
4768
发表于 2019-3-3 16:54:17 | 显示全部楼层
  1. //==============================================================================
  2. // dsEquipmentSkillLearning.js
  3. // Copyright (c) 2015 - 2018 DOURAKU
  4. // Released under the MIT License.
  5. // [url]http://opensource.org/licenses/mit-license.php[/url]
  6. //==============================================================================

  7. /*:
  8. * @plugindesc 装備に設定されたスキルを習得するプラグイン ver1.12.2
  9. * @author 道楽
  10. *
  11. * @param Lp
  12. * @desc 装備からスキルを習得する蓄積値の略称(Learning Point)
  13. * @default LP
  14. *
  15. * @param Basic Reward Lp
  16. * @type number
  17. * @desc タグ未設定時の敵キャラから獲得できる基本LP
  18. * @default 1
  19. *
  20. * @param Reward Lp Text
  21. * @desc 戦闘後にLPを獲得した時に表示されるテキスト
  22. * @default %1 の%2を獲得!
  23. *
  24. * @param Show Reward Lp Text
  25. * @type boolean
  26. * @desc 戦闘後にLPを獲得したテキストを表示するか
  27. * (true なら表示する / false なら表示しない)
  28. * @default true
  29. *
  30. * @param Learning Skill Text
  31. * @desc 戦闘で得たLPによってスキルを習得した時に表示されるテキスト
  32. * @default %1は%2を覚えた!
  33. *
  34. * @param Usable Equipment Skill
  35. * @type boolean
  36. * @desc 装備品が持つ未修得のスキルを使用できるか
  37. * (true なら使用できる / false なら使用できない)
  38. * @default true
  39. *
  40. * @param Show Lp Gauge
  41. * @type boolean
  42. * @desc LPをゲージで表示するか?
  43. * (true なら表示する / false なら表示しない)
  44. * @default true
  45. *
  46. * @param Show Lp Value
  47. * @type boolean
  48. * @desc LPを数値で表示するか?
  49. * (true なら表示する / false なら表示しない)
  50. * @default false
  51. *
  52. * @param Show Control Guide
  53. * @type boolean
  54. * @desc 表示切替ガイドを表示するか?
  55. * (true なら表示する / false なら表示しない)
  56. * @default true
  57. *
  58. * @param Guide Text
  59. * @type string
  60. * @desc 表示切替ガイドのテキスト
  61. * @default Shift:切り替え
  62. *
  63. * @param Lp Value Font Size
  64. * @type number
  65. * @desc LP表示で使用するフォントのサイズ
  66. * @default 18
  67. *
  68. * @param Lp Aftermath Enable
  69. * @type boolean
  70. * @desc YEP_VictoryAftermathにLP獲得ウィンドウを追加するか?
  71. * (true なら追加する / false なら追加しない)
  72. * @default true
  73. *
  74. * @param Lp Aftermath Caption
  75. * @desc LP獲得ウィンドウに表示される題字テキスト
  76. * @default LP獲得
  77. *
  78. * @param Lp Aftermath Format
  79. * @desc 獲得したLP値を表示する書式テキスト
  80. * %1 - Value     %2 - Amount
  81. * @default +%1\c[4]%2\c[0]
  82. *
  83. * @param Lp Aftermath Earned
  84. * @desc LP獲得ウィンドウの題字
  85. * @default 獲得LP
  86. *
  87. * @param Lp Multiple Gain Enable
  88. * @type boolean
  89. * @desc 獲得したLP値を同一スキルが設定された装備の数分加算するか?
  90. * (true なら加算する / false なら加算しない)
  91. * @default false
  92. *
  93. * @help
  94. * このプラグインは以下のメモタグの設定ができます。
  95. *
  96. * -----------------------------------------------------------------------------
  97. * スキルに設定するメモタグ
  98. *
  99. * <lp:[必要LP]>
  100. *  スキルを習得するために必要なLPを設定します。
  101. *  [必要LP] - スキルの習得に必要なLP(数字)
  102. *
  103. * <lpActor[アクター番号]:[必要LP]>
  104. *  特定のアクターがスキルを習得するために必要なLPを設定します。
  105. *  <lp>と同時に設定されている場合は指定のアクターのみこちらが優先されます。
  106. *  [アクター番号] - 0001~9999までの4桁の数値が設定できます。(数字)
  107. *                   データベースのアクタータブで表示されている番号になります。
  108. *  [必要LP]       - スキルの習得に必要なLP(数字)
  109. *
  110. * -----------------------------------------------------------------------------
  111. * 武器・防具に設定するメモタグ
  112. *
  113. * <learningSkill[習得番号]:[スキルID]>
  114. *  装備から習得できるスキルを設定します。
  115. *  [習得番号] - 00~04までの2桁の数値が設定できます。(数字)
  116. *               なお、ひとつの装備に同じ習得番号を複数設定出来ません。
  117. *  [スキルID] - スキルのID(数字)
  118. *
  119. * -----------------------------------------------------------------------------
  120. * 敵キャラに設定するメモタグ
  121. *
  122. * <rewardLp:[獲得LP]>
  123. *  敵キャラ撃破時に獲得できるLPの値を設定します。
  124. *  [獲得LP] - 撃破時に獲得できるLP(数字)
  125. *
  126. * -----------------------------------------------------------------------------
  127. * ステートに設定するメモタグ
  128. *
  129. * <lpRate:[獲得LP倍率]>
  130. *  ステートを持つアクターが獲得できるLPの倍率を設定します。
  131. *  [獲得LP倍率] - 獲得できるLPの倍率(数字-小数可)
  132. *                 複数のステートで設定されている場合は乗算して反映されます。
  133. *
  134. * ----------------------------------------------------------------------------
  135. * プラグインコマンド
  136. *
  137. * LPを獲得するコマンド
  138. *   GainLp iteType param opeType value show
  139. *
  140. *     iteType
  141. *       0   paramをアクター番号として使用する
  142. *       1~ paramをアクター番号が格納された変数の番号として使用する
  143. *     param
  144. *       0   iteTypeが0の場合、パーティメンバー全体を対象とする
  145. *       1~ iteTypeに基づきアクター番号となる
  146. *     opeType
  147. *       0   operandを変更する値として使用する
  148. *       1~ operandを変更する値が格納された変数の番号として使用する
  149. *     operand
  150. *       opeTypeに基づき変更する値となる(負数にすると減る)
  151. *     show
  152. *       true  スキル習得メッセージを表示する
  153. *       false スキル習得メッセージを表示しない
  154. *
  155. * e.g.)
  156. *  パーティ全員が10LPを獲得する
  157. *   GainLp 0 0 0 10 true
  158. */

  159. var Imported = Imported || {};
  160. Imported.dsEquipmentSkillLearning = true;

  161. (function (exports) {
  162.         'use strict';

  163.         exports.Param = (function() {
  164.                 var ret = {};
  165.                 var parameters = PluginManager.parameters('dsEquipmentSkillLearning');
  166.                 ret.Lp = String(parameters['Lp']);
  167.                 ret.BasicRewardLp = Number(parameters['Basic Reward Lp']);
  168.                 ret.RewardLpText = String(parameters['Reward Lp Text']);
  169.                 ret.ShowRewardLpText = Boolean(parameters['Show Reward Lp Text'] === 'true' || false);
  170.                 ret.LearningSkillText = String(parameters['Learning Skill Text']);
  171.                 ret.UsableEquipmentSkill = Boolean(parameters['Usable Equipment Skill'] === 'true' || false);
  172.                 ret.ShowLpGauge = Boolean(parameters['Show Lp Gauge'] === 'true' || false);
  173.                 ret.ShowLpValue = Boolean(parameters['Show Lp Value'] === 'true' || false);
  174.                 ret.ShowControlGuide = Boolean(parameters['Show Control Guide'] === 'true' || false);
  175.                 ret.GuideText = String(parameters['Guide Text']);
  176.                 ret.LpValueFontSize = Number(parameters['Lp Value Font Size']);
  177.                 ret.EquipmentSkillMax = 5;
  178.                 ret.LpAftermathEnable = Boolean(parameters['Lp Aftermath Enable'] === 'true' || false);
  179.                 ret.LpAftermathCaption = String(parameters['Lp Aftermath Caption']);
  180.                 ret.LpAftermathFormat = String(parameters['Lp Aftermath Format']);
  181.                 ret.LpAftermathEarned = String(parameters['Lp Aftermath Earned']);
  182.                 ret.LpMultipleGainEnable = Boolean(parameters['Lp Multiple Gain Enable'] === 'true' || false);
  183.                 return ret;
  184.         })();

  185.         //--------------------------------------------------------------------------
  186.         /** Utility */
  187.         function Utility() {}

  188.         Utility.leaningSkills = function(item)
  189.         {
  190.                 var list = [];
  191.                 for ( var jj = 0; jj < exports.Param.EquipmentSkillMax; jj++ )
  192.                 {
  193.                         var learningSkill = 'learningSkill' + ('0'+jj).slice(-2);
  194.                         if ( item.meta[learningSkill] )
  195.                         {
  196.                                 var id = Number(item.meta[learningSkill]);
  197.                                 if ( !list.contains($dataSkills[id]) )
  198.                                 {
  199.                                         list.push($dataSkills[id]);
  200.                                 }
  201.                         }
  202.                 }
  203.                 return list;
  204.         };

  205.         //--------------------------------------------------------------------------
  206.         /** Game_Interpreter */
  207.         var _Game_Interpreter_pluginCommand = Game_Interpreter.prototype.pluginCommand;
  208.         Game_Interpreter.prototype.pluginCommand = function(command, args)
  209.         {
  210.                 _Game_Interpreter_pluginCommand.call(this, command, args);
  211.                 if ( command === 'GainLp' )
  212.                 {
  213.                         var iteType = Number(args[0]);
  214.                         var param   = Number(args[1]);
  215.                         var opeType = Number(args[2]);
  216.                         var operand = Number(args[3]);
  217.                         var show    = Boolean(args[4]);
  218.                         this.gainLp(iteType, param, opeType, operand, show);
  219.                 }
  220.         };

  221.         Game_Interpreter.prototype.gainLp = function(iteType, param, opeType, operand, show)
  222.         {
  223.                 var value = this.operateValue(0, opeType, operand);
  224.                 this.iterateActorEx(iteType, param, function(actor) {
  225.                         actor.gainLp(value, show);
  226.                 }.bind(this));
  227.         };

  228.         //--------------------------------------------------------------------------
  229.         /** Game_Battler */
  230.         var _Game_Battler_onBattleStart = Game_Battler.prototype.onBattleStart;
  231.         Game_Battler.prototype.onBattleStart = function()
  232.         {
  233.                 _Game_Battler_onBattleStart.call(this);
  234.                 this._battleLp = 0;
  235.         };

  236.         var _Game_Battler_onBattleEnd = Game_Battler.prototype.onBattleEnd;
  237.         Game_Battler.prototype.onBattleEnd = function()
  238.         {
  239.                 _Game_Battler_onBattleEnd.call(this);
  240.                 this._battleLp = 0;
  241.         };

  242.         //--------------------------------------------------------------------------
  243.         /** Game_Actor */
  244.         var _Game_Actor_initMembers = Game_Actor.prototype.initMembers;
  245.         Game_Actor.prototype.initMembers = function()
  246.         {
  247.                 _Game_Actor_initMembers.call(this);
  248.                 this.initSkillLp();
  249.         };

  250.         Game_Actor.prototype.initSkillLp = function()
  251.         {
  252.                 if ( !this._skillLp )
  253.                 {
  254.                         this._skillLp = {};
  255.                 }
  256.         };

  257.         var _Game_Actor_skills = Game_Actor.prototype.skills;
  258.         Game_Actor.prototype.skillsOrigin = function()
  259.         {
  260.                 return _Game_Actor_skills.call(this);
  261.         };

  262.         Game_Actor.prototype.skills = function()
  263.         {
  264.                 var list = this.skillsOrigin();
  265.                 if ( exports.Param.UsableEquipmentSkill )
  266.                 {
  267.                         this.equipmentSkills().forEach(function(skill) {
  268.                                 if ( !list.contains(skill) )
  269.                                 {
  270.                                         list.push(skill);
  271.                                 }
  272.                         });
  273.                 }
  274.                 return list;
  275.         };

  276.         Game_Actor.prototype.equipmentSkills = function()
  277.         {
  278.                 var list = [];
  279.                 var equips = this.equips();
  280.                 for ( var ii = 0; ii < equips.length; ii++ )
  281.                 {
  282.                         var item = equips[ii];
  283.                         if ( item )
  284.                         {
  285.                                 Utility.leaningSkills(item).forEach(function(skill) {
  286.                                         if ( this.isLearnableSkill(skill) )
  287.                                         {
  288.                                                 if ( !list.contains(skill) )
  289.                                                 {
  290.                                                         list.push(skill);
  291.                                                 }
  292.                                         }
  293.                                 }, this);
  294.                         }
  295.                 }
  296.                 return list;
  297.         };

  298.         Game_Actor.prototype.equipmentSameSkillCount = function(skillId)
  299.         {
  300.                 var count = 0;
  301.                 this.equips().forEach(function(item) {
  302.                         if ( item )
  303.                         {
  304.                                 Utility.leaningSkills(item).forEach(function(skill) {
  305.                                         if ( skill.id === skillId )
  306.                                         {
  307.                                                 count++;
  308.                                         }
  309.                                 });
  310.                         }
  311.                 });
  312.                 return count;
  313.         };

  314.         Game_Actor.prototype.equipmentLearnSkills = function()
  315.         {
  316.                 this.initSkillLp();
  317.                 var list = [];
  318.                 for ( var id in this._skillLp )
  319.                 {
  320.                         if ( this.isLearnableSkill($dataSkills[id]) )
  321.                         {
  322.                                 if ( this._skillLp[id] < this.skillLpMax($dataSkills[id]) )
  323.                                 {
  324.                                         if ( !list.contains($dataSkills[id]) )
  325.                                         {
  326.                                                 list.push($dataSkills[id]);
  327.                                         }
  328.                                 }
  329.                         }
  330.                 }
  331.                 return list;
  332.         };

  333.         Game_Actor.prototype.findNewSkills = function(lastSkills)
  334.         {
  335.                 var newSkills = this.skillsOrigin();
  336.                 for ( var ii = 0; ii < lastSkills.length; ii++ )
  337.                 {
  338.                         var index = newSkills.indexOf(lastSkills[ii]);
  339.                         if ( index >= 0 )
  340.                         {
  341.                                 newSkills.splice(index, 1);
  342.                         }
  343.                 }
  344.                 return newSkills;
  345.         };

  346.         Game_Actor.prototype.gainLp = function(lp, show)
  347.         {
  348.                 lp = Math.round(lp * this.finalLpRate());
  349.                 var lastSkills = this.skillsOrigin();
  350.                 this.equipmentSkills().forEach(function(skill) {
  351.                         this.addSkillLp(skill, lp);
  352.                 }, this);
  353.                 if ( $gameParty.inBattle() )
  354.                 {
  355.                         this._battleLp = this._battleLp || 0;
  356.                         this._battleLp += lp;
  357.                 }
  358.                 if ( show )
  359.                 {
  360.                         var newSkills = this.findNewSkills(lastSkills);
  361.                         if ( newSkills.length > 0 )
  362.                         {
  363.                                 $gameMessage.newPage();
  364.                                 newSkills.forEach(function(skill) {
  365.                                         var text = exports.Param.LearningSkillText.format(this.name(), skill.name);
  366.                                         $gameMessage.add(text);
  367.                                 }, this);
  368.                         }
  369.                 }
  370.         };

  371.         Game_Actor.prototype.finalLpRate = function()
  372.         {
  373.                 var rate = 1.0;
  374.                 this.traitObjects().forEach(function(trait) {
  375.                         if ( trait.meta.lpRate )
  376.                         {
  377.                                 rate *= Number(trait.meta.lpRate);
  378.                         }
  379.                 }, this);
  380.                 return rate;
  381.         };

  382.         Game_Actor.prototype.addSkillLp = function(skill, lp)
  383.         {
  384.                 if ( this.isLearnableSkill(skill) )
  385.                 {
  386.                         if ( exports.Param.LpMultipleGainEnable )
  387.                         {
  388.                                 lp *= this.equipmentSameSkillCount(skill.id);
  389.                         }
  390.                         this.initSkillLp();
  391.                         if ( this._skillLp[skill.id] )
  392.                         {
  393.                                 this._skillLp[skill.id] += lp;
  394.                         }
  395.                         else
  396.                         {
  397.                                 this._skillLp[skill.id] = lp;
  398.                         }
  399.                         var lpMax = this.skillLpMax(skill);
  400.                         if ( this._skillLp[skill.id] >= lpMax )
  401.                         {
  402.                                 this.learnLpSkill(skill.id);
  403.                                 this._skillLp[skill.id] = lpMax;
  404.                         }
  405.                 }
  406.         };

  407.         Game_Actor.prototype.learnLpSkill = function(skillId)
  408.         {
  409.                 this.learnSkill(skillId);
  410.         };

  411.         Game_Actor.prototype.skillLp = function(skill)
  412.         {
  413.                 this.initSkillLp();
  414.                 if ( this._skillLp[skill.id] )
  415.                 {
  416.                         return this._skillLp[skill.id];
  417.                 }
  418.                 return 0;
  419.         };

  420.         Game_Actor.prototype.isLearnableSkill = function(skill)
  421.         {
  422.                 var tag = 'lpActor' + ('0000'+this.actorId()).slice(-4);
  423.                 if ( skill.meta[tag] )
  424.                 {
  425.                         return true;
  426.                 }
  427.                 if ( skill.meta.lp )
  428.                 {
  429.                         return true;
  430.                 }
  431.                 return false;
  432.         };

  433.         Game_Actor.prototype.skillLpMax = function(skill)
  434.         {
  435.                 var tag = 'lpActor' + ('0000'+this.actorId()).slice(-4);
  436.                 if ( skill.meta[tag] )
  437.                 {
  438.                         return Number(skill.meta[tag]);
  439.                 }
  440.                 if ( skill.meta.lp )
  441.                 {
  442.                         return Number(skill.meta.lp);
  443.                 }
  444.                 return 1;
  445.         };

  446.         Game_Actor.prototype.lpRate = function(skill)
  447.         {
  448.                 var needLp = this.skillLpMax(skill);
  449.                 return (needLp > 0) ? this.skillLp(skill) / needLp : 0;
  450.         };

  451.         Game_Actor.prototype.battleLp = function(skillId)
  452.         {
  453.                 this._battleLp = this._battleLp || 0;
  454.                 return this._battleLp;
  455.         };

  456.         Game_Actor.prototype.isEquipmentSkill = function(skill)
  457.         {
  458.                 var skills = this.equipmentSkills();
  459.                 return skills.contains(skill) ? true : false;
  460.         };

  461.         Game_Actor.prototype.isLearningSkill = function(skill)
  462.         {
  463.                 var skills = this.equipmentLearnSkills();
  464.                 return skills.contains(skill) ? true : false;
  465.         };

  466.         //--------------------------------------------------------------------------
  467.         /** Game_Enemy */
  468.         Game_Enemy.prototype.lp = function()
  469.         {
  470.                 var enemy = this.enemy();
  471.                 if ( enemy.meta.rewardLp )
  472.                 {
  473.                         return Number(enemy.meta.rewardLp);
  474.                 }
  475.                 return exports.Param.BasicRewardLp;
  476.         };

  477.         //--------------------------------------------------------------------------
  478.         /** Game_Troop */
  479.         Game_Troop.prototype.lpTotal = function()
  480.         {
  481.                 return this.deadMembers().reduce(function(r, enemy) {
  482.                         return r + enemy.lp();
  483.                 }, 0);
  484.         };

  485.         //--------------------------------------------------------------------------
  486.         /** Window_Base */
  487.         Window_Base.prototype.lpColor = function()
  488.         {
  489.                 return this.systemColor();
  490.         };

  491.         Window_Base.prototype.learningGaugeColor1 = function()
  492.         {
  493.                 return this.textColor(28);
  494.         };

  495.         Window_Base.prototype.learningGaugeColor2 = function()
  496.         {
  497.                 return this.textColor(29);
  498.         };

  499.         Window_Base.prototype.lpValueWidth = function()
  500.         {
  501.                 this.contents.fontSize = exports.Param.LpValueFontSize;
  502.                 var valueWidth = this.textWidth('000');
  503.                 var slashWidth = this.textWidth('/');
  504.                 this.contents.fontSize = this.standardFontSize();
  505.                 return valueWidth * 2 + slashWidth;
  506.         };

  507.         Window_Base.prototype.drawChangeTab = function(x, y)
  508.         {
  509.                 var text = exports.Param.GuideText;
  510.                 var lastFontSize = this.contents.fontSize;
  511.                 this.contents.fontSize = 14;
  512.                 var textWidth = this.textWidth(text);
  513.                 this.changeTextColor(this.systemColor());
  514.                 this.drawText(text, x - textWidth, y, textWidth);
  515.                 this.contents.fontSize = lastFontSize;
  516.         };

  517.         Window_Base.prototype.drawLpGauge = function(actor, skill, x, y, width)
  518.         {
  519.                 if ( exports.Param.ShowLpGauge )
  520.                 {
  521.                         var iconBoxWidth = Window_Base._iconWidth + 4;
  522.                         var x1 = x + iconBoxWidth;
  523.                         var gaugeWidth = width - iconBoxWidth;
  524.                         var rate = actor.lpRate(skill);
  525.                         var color1 = this.learningGaugeColor1();
  526.                         var color2 = this.learningGaugeColor2();
  527.                         this.drawGauge(x1, y, gaugeWidth, rate, color1, color2);
  528.                 }
  529.         };

  530.         Window_Base.prototype.drawLpValue = function(actor, skill, x, y, width)
  531.         {
  532.                 if ( exports.Param.ShowLpValue )
  533.                 {
  534.                         var lp = actor.skillLp(skill);
  535.                         var lpMax = actor.skillLpMax(skill);
  536.                         this.contents.fontSize = exports.Param.LpValueFontSize;
  537.                         var labelWidth = this.textWidth(exports.Param.Lp);
  538.                         var valueWidth = this.textWidth('000');
  539.                         var slashWidth = this.textWidth('/');
  540.                         var valueHeight = (this.lineHeight() - this.contents.fontSize) / 2;
  541.                         var x1 = x + width - valueWidth;
  542.                         var x2 = x1 - slashWidth;
  543.                         var x3 = x2 - valueWidth;
  544.                         var y1 = y - valueHeight;
  545.                         var y2 = y + valueHeight;
  546.                         if ( y2 - y1 >= this.contents.fontSize )
  547.                         {
  548.                                 this.changeTextColor(this.lpColor());
  549.                                 this.drawText(exports.Param.Lp, x3, y1, labelWidth);
  550.                         }
  551.                         if ( x3 >= x + labelWidth )
  552.                         {
  553.                                 this.resetTextColor();
  554.                                 this.drawText(lp, x3, y2, valueWidth, 'right');
  555.                                 this.drawText('/', x2, y2, slashWidth, 'right');
  556.                                 this.drawText(lpMax, x1, y2, valueWidth, 'right');
  557.                         }
  558.                         else
  559.                         {
  560.                                 this.resetTextColor();
  561.                                 this.drawText(lp, x1, y2, valueWidth, 'right');
  562.                         }
  563.                         this.contents.fontSize = this.standardFontSize();
  564.                 }
  565.         };

  566.         //--------------------------------------------------------------------------
  567.         /** Window_Selectable */
  568.         var _Window_Selectable_processHandling = Window_Selectable.prototype.processHandling;
  569.         Window_Selectable.prototype.processHandling = function()
  570.         {
  571.                 _Window_Selectable_processHandling.call(this);
  572.                 if ( this.isOpenAndActive() )
  573.                 {
  574.                         if ( this.isHandled('shift') && Input.isTriggered('shift') )
  575.                         {
  576.                                 this.processShift();
  577.                         }
  578.                 }
  579.         };

  580.         Window_Selectable.prototype.processShift = function()
  581.         {
  582.                 SoundManager.playCursor();
  583.                 this.callHandler('shift');
  584.         };

  585.         //--------------------------------------------------------------------------
  586.         /** Window_MenuSkill */
  587.         exports.Window_MenuSkill = (function() {

  588.                 function Window_MenuSkill()
  589.                 {
  590.                         this.initialize.apply(this, arguments);
  591.                 }

  592.                 Window_MenuSkill.prototype = Object.create(Window_SkillList.prototype);
  593.                 Window_MenuSkill.prototype.constructor = Window_MenuSkill;

  594.                 Window_MenuSkill.prototype.isEnabled = function(item)
  595.                 {
  596.                         if ( this._actor )
  597.                         {
  598.                                 if ( exports.Param.UsableEquipmentSkill )
  599.                                 {
  600.                                         if ( this.isLearningSkill(item) )
  601.                                         {
  602.                                                 if ( !this.isEquipmentSkill(item) )
  603.                                                 {
  604.                                                         return false; // 装備していなければ使えない
  605.                                                 }
  606.                                         }
  607.                                 }
  608.                                 else
  609.                                 {
  610.                                         if ( this._actor.skills().indexOf(item) < 0 )
  611.                                         {
  612.                                                 return false;
  613.                                         }
  614.                                 }
  615.                                 return this._actor.canUse(item);
  616.                         }
  617.                         return false;
  618.                 };

  619.                 Window_MenuSkill.prototype.makeItemList = function()
  620.                 {
  621.                         if ( this._actor )
  622.                         {
  623.                                 var skills = this._actor.skills();
  624.                                 this._actor.equipmentSkills().forEach(function(skill) {
  625.                                         if ( !skills.contains(skill) )
  626.                                         {
  627.                                                 skills.push(skill);
  628.                                         }
  629.                                 }, this);
  630.                                 this._actor.equipmentLearnSkills().forEach(function(skill) {
  631.                                         if ( !skills.contains(skill) )
  632.                                         {
  633.                                                 skills.push(skill);
  634.                                         }
  635.                                 }, this);
  636.                                 this._data = skills.filter(function(skill) {
  637.                                         return this.includes(skill);
  638.                                 }, this);
  639.                                 this._data.sort(function(a, b) {
  640.                                         return a.id - b.id;
  641.                                 });
  642.                         }
  643.                         else
  644.                         {
  645.                                 this._data = [];
  646.                         }
  647.                 };

  648.                 Window_MenuSkill.prototype.drawItem = function(index)
  649.                 {
  650.                         var skill = this._data[index];
  651.                         if ( skill )
  652.                         {
  653.                                 var costWidth = this.costWidth();
  654.                                 var rect = this.itemRect(index);
  655.                                 rect.width -= this.textPadding();
  656.                                 if ( this.isLearningSkill(skill) )
  657.                                 {
  658.                                         this.drawLearning(skill, rect.x, rect.y, rect.width - costWidth);
  659.                                 }
  660.                                 if ( exports.Param.ShowLpValue )
  661.                                 {
  662.                                         costWidth += this.lpValueWidth();
  663.                                 }
  664.                                 this.changePaintOpacity(this.isEnabled(skill));
  665.                                 this.drawItemName(skill, rect.x, rect.y, rect.width - costWidth);
  666.                                 this.drawSkillCost(skill, rect.x, rect.y, rect.width);
  667.                                 this.changePaintOpacity(true);
  668.                                 if ( this.isEquipmentSkill(skill) )
  669.                                 {
  670.                                         this.drawEquipment(skill, rect.x, rect.y, rect.width);
  671.                                 }
  672.                         }
  673.                 };

  674.                 Window_MenuSkill.prototype.drawEquipment = function(skill, x, y, width)
  675.                 {
  676.                         this.contents.fontSize = Window_Base._iconWidth / 2;
  677.                         this.changeTextColor(this.systemColor());
  678.                         this.drawText('E', x + 4, y + 8, Window_Base._iconWidth, 'right');
  679.                         this.contents.fontSize = this.standardFontSize();
  680.                         this.resetTextColor();
  681.                 };

  682.                 Window_MenuSkill.prototype.drawLearning = function(skill, x, y, width)
  683.                 {
  684.                         this.drawLpGauge(this._actor, skill, x, y, width);
  685.                         this.drawLpValue(this._actor, skill, x, y, width);
  686.                 };

  687.                 Window_MenuSkill.prototype.isEquipmentSkill = function(item)
  688.                 {
  689.                         return this._actor && this._actor.isEquipmentSkill(item);
  690.                 };

  691.                 Window_MenuSkill.prototype.isLearningSkill = function(item)
  692.                 {
  693.                         if ( this._actor )
  694.                         {
  695.                                 if ( !this._actor.isLearnedSkill(item.id) )
  696.                                 {
  697.                                         return this._actor.isLearningSkill(item) || this._actor.isEquipmentSkill(item);
  698.                                 }
  699.                         }
  700.                         return false;
  701.                 };

  702.                 return Window_MenuSkill;
  703.         })();

  704.         //--------------------------------------------------------------------------
  705.         /** Window_EquipStatus */
  706.         var _Window_EquipStatus_initialize = Window_EquipStatus.prototype.initialize;
  707.         Window_EquipStatus.prototype.initialize = function(x, y)
  708.         {
  709.                 this._handlers = {};
  710.                 _Window_EquipStatus_initialize.call(this, x, y);
  711.         };

  712.         Window_EquipStatus.prototype.setHandler = function(symbol, method)
  713.         {
  714.                 this._handlers[symbol] = method;
  715.         };

  716.         Window_EquipStatus.prototype.isHandled = function(symbol)
  717.         {
  718.                 return !!this._handlers[symbol];
  719.         };

  720.         Window_EquipStatus.prototype.callHandler = function(symbol)
  721.         {
  722.                 if ( this.isHandled(symbol) )
  723.                 {
  724.                         this._handlers[symbol]();
  725.                 }
  726.         };

  727.         Window_EquipStatus.prototype.update = function()
  728.         {
  729.                 Window_Base.prototype.update.call(this);
  730.                 this.processTouch();
  731.         };

  732.         Window_EquipStatus.prototype.processTouch = function()
  733.         {
  734.                 if ( this.visible )
  735.                 {
  736.                         if ( TouchInput.isTriggered() && this.isTouchedInsideFrame() )
  737.                         {
  738.                                 SoundManager.playCursor();
  739.                                 this.callHandler('touch');
  740.                         }
  741.                 }
  742.         };

  743.         Window_EquipStatus.prototype.isTouchedInsideFrame = function()
  744.         {
  745.                 var x = this.canvasToLocalX(TouchInput.x);
  746.                 var y = this.canvasToLocalY(TouchInput.y);
  747.                 return x >= 0 && y >= 0 && x < this.width && y < this.height;
  748.         };

  749.         var _Window_EquipStatus_refresh = Window_EquipStatus.prototype.refresh;
  750.         Window_EquipStatus.prototype.refresh = function()
  751.         {
  752.                 _Window_EquipStatus_refresh.call(this);
  753.                 if ( exports.Param.ShowControlGuide )
  754.                 {
  755.                         this.drawChangeTab(this.contentsWidth(), 0);
  756.                 }
  757.         };

  758.         //--------------------------------------------------------------------------
  759.         /** Window_EquipLearning */
  760.         exports.Window_EquipLearning = (function() {

  761.                 function Window_EquipLearning()
  762.                 {
  763.                         this.initialize.apply(this, arguments);
  764.                 }

  765.                 Window_EquipLearning.prototype = Object.create(Window_Base.prototype);
  766.                 Window_EquipLearning.prototype.constructor = Window_EquipLearning;

  767.                 Window_EquipLearning.prototype.initialize = function(x, y, width, height)
  768.                 {
  769.                         Window_Base.prototype.initialize.call(this, x, y, width, height);
  770.                         this._actor = null;
  771.                         this._item = null;
  772.                         this._handlers = {};
  773.                         this.refresh();
  774.                 };

  775.                 Window_EquipLearning.prototype.numVisibleRows = function()
  776.                 {
  777.                         return 7;
  778.                 };

  779.                 Window_EquipLearning.prototype.setActor = function(actor)
  780.                 {
  781.                         if ( this._actor !== actor )
  782.                         {
  783.                                 this._actor = actor;
  784.                                 this.refresh();
  785.                         }
  786.                 };

  787.                 Window_EquipLearning.prototype.setItem = function(item)
  788.                 {
  789.                         if ( this._item !== item )
  790.                         {
  791.                                 this._item = item;
  792.                                 this.refresh();
  793.                         }
  794.                 };

  795.                 Window_EquipLearning.prototype.setHandler = function(symbol, method)
  796.                 {
  797.                         this._handlers[symbol] = method;
  798.                 };
  799.                
  800.                 Window_EquipLearning.prototype.isHandled = function(symbol)
  801.                 {
  802.                         return !!this._handlers[symbol];
  803.                 };
  804.                
  805.                 Window_EquipLearning.prototype.callHandler = function(symbol)
  806.                 {
  807.                         if ( this.isHandled(symbol) )
  808.                         {
  809.                                 this._handlers[symbol]();
  810.                         }
  811.                 };
  812.                
  813.                 Window_EquipLearning.prototype.update = function()
  814.                 {
  815.                         Window_Base.prototype.update.call(this);
  816.                         this.processTouch();
  817.                 };
  818.                
  819.                 Window_EquipLearning.prototype.processTouch = function()
  820.                 {
  821.                         if ( this.visible )
  822.                         {
  823.                                 if ( TouchInput.isTriggered() && this.isTouchedInsideFrame() )
  824.                                 {
  825.                                         SoundManager.playCursor();
  826.                                         this.callHandler('touch');
  827.                                 }
  828.                         }
  829.                 };
  830.                
  831.                 Window_EquipLearning.prototype.isTouchedInsideFrame = function()
  832.                 {
  833.                         var x = this.canvasToLocalX(TouchInput.x);
  834.                         var y = this.canvasToLocalY(TouchInput.y);
  835.                         return x >= 0 && y >= 0 && x < this.width && y < this.height;
  836.                 };

  837.                 Window_EquipLearning.prototype.refresh = function()
  838.                 {
  839.                         this.contents.clear();
  840.                         if ( this._actor )
  841.                         {
  842.                                 var lineHeight = this.lineHeight();
  843.                                 this.drawActorName(this._actor, this.textPadding(), 0);
  844.                                 if ( this._item )
  845.                                 {
  846.                                         var x1 = this.textPadding();
  847.                                         var y1 = lineHeight;
  848.                                         var width = this.contentsWidth() - this.textPadding();
  849.                                         this.drawItemName(this._item, x1, y1, width);
  850.                                         var lineY = y1 + lineHeight + lineHeight / 4 - 1;
  851.                                         this.contents.paintOpacity = 48;
  852.                                         this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor());
  853.                                         this.contents.paintOpacity = 255;
  854.                                         var lineCount = 0;
  855.                                         Utility.leaningSkills(this._item).forEach(function(skill) {
  856.                                                 if ( this._actor.isLearnableSkill(skill) )
  857.                                                 {
  858.                                                         this.drawLearningSkill(skill, x1, y1 + lineHeight * (1.5 + lineCount++), width);
  859.                                                 }
  860.                                         }, this);
  861.                                 }
  862.                         }
  863.                         if ( exports.Param.ShowControlGuide )
  864.                         {
  865.                                 this.drawChangeTab(this.contentsWidth(), 0);
  866.                         }
  867.                 };

  868.                 Window_EquipLearning.prototype.drawLearningSkill = function(skill, x, y, width)
  869.                 {
  870.                         this.drawLpGauge(this._actor, skill, x, y, width);
  871.                         this.drawLpValue(this._actor, skill, x, y, width);
  872.                         if ( exports.Param.ShowLpValue )
  873.                         {
  874.                                 width -= this.lpValueWidth();
  875.                         }
  876.                         this.drawItemName(skill, x, y, width);
  877.                 };

  878.                 Window_EquipLearning.prototype.lineColor = function()
  879.                 {
  880.                         return this.normalColor();
  881.                 };

  882.                 return Window_EquipLearning;
  883.         })();

  884.         //--------------------------------------------------------------------------
  885.         /** Scene_Skill */
  886.         Scene_Skill.prototype.createItemWindow = function()
  887.         {
  888.                 var wx = 0;
  889.                 var wy = this._statusWindow.y + this._statusWindow.height;
  890.                 var ww = Graphics.boxWidth;
  891.                 var wh = Graphics.boxHeight - wy;
  892.                 this._itemWindow = new exports.Window_MenuSkill(wx, wy, ww, wh);
  893.                 this._itemWindow.setHelpWindow(this._helpWindow);
  894.                 this._itemWindow.setHandler('ok',     this.onItemOk.bind(this));
  895.                 this._itemWindow.setHandler('cancel', this.onItemCancel.bind(this));
  896.                 this._skillTypeWindow.setSkillWindow(this._itemWindow);
  897.                 this.addWindow(this._itemWindow);
  898.         };

  899.         //--------------------------------------------------------------------------
  900.         /** Scene_Equip */
  901.         var _Scene_Equip_initialize = Scene_Equip.prototype.initialize;
  902.         Scene_Equip.prototype.initialize = function()
  903.         {
  904.                 this._changeWindow = false;
  905.                 _Scene_Equip_initialize.call(this);
  906.         };

  907.         Scene_Equip.prototype.create = function()
  908.         {
  909.                 Scene_MenuBase.prototype.create.call(this);
  910.                 this.createHelpWindow();
  911.                 this.createStatusWindow();
  912.                 this.createCommandWindow();
  913.                 this.createSlotWindow();
  914.                 this.createItemWindow();
  915.                 this.createLearningWindow();
  916.                 this.refreshActor();
  917.         };

  918.         var _Scene_Equip_createStatusWindow = Scene_Equip.prototype.createStatusWindow;
  919.         Scene_Equip.prototype.createStatusWindow = function()
  920.         {
  921.                 _Scene_Equip_createStatusWindow.call(this);
  922.                 this._statusWindow.setHandler('touch', this.onWindowTouch.bind(this));
  923.         };

  924.         var _Scene_Equip_createCommandWindow = Scene_Equip.prototype.createCommandWindow;
  925.         Scene_Equip.prototype.createCommandWindow = function()
  926.         {
  927.                 _Scene_Equip_createCommandWindow.call(this);
  928.                 this._commandWindow.setHandler('shift', this.onWindowChange.bind(this));
  929.         };

  930.         var _Scene_Equip_createSlotWindow = Scene_Equip.prototype.createSlotWindow;
  931.         Scene_Equip.prototype.createSlotWindow = function()
  932.         {
  933.                 _Scene_Equip_createSlotWindow.call(this);
  934.                 this._slotWindow.setHandler('shift', this.onWindowChange.bind(this));
  935.         };

  936.         var _Scene_Equip_createItemWindow = Scene_Equip.prototype.createItemWindow;
  937.         Scene_Equip.prototype.createItemWindow = function()
  938.         {
  939.                 _Scene_Equip_createItemWindow.call(this);
  940.                 this._itemWindow.setHandler('shift', this.onWindowChange.bind(this));
  941.         };

  942.         Scene_Equip.prototype.createLearningWindow = function()
  943.         {
  944.                 var wx = this._statusWindow.x;
  945.                 var wy = this._statusWindow.y;
  946.                 var ww = this._statusWindow.width;
  947.                 var wh = this._statusWindow.height;
  948.                 this._learningWindow = new exports.Window_EquipLearning(wx, wy, ww, wh);
  949.                 this._learningWindow.setHandler('touch', this.onWindowTouch.bind(this));
  950.                 this._learningWindow.hide();
  951.                 this.addWindow(this._learningWindow);
  952.         };

  953.         var _Scene_Equip_refreshActor = Scene_Equip.prototype.refreshActor;
  954.         Scene_Equip.prototype.refreshActor = function()
  955.         {
  956.                 _Scene_Equip_refreshActor.call(this);
  957.                 this._learningWindow.setActor(this.actor());
  958.         };

  959.         var _Scene_Equip_update = Scene_Equip.prototype.update;
  960.         Scene_Equip.prototype.update = function()
  961.         {
  962.                 _Scene_Equip_update.call(this);
  963.                 this.updateLearningSkill();
  964.                 this.updateChangeWindow();
  965.         };

  966.         Scene_Equip.prototype.updateLearningSkill = function()
  967.         {
  968.                 if ( this._commandWindow.active )
  969.                 {
  970.                         this._learningWindow.setItem(null);
  971.                 }
  972.                 else if ( this._slotWindow.active )
  973.                 {
  974.                         var item = this._slotWindow.item();
  975.                         this._learningWindow.setItem(item);
  976.                 }
  977.                 else if ( this._itemWindow.active )
  978.                 {
  979.                         var item = this._itemWindow.item();
  980.                         this._learningWindow.setItem(item);
  981.                 }
  982.         };

  983.         Scene_Equip.prototype.updateChangeWindow = function()
  984.         {
  985.                 if ( this._changeWindow )
  986.                 {
  987.                         this.onWindowChange();
  988.                         this._changeWindow = false;
  989.                 }
  990.         };

  991.         Scene_Equip.prototype.onWindowChange = function()
  992.         {
  993.                 if ( this._statusWindow.visible )
  994.                 {
  995.                         this._statusWindow.hide();
  996.                         this._learningWindow.show();
  997.                 }
  998.                 else
  999.                 {
  1000.                         this._statusWindow.show();
  1001.                         this._learningWindow.hide();
  1002.                 }
  1003.         };

  1004.         Scene_Equip.prototype.onWindowTouch = function()
  1005.         {
  1006.                 this._changeWindow = true;
  1007.         };

  1008.         //--------------------------------------------------------------------------
  1009.         /** BattleManager */
  1010.         var _BattleManager_makeRewards = BattleManager.makeRewards;
  1011.         BattleManager.makeRewards = function()
  1012.         {
  1013.                 _BattleManager_makeRewards.call(this);
  1014.                 this._rewards.lp = $gameTroop.lpTotal();
  1015.         };

  1016.         var _BattleManager_displayRewards = BattleManager.displayRewards;
  1017.         BattleManager.displayRewards = function()
  1018.         {
  1019.                 _BattleManager_displayRewards.call(this);
  1020.                 this.displayLp();
  1021.         };

  1022.         BattleManager.displayLp = function()
  1023.         {
  1024.                 if ( exports.Param.ShowRewardLpText )
  1025.                 {
  1026.                         var lp = this._rewards.lp;
  1027.                         if ( lp > 0 )
  1028.                         {
  1029.                                 var text = exports.Param.RewardLpText.format(lp, exports.Param.Lp);
  1030.                                 $gameMessage.add('\\.' + text);
  1031.                         }
  1032.                 }
  1033.         };

  1034.         var _BattleManager_gainRewards = BattleManager.gainRewards;
  1035.         BattleManager.gainRewards = function()
  1036.         {
  1037.                 _BattleManager_gainRewards.call(this);
  1038.                 this.gainLp();
  1039.         };

  1040.         BattleManager.gainLp = function()
  1041.         {
  1042.                 var lp = this._rewards.lp;
  1043.                 $gameParty.allMembers().forEach(function(actor) {
  1044.                         actor.gainLp(lp, true);
  1045.                 });
  1046.         };

  1047.         //--------------------------------------------------------------------------
  1048.         //--------------------------------------------------------------------------
  1049.         //--------------------------------------------------------------------------

  1050.         if ( Imported.YEP_EquipCore )
  1051.         {
  1052.                 //----------------------------------------------------------------------
  1053.                 /** Window_EquipStatusYEP */
  1054.                 exports.Window_EquipStatusYEP = (function() {

  1055.                         function Window_EquipStatusYEP()
  1056.                         {
  1057.                                 this.initialize.apply(this, arguments);
  1058.                         }

  1059.                         Window_EquipStatusYEP.prototype = Object.create(Window_SkillStatus.prototype);
  1060.                         Window_EquipStatusYEP.prototype.constructor = Window_EquipStatusYEP;

  1061.                         Window_EquipStatusYEP.prototype.refresh = function()
  1062.                         {
  1063.                                 Window_SkillStatus.prototype.refresh.call(this);
  1064.                                 if ( exports.Param.ShowControlGuide )
  1065.                                 {
  1066.                                         if ( this._actor )
  1067.                                         {
  1068.                                                 this.drawChangeTab(this.contentsWidth(), -8);
  1069.                                         }
  1070.                                 }
  1071.                         };

  1072.                         return Window_EquipStatusYEP;
  1073.                 })();

  1074.                 //----------------------------------------------------------------------
  1075.                 /** Window_EquipLearning */
  1076.                 exports.Window_EquipLearning.prototype.refresh = function()
  1077.                 {
  1078.                         this.contents.clear();
  1079.                         if ( this._actor )
  1080.                         {
  1081.                                 var lineHeight = this.lineHeight();
  1082.                                 if ( this._item )
  1083.                                 {
  1084.                                         var x1 = this.textPadding();
  1085.                                         var y1 = 0;
  1086.                                         var width = this.contentsWidth() - this.textPadding();
  1087.                                         this.drawItemName(this._item, x1, y1, width);
  1088.                                         var lineY = y1 + lineHeight + lineHeight / 4 - 1;
  1089.                                         this.contents.paintOpacity = 48;
  1090.                                         this.contents.fillRect(0, lineY, this.contentsWidth(), 2, this.lineColor());
  1091.                                         this.contents.paintOpacity = 255;
  1092.                                         var lineCount = 0;
  1093.                                         Utility.leaningSkills(this._item).forEach(function(skill) {
  1094.                                                 if ( this._actor.isLearnableSkill(skill) )
  1095.                                                 {
  1096.                                                         this.drawLearningSkill(skill, x1, y1 + lineHeight * (1.5 + lineCount++), width);
  1097.                                                 }
  1098.                                         }, this);
  1099.                                 }
  1100.                         }
  1101.                 };

  1102.                 //----------------------------------------------------------------------
  1103.                 /** Scene_Equip */
  1104.                 Scene_Equip.prototype.create = function()
  1105.                 {
  1106.                         Scene_MenuBase.prototype.create.call(this);
  1107.                         this.createHelpWindow();
  1108.                         this.createCommandWindow();
  1109.                         this.createStatusWindow();
  1110.                         this.createSlotWindow();
  1111.                         this.createItemWindow();
  1112.                         this.createCompareWindow();
  1113.                         this._lowerRightVisibility = true;
  1114.                         this.updateLowerRightWindows();
  1115.                         this.createLearningWindow();
  1116.                         this.refreshActor();
  1117.                 };

  1118.                 Scene_Equip.prototype.createStatusWindow = function()
  1119.                 {
  1120.                         var wx = this._commandWindow.width;
  1121.                         var wy = this._helpWindow.height;
  1122.                         var ww = Graphics.boxWidth - wx;
  1123.                         var wh = this._commandWindow.height;
  1124.                         this._statusWindow = new exports.Window_EquipStatusYEP(wx, wy, ww, wh);
  1125.                         this.addWindow(this._statusWindow);
  1126.                 };

  1127.                 Scene_Equip.prototype.createLearningWindow = function()
  1128.                 {
  1129.                         var wx = this._compareWindow.x;
  1130.                         var wy = this._compareWindow.y;
  1131.                         var ww = this._compareWindow.width;
  1132.                         var wh = this._compareWindow.height;
  1133.                         this._learningWindow = new exports.Window_EquipLearning(wx, wy, ww, wh);
  1134.                         this._learningWindow.hide();
  1135.                         this.addWindow(this._learningWindow);
  1136.                 };

  1137.                 Scene_Equip.prototype.onWindowChange = function()
  1138.                 {
  1139.                         if ( this._compareWindow.visible )
  1140.                         {
  1141.                                 this._compareWindow.hide();
  1142.                                 this._learningWindow.show();
  1143.                         }
  1144.                         else
  1145.                         {
  1146.                                 this._compareWindow.show();
  1147.                                 this._learningWindow.hide();
  1148.                         }
  1149.                 };

  1150.         } // Imported.YEP_EquipCore

  1151.         //--------------------------------------------------------------------------
  1152.         //--------------------------------------------------------------------------
  1153.         //--------------------------------------------------------------------------

  1154.         if ( Imported.YEP_VictoryAftermath && exports.Param.LpAftermathEnable )
  1155.         {
  1156.                 //----------------------------------------------------------------------
  1157.                 /** BattleManager */
  1158.                 var _BattleManager_prepareVictoryInfo = BattleManager.prepareVictoryInfo;
  1159.                 BattleManager.prepareVictoryInfo = function()
  1160.                 {
  1161.                         $gameParty.allMembers().forEach(function(actor) {
  1162.                                 actor._victoryLpSkills = [];
  1163.                                 actor._victoryLpGauges = [];
  1164.                         }, this);
  1165.                         _BattleManager_prepareVictoryInfo.call(this);
  1166.                 };

  1167.                 BattleManager.gainLp = function()
  1168.                 {
  1169.                         var lp = this._rewards.lp;
  1170.                         $gameParty.allMembers().forEach(function(actor) {
  1171.                                 actor.gainLp(lp, false);
  1172.                         });
  1173.                 };

  1174.                 //----------------------------------------------------------------------
  1175.                 /** Game_Actor */
  1176.                 var _Game_Actor_clearVictoryData = Game_Actor.prototype.clearVictoryData;
  1177.                 Game_Actor.prototype.clearVictoryData = function()
  1178.                 {
  1179.                         _Game_Actor_clearVictoryData.call(this);
  1180.                         this._victoryLpSkills = undefined;
  1181.                         this._victoryLpGauges = undefined;
  1182.                 };

  1183.                 var _Game_Actor_gainLp = Game_Actor.prototype.gainLp;
  1184.                 Game_Actor.prototype.gainLp = function(lp, show)
  1185.                 {
  1186.                         _Game_Actor_gainLp.call(this, lp, show);
  1187.                 };

  1188.                 var _Game_Actor_addSkillLp = Game_Actor.prototype.addSkillLp;
  1189.                 Game_Actor.prototype.addSkillLp = function(skill, lp)
  1190.                 {
  1191.                         var victoryLpEnable = false;
  1192.                         var beforeLp = 0;
  1193.                         if ( this.isLearnableSkill(skill) )
  1194.                         {
  1195.                                 if ( !this.isLearnedSkill(skill.id) )
  1196.                                 {
  1197.                                         victoryLpEnable = true;
  1198.                                         if ( this._skillLp && this._skillLp[skill.id] )
  1199.                                         {
  1200.                                                 beforeLp = this._skillLp[skill.id];
  1201.                                         }
  1202.                                 }
  1203.                         }
  1204.                         _Game_Actor_addSkillLp.call(this, skill, lp);
  1205.                         if ( victoryLpEnable && this._victoryLpGauges )
  1206.                         {
  1207.                                 var data = {
  1208.                                         skillId: skill.id,
  1209.                                         before: beforeLp
  1210.                                 };
  1211.                                 this._victoryLpGauges.push(data);
  1212.                         }
  1213.                 };

  1214.                 var _Game_Actor_learnLpSkill = Game_Actor.prototype.learnLpSkill;
  1215.                 Game_Actor.prototype.learnLpSkill = function(skillId)
  1216.                 {
  1217.                         var addVictorySkills = false;
  1218.                         if ( !this.isLearnedSkill(skillId) && this._victoryPhase )
  1219.                         {
  1220.                                 addVictorySkills = true;
  1221.                         }
  1222.                         _Game_Actor_learnLpSkill.call(this, skillId);
  1223.                         if ( addVictorySkills )
  1224.                         {
  1225.                                 var idx = this._victorySkills.indexOf(skillId);
  1226.                                 if ( idx >= 0 )
  1227.                                 {
  1228.                                         this._victorySkills.splice(idx, 1);
  1229.                                 }
  1230.                                 this._victoryLpSkills.push(skillId);
  1231.                         }
  1232.                 };

  1233.                 Game_Actor.prototype.gainedLp = function()
  1234.                 {
  1235.                         return this.battleLp();
  1236.                 };

  1237.                 Game_Actor.prototype.gainedLpBySkill = function(skillId)
  1238.                 {
  1239.                         var lp = this.battleLp();
  1240.                         if ( exports.Param.LpMultipleGainEnable )
  1241.                         {
  1242.                                 lp *= this.equipmentSameSkillCount(skillId);
  1243.                         }
  1244.                         return lp;
  1245.                 };

  1246.                 Game_Actor.prototype.victoryLpSkills = function()
  1247.                 {
  1248.                         return this._victoryLpSkills;
  1249.                 };

  1250.                 Game_Actor.prototype.victoryLpGauges = function()
  1251.                 {
  1252.                         return this._victoryLpGauges;
  1253.                 };

  1254.                 //----------------------------------------------------------------------
  1255.                 /** Window_VictoryLp */
  1256.                 exports.Window_VictoryLp = (function() {

  1257.                         function Window_VictoryLp()
  1258.                         {
  1259.                                 this.initialize.apply(this, arguments);
  1260.                         }

  1261.                         Window_VictoryLp.prototype = Object.create(Window_VictoryExp.prototype);
  1262.                         Window_VictoryLp.prototype.constructor = Window_VictoryLp;

  1263.                         Window_VictoryLp.prototype.drawActorGauge = function(actor, index)
  1264.                         {
  1265.                                 var rect = this.gaugeRect(index);
  1266.                                 this.clearGaugeRect(index);
  1267.                                 this.resetTextColor();
  1268.                                 this.drawActorName(actor, rect.x + 2, rect.y);
  1269.                                 this.drawLevel(actor, rect);
  1270.                                 this.drawLpGained(actor, rect);
  1271.                                 this.drawGainedSkills(actor, rect);
  1272.                         };

  1273.                         Window_VictoryLp.prototype.drawLpGained = function(actor, rect)
  1274.                         {
  1275.                                 var value = actor.battleLp();
  1276.                                 var text = exports.Param.LpAftermathFormat.format(value, exports.Param.Lp);
  1277.                                 var wx = rect.x + rect.width - this.textWidthEx(text);
  1278.                                 var wy = rect.y + this.lineHeight() * 1;
  1279.                                 this.changeTextColor(this.systemColor());
  1280.                                 this.drawText(exports.Param.LpAftermathEarned, rect.x + 2, wy, rect.width - 4, 'left');
  1281.                                 this.resetTextColor();
  1282.                                 this.drawTextEx(text, wx, wy);
  1283.                         };

  1284.                         Window_VictoryLp.prototype.drawGainedSkills = function(actor, rect)
  1285.                         {
  1286.                                 if ( !this.meetDrawGainedSkillsCondition(actor) )
  1287.                                 {
  1288.                                         return;
  1289.                                 }
  1290.                                 var victorySkills = actor.victoryLpSkills();
  1291.                                 if ( victorySkills )
  1292.                                 {
  1293.                                         var wy = rect.y;
  1294.                                         victorySkills.forEach(function(skillId) {
  1295.                                                 if ( wy + this.lineHeight() <= rect.y + rect.height )
  1296.                                                 {
  1297.                                                         var skill = $dataSkills[skillId];
  1298.                                                         if ( skill )
  1299.                                                         {
  1300.                                                                 var text = '\\i[' + skill.iconIndex + ']' + skill.name;
  1301.                                                                 text = TextManager.obtainSkill.format(text);
  1302.                                                                 var ww = this.textWidthEx(text);
  1303.                                                                 var wx = rect.x + (rect.width - ww) / 2;
  1304.                                                                 this.drawTextEx(text, wx, wy);
  1305.                                                                 wy += this.lineHeight();
  1306.                                                         }
  1307.                                                 }
  1308.                                         }, this);
  1309.                                 }
  1310.                         };

  1311.                         Window_VictoryLp.prototype.meetDrawGainedSkillsCondition = function(actor)
  1312.                         {
  1313.                                 if ( this._showGainedSkills )
  1314.                                 {
  1315.                                         if ( this._tick + 10 >= Yanfly.Param.VAGaugeTicks )
  1316.                                         {
  1317.                                                 return true;
  1318.                                         }
  1319.                                 }
  1320.                                 return false;
  1321.                         };

  1322.                         Window_VictoryLp.prototype.actorExpRate = function(actor)
  1323.                         {
  1324.                                 return 1.0;
  1325.                         };

  1326.                         return Window_VictoryLp;
  1327.                 })();

  1328.                 //----------------------------------------------------------------------
  1329.                 /** Scene_Battle */
  1330.                 var _Scene_Battle_addCustomVictorySteps = Scene_Battle.prototype.addCustomVictorySteps;
  1331.                 Scene_Battle.prototype.addCustomVictorySteps = function(array)
  1332.                 {
  1333.                         array = _Scene_Battle_addCustomVictorySteps.call(this, array);
  1334.                         if ( !array.contains('LP') )
  1335.                         {
  1336.                                 array.push('LP');
  1337.                         }
  1338.                         return array;
  1339.                 };

  1340.                 var _Scene_Battle_updateVictorySteps = Scene_Battle.prototype.updateVictorySteps;
  1341.                 Scene_Battle.prototype.updateVictorySteps = function()
  1342.                 {
  1343.                         _Scene_Battle_updateVictorySteps.call(this);
  1344.                         if ( this.isVictoryStep('LP') )
  1345.                         {
  1346.                                 this.updateVictoryLp();
  1347.                         }
  1348.                 };

  1349.                 Scene_Battle.prototype.updateVictoryLp = function()
  1350.                 {
  1351.                         if ( !this._victoryLpWindow )
  1352.                         {
  1353.                                 this.createVictoryLp();
  1354.                         }
  1355.                         else if ( this._victoryLpWindow.isReady() )
  1356.                         {
  1357.                                 if ( this.victoryTriggerContinue() )
  1358.                                 {
  1359.                                         this.finishVictoryLp();
  1360.                                 }
  1361.                         }
  1362.                 };

  1363.                 Scene_Battle.prototype.createVictoryLp = function()
  1364.                 {
  1365.                         this._victoryTitleWindow.refresh(exports.Param.LpAftermathCaption);
  1366.                         this._victoryLpWindow = new exports.Window_VictoryLp();
  1367.                         this._victoryLpWindow.open();
  1368.                         this.addWindow(this._victoryLpWindow);
  1369.                 };

  1370.                 Scene_Battle.prototype.finishVictoryLp = function()
  1371.                 {
  1372.                         SoundManager.playOk();
  1373.                         this._victoryLpWindow.close();
  1374.                         this.processNextVictoryStep();
  1375.                 };

  1376.         } // Imported.YEP_VictoryAftermath

  1377.         //--------------------------------------------------------------------------
  1378.         //--------------------------------------------------------------------------
  1379.         //--------------------------------------------------------------------------

  1380.         if ( Imported.ySkillCPSystem )
  1381.         {
  1382.                 //----------------------------------------------------------------------
  1383.                 /** Game_Actor */
  1384.                 Game_Actor.prototype.setPoint = function()
  1385.                 {
  1386.                         return Math.floor(this.skillsOrigin().reduce(function(r, skill) {
  1387.                                 if ( !skill.setPoint )
  1388.                                 {
  1389.                                         DataManager.initSetPoint(skill);
  1390.                                 }
  1391.                                 return this.isIncludeLearningSkills(skill.id) ? r : r + skill.setPoint;
  1392.                         }.bind(this), 0));
  1393.                 };

  1394.                 Game_Actor.prototype.capPoint = function()
  1395.                 {
  1396.                         return Math.floor(this.skillsOrigin().reduce(function(r, skill) {
  1397.                                 if ( !skill.capPoint )
  1398.                                 {
  1399.                                         DataManager.initCapPoint(skill);
  1400.                                 }
  1401.                                 return this.isIncludeLearningSkills(skill.id) ? r : r + skill.capPoint;
  1402.                         }.bind(this), 0));
  1403.                 };

  1404.                 //----------------------------------------------------------------------
  1405.                 /** Window_SkillEquipStatus */
  1406.                 exports.Window_SkillEquipStatus = (function() {

  1407.                         function Window_SkillEquipStatus()
  1408.                         {
  1409.                                 this.initialize.apply(this, arguments);
  1410.                         }

  1411.                         Window_SkillEquipStatus.prototype = Object.create(Window_EquipStatus.prototype);
  1412.                         Window_SkillEquipStatus.prototype.constructor = Window_SkillEquipStatus;

  1413.                         Window_SkillEquipStatus.prototype.drawChangeTab = function(x, y)
  1414.                         {
  1415.                         };

  1416.                         return Window_SkillEquipStatus;
  1417.                 })();

  1418.                 //----------------------------------------------------------------------
  1419.                 /** Scene_SkillEquip */
  1420.                 Scene_SkillEquip.prototype.createStatusWindow = function()
  1421.                 {
  1422.                         this._statusWindow = new exports.Window_SkillEquipStatus(0, this._helpWindow.height);
  1423.                         this.addWindow(this._statusWindow);
  1424.                 };

  1425.         } // Imported.ySkillCPSystem

  1426. }((this.dsEquipmentSkillLearning = this.dsEquipmentSkillLearning || {})));
复制代码
回复

使用道具 举报

梦石
0
星屑
3958
在线时间
445 小时
注册时间
2019-3-3
回帖
80
 楼主| 发表于 2019-3-3 16:56:29 | 显示全部楼层
soulsaga 发表于 2019-3-3 16:54
//==============================================================================
// dsEquipmentSkill ...

谢谢啦
回复

使用道具 举报

梦石
0
星屑
22879
在线时间
8598 小时
注册时间
2011-12-31
回帖
3270
发表于 2019-3-3 21:04:00 | 显示全部楼层
http://dourakusoftweb.blog.fc2.com/blog-entry-10.html
作成したプラグインの一覧になります。
プラグインの利用規約をご覧の上でご利用下さい。

----
○ 基礎システム系
・画面サイズとレイアウトサイズを別に設定するプラグイン ver1.01 記事へ
プラグインをダウンロード

----
○ 戦闘系
・バトラー選択変更プラグイン ver1.00 記事へ
プラグインをダウンロード

・戦闘開始時のメッセージ表示を変更するプラグイン ver1.00 記事へ
プラグインをダウンロード

・戦闘中のコマンド表示制御プラグイン ver1.00 記事へ
プラグインをダウンロード

----
○ メニュー系
・メニューのフェイスを戦闘キャラに変更するプラグイン ver1.02 記事へ
プラグインをダウンロード

・メニューコマンドを並べ替えるプラグイン ver1.01 記事へ
プラグインをダウンロード

----
○ ゲームシステム系
・武器熟練度プラグイン ver1.06 記事へ
プラグインをダウンロード

・ジョブチェンジプラグイン ver1.11.0 記事へ
プラグインをダウンロード
※拡張メニュー画面01 ver1.1.0 記事へ
プラグインをダウンロード

・職業間でスキルを共有しないプラグイン ver1.3.0 記事へ
プラグインをダウンロード

・コマンド割り当てプラグイン ver1.00 記事へ
プラグインをダウンロード

・装備からスキル習得プラグイン ver1.7.0 記事へ
プラグインをダウンロード
※リザルト画面拡張01 ver1.00 記事へ
プラグインをダウンロード
※リザルト画面拡張02 ver1.00 記事へ
プラグインをダウンロード
※リザルト画面拡張03 ver1.0.0 記事へ
プラグインをダウンロード

・パッシブスキルプラグイン ver1.5.1 記事へ
プラグインをダウンロード

・戦闘中の行動による能力成長プラグイン ver1.01 記事へ
プラグインをダウンロード

点评

fc2網國内要科學上網才去到巴  发表于 2019-3-3 21:05
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部