设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1311|回复: 2
打印 上一主题 下一主题

[交流讨论] 请教大神,怎么关掉YPE商店界面“G”货币(即RMMV系统货币)

[复制链接]

Lv2.观梦者

梦石
0
星屑
786
在线时间
109 小时
注册时间
2008-2-10
帖子
254
跳转到指定楼层
1
发表于 2018-8-14 20:28:30 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
JAVASCRIPT 代码复制
  1. //=============================================================================
  2. // Yanfly Engine Plugins - Shop Menu Core
  3. // YEP_ShopMenuCore.js
  4. //=============================================================================
  5.  
  6. var Imported = Imported || {};
  7. Imported.YEP_ShopMenuCore = true;
  8.  
  9. var Yanfly = Yanfly || {};
  10. Yanfly.Shop = Yanfly.Shop || {};
  11. Yanfly.Shop.version = 1.05
  12.  
  13. //=============================================================================
  14. /*:
  15.  * @plugindesc v1.05 Revamps the shop menu appearance and provides the
  16.  * framework for many new shop options.
  17.  * @author Yanfly Engine Plugins
  18.  *
  19.  * @param ---General---
  20.  * @default
  21.  *
  22.  * @param Command Order
  23.  * @parent ---General---
  24.  * @desc This is the order in which the command menu will appear. Use
  25.  * a space to separate the individual commands.
  26.  * @default Buy Sell Equip Custom Cancel
  27.  *
  28.  * @param Shop List Width
  29.  * @parent ---General---
  30.  * @desc This allows you to adjust the formula to determine the window width
  31.  * for the main shop list windows.
  32.  * @default Graphics.boxWidth / 2 + Graphics.boxWidth / 10
  33.  *
  34.  * @param Command Alignment
  35.  * @parent ---General---
  36.  * @type combo
  37.  * @option left
  38.  * @option center
  39.  * @option right
  40.  * @desc Text alignment used for the command windows.
  41.  * left     center     right
  42.  * @default center
  43.  *
  44.  * @param ---Status Window---
  45.  * @default
  46.  *
  47.  * @param Default Mode
  48.  * @parent ---Status Window---
  49.  * @type combo
  50.  * @option default
  51.  * @option actor
  52.  * @desc Display a comparison for all actors per stat or per actor?
  53.  * default - All Actors     actor - Individual Actors
  54.  * @default actor
  55.  *
  56.  * @param Stat Switching
  57.  * @parent ---Status Window---
  58.  * @type boolean
  59.  * @on Enable
  60.  * @off Disable
  61.  * @desc Enable stat comparison switching by pressing left/right?
  62.  * NO - false     YES - true
  63.  * @default true
  64.  *
  65.  * @param Cannot Equip
  66.  * @parent ---Status Window---
  67.  * @desc If an actor cannot equip an item, this text is shown.
  68.  * @default Can't Equip
  69.  *
  70.  * @param Stat Font Size
  71.  * @parent ---Status Window---
  72.  * @desc The font size used for stat comparisons.
  73.  * Default: 28
  74.  * @default 20
  75.  *
  76.  * @param Cannot Equip Font Size
  77.  * @parent ---Status Window---
  78.  * @type number
  79.  * @min 1
  80.  * @desc The font size used for cannot equip text.
  81.  * Default: 28
  82.  * @default 20
  83.  *
  84.  * @param ---Info Window---
  85.  * @default
  86.  *
  87.  * @param Show Icon
  88.  * @parent ---Info Window---
  89.  * @type boolean
  90.  * @on Show
  91.  * @off Hide
  92.  * @desc Show the icon in the info window?
  93.  * NO - false     YES - true
  94.  * @default true
  95.  *
  96.  * @param Icon Size
  97.  * @parent ---Info Window---
  98.  * @type number
  99.  * @min 0
  100.  * @desc This will be the width and height of the icon to be drawn.
  101.  * This is normally 4x the default Icon Width and Icon Height.
  102.  * @default 128
  103.  *
  104.  * @param Font Size
  105.  * @parent ---Info Window---
  106.  * @type number
  107.  * @min 1
  108.  * @desc This changes the font size for description items.
  109.  * Default: 28
  110.  * @default 20
  111.  *
  112.  * @param Recovery Format
  113.  * @parent ---Info Window---
  114.  * @desc This is the text format for HP/MP Recovery.
  115.  * @default %1 Heal
  116.  *
  117.  * @param Add State
  118.  * @parent ---Info Window---
  119.  * @desc This is the text for adding states.
  120.  * @default +State
  121.  *
  122.  * @param Add Buff
  123.  * @parent ---Info Window---
  124.  * @desc This is the text for adding buffs.
  125.  * @default +Buff
  126.  *
  127.  * @param Remove State
  128.  * @parent ---Info Window---
  129.  * @desc This is the text for remove states.
  130.  * @default -State
  131.  *
  132.  * @param Remove Buff
  133.  * @parent ---Info Window---
  134.  * @desc This is the text for remove buffs.
  135.  * @default -Buff
  136.  *
  137.  * @param Maximum Icons
  138.  * @parent ---Info Window---
  139.  * @type number
  140.  * @min 0
  141.  * @desc Maximum number of icons drawn for states and buffs.
  142.  * @default 4
  143.  *
  144.  * @help
  145.  * ============================================================================
  146.  * Introduction
  147.  * ============================================================================
  148.  *
  149.  * The shop menu in RPG Maker MV is the same as it was in RPG Maker VX and RPG
  150.  * Maker VX Ace. It's relatively basic and provides adequate information, but
  151.  * not really enough to let the player know what they're actually buying or
  152.  * even selling. This plugin enables shops to show more than just the basic
  153.  * information displayed in RPG Maker MV and even allows for custom commands to
  154.  * be inserted into the command window.
  155.  *
  156.  * This plugin also gives the player the option to tab between a parameter
  157.  * comparison mode with the whole party displaying individual stats at a time
  158.  * or individual actors displaying all stats at a time. The player can switch
  159.  * between the two modes by pressing the 'tab' button on the keyboard or with
  160.  * touch input on the name of the actor or parameter.
  161.  *
  162.  * ============================================================================
  163.  * Instructions
  164.  * ============================================================================
  165.  *
  166.  * You can add and remove commands from the Command Window by changing the
  167.  * 'Command Order' parameter. Here is a list of commands you may use:
  168.  *
  169.  *   Buy
  170.  *   - This is the buy item command.
  171.  *
  172.  *   Sell
  173.  *   - This is the sell item command.
  174.  *
  175.  *   Equip
  176.  *   - This is the equip command to directly access an actor's equipment.
  177.  *
  178.  *   Custom
  179.  *   - If you have any custom shop menu items, they will be displayed here.
  180.  *
  181.  *   Cancel
  182.  *   - This exits the shop.
  183.  *
  184.  * ============================================================================
  185.  * Notetags
  186.  * ============================================================================
  187.  *
  188.  * You can use the following notetag to alter various shop aspects
  189.  *
  190.  * Item, Weapon, and Armor Notetag:
  191.  *
  192.  *   <Price: x>
  193.  *   This notetag allows you to exceed the default editor limit for item prices
  194.  *   of 999,999 gold.
  195.  *
  196.  *   <Sell Price: x>
  197.  *   This sets the selling price of the item to x.
  198.  *
  199.  *   <Cannot Sell>
  200.  *   This makes it so that the item cannot be sold.
  201.  *
  202.  *   <Can Sell>
  203.  *   This makes it so that the item can be sold even if it is at 0 gold.
  204.  *
  205.  * ============================================================================
  206.  * Changelog
  207.  * ============================================================================
  208.  *
  209.  * Version 1.05:
  210.  * - Updated for RPG Maker MV version 1.5.0.
  211.  *
  212.  * Version 1.04:
  213.  * - Compatibility Update with YEP_X_ItemPictureImg.js
  214.  *
  215.  * Version 1.03:
  216.  * - Updated for RPG Maker MV version 1.1.0.
  217.  *
  218.  * Version 1.02:
  219.  * - Fixed a visual bug that listed actor stats in the wrong order.
  220.  *
  221.  * Version 1.01a:
  222.  * - Disabled LEFT/RIGHT movement from the status window while inputting an
  223.  * item quantity to buy.
  224.  * - Added a font reset on the number window upon refresh.
  225.  * - Fixed a visual error with MP recovery displaying a 0 instead of ---.
  226.  *
  227.  * Version 1.00:
  228.  * - Finished Plugin!
  229.  */
  230. //=============================================================================
  231.  
  232. //=============================================================================
  233. // Parameter Variables
  234. //=============================================================================
  235.  
  236. Yanfly.Parameters = PluginManager.parameters('YEP_ShopMenuCore');
  237. Yanfly.Param = Yanfly.Param || {};
  238.  
  239. Yanfly.Param.ShopCommandOrder = String(Yanfly.Parameters['Command Order']);
  240. Yanfly.Param.ShopListWidth = String(Yanfly.Parameters['Shop List Width']);
  241. Yanfly.Param.ShopCommandAlign = String(Yanfly.Parameters['Command Alignment']);
  242.  
  243. Yanfly.Param.ShopDefaultMode = String(Yanfly.Parameters['Default Mode']);
  244. Yanfly.Param.ShopDefaultMode = Yanfly.Param.ShopDefaultMode.toLowerCase();
  245. Yanfly.Param.ShopStatSwitch = eval(String(Yanfly.Parameters['Stat Switching']));
  246. Yanfly.Param.ShopCantEquip = String(Yanfly.Parameters['Cannot Equip']);
  247. Yanfly.Param.ShopStatFontSize = Number(Yanfly.Parameters['Stat Font Size']);
  248. Yanfly.Param.ShopCantSize = Number(Yanfly.Parameters['Cannot Equip Font Size']);
  249.  
  250. if (!Imported.YEP_ItemCore) {
  251.   Yanfly.Param.ItemFontSize = Number(Yanfly.Parameters['Font Size']);
  252.   Yanfly.Param.ItemShowIcon = String(Yanfly.Parameters['Show Icon']);
  253.   Yanfly.Param.ItemIconSize = Number(Yanfly.Parameters['Icon Size']);
  254.   Yanfly.Param.ItemRecoverFmt = String(Yanfly.Parameters['Recovery Format']);
  255.   Yanfly.Param.ItemAddState = String(Yanfly.Parameters['Add State']);
  256.   Yanfly.Param.ItemAddBuff = String(Yanfly.Parameters['Add Buff']);
  257.   Yanfly.Param.ItemRemoveState = String(Yanfly.Parameters['Remove State']);
  258.   Yanfly.Param.ItemRemoveBuff = String(Yanfly.Parameters['Remove Buff']);
  259.   Yanfly.Param.ItemMaxIcons = Number(Yanfly.Parameters['Maximum Icons']);
  260. };
  261.  
  262. //=============================================================================
  263. // DataManager
  264. //=============================================================================
  265.  
  266. Yanfly.Shop.DataManager_isDatabaseLoaded = DataManager.isDatabaseLoaded;
  267. DataManager.isDatabaseLoaded = function() {
  268.   if (!Yanfly.Shop.DataManager_isDatabaseLoaded.call(this)) return false;
  269.   if (!Yanfly._loaded_YEP_ShopMenuCore) {
  270.     this.processShopNotetags($dataItems);
  271.     this.processShopNotetags($dataWeapons);
  272.     this.processShopNotetags($dataArmors);
  273.     Yanfly._loaded_YEP_ShopMenuCore = true;
  274.   }
  275.   return true;
  276. };
  277.  
  278. DataManager.processShopNotetags = function(group) {
  279.   for (var n = 1; n < group.length; n++) {
  280.     var obj = group[n];
  281.     var notedata = obj.note.split(/[\r\n]+/);
  282.  
  283.     obj.cannotSell = false;
  284.     obj.canSell = false;
  285.     obj.sellPrice = undefined;
  286.  
  287.     for (var i = 0; i < notedata.length; i++) {
  288.       var line = notedata[i];
  289.       if (line.match(/<(?:PRICE):[ ](\d+)>/i)) {
  290.         obj.price = parseInt(RegExp.$1);
  291.       } else if (line.match(/<(?:SELL PRICE|SELLING PRICE):[ ](\d+)>/i)) {
  292.         obj.sellPrice = parseInt(RegExp.$1);
  293.       } else if (line.match(/<(?:CANNOT SELL)>/i)) {
  294.         obj.cannotSell = true;
  295.       } else if (line.match(/<(?:CAN SELL)>/i)) {
  296.         obj.canSell = true;
  297.       }
  298.     }
  299.   }
  300. };
  301.  
  302. //=============================================================================
  303. // Game_Temp
  304. //=============================================================================
  305.  
  306. Game_Temp.prototype.registerShopGoods = function() {
  307.     var scene = SceneManager._scene;
  308.     this._shopGoods = scene._goods;
  309.     this._shopPurchaseOnly = scene._purchaseOnly;
  310. };
  311.  
  312. Game_Temp.prototype.clearShopGoods = function() {
  313.     this._shopGoods = undefined;
  314.     this._shopPurchaseOnly = undefined;
  315. };
  316.  
  317. //=============================================================================
  318. // Window_ShopCommand
  319. //=============================================================================
  320.  
  321. Window_ShopCommand.prototype.windowWidth = function() {
  322.     return 240;
  323. };
  324.  
  325. Window_ShopCommand.prototype.maxCols = function() {
  326.     return 1;
  327. };
  328.  
  329. Window_ShopCommand.prototype.numVisibleRows = function() {
  330.     return 4;
  331. };
  332.  
  333. Window_ShopCommand.prototype.makeCommandList = function() {
  334.     this._commandOrder = Yanfly.Param.ShopCommandOrder.split(' ');
  335.     for (var i = 0; i < this._commandOrder.length; ++i) {
  336.       var command = this._commandOrder[i];
  337.       this.createCommand(command);
  338.     }
  339. };
  340.  
  341. Window_ShopCommand.prototype.createCommand = function(command) {
  342.     command = command.toUpperCase();
  343.     if (command === 'BUY') {
  344.       this.addCommand(TextManager.buy, 'buy');
  345.     } else if (command === 'SELL') {
  346.       this.addCommand(TextManager.sell, 'sell', !this._purchaseOnly);
  347.     } else if (command === 'CANCEL') {
  348.       this.addCommand(TextManager.cancel, 'cancel');
  349.     } else if (['CUSTOM', 'ORIGINAL'].contains(command)) {
  350.       this.addCustomCommands();
  351.     } else if (command === 'EQUIP') {
  352.       this.addCommand(TextManager.equip, 'equip');
  353.     }
  354. };
  355.  
  356. Window_ShopCommand.prototype.addCustomCommands = function() {
  357. };
  358.  
  359. Window_ShopCommand.prototype.itemTextAlign = function() {
  360.     return Yanfly.Param.ShopCommandAlign;
  361. };
  362.  
  363. //=============================================================================
  364. // Window_ShopInfo
  365. //=============================================================================
  366.  
  367. function Window_ShopInfo() {
  368.     this.initialize.apply(this, arguments);
  369. }
  370.  
  371. Window_ShopInfo.prototype = Object.create(Window_Base.prototype);
  372. Window_ShopInfo.prototype.constructor = Window_ShopInfo;
  373.  
  374. Window_ShopInfo.prototype.initialize = function(x, y, width, height) {
  375.     Window_Base.prototype.initialize.call(this, x, y, width, height);
  376.     this._item = null;
  377.     this.deactivate();
  378.     this.refresh();
  379. };
  380.  
  381. Window_ShopInfo.prototype.setItem = function(item) {
  382.     if (this._item === item) return;
  383.     this._item = item;
  384.     this.refresh();
  385. };
  386.  
  387. Window_ShopInfo.prototype.refresh = function() {
  388.     this.contents.clear();
  389.     this.drawDarkRectEntries();
  390.     if (!this._item) return;
  391.     this.contents.fontSize = Yanfly.Param.ItemFontSize;
  392.     this.drawItemEntry();
  393. };
  394.  
  395. Window_ShopInfo.prototype.drawDarkRectEntries = function() {
  396.     var rect = new Rectangle();
  397.     if (eval(Yanfly.Param.ItemShowIcon)) {
  398.       rect.width = Window_Base._faceWidth;
  399.       rect.height = Window_Base._faceHeight;
  400.       this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
  401.       rect.width = (this.contents.width - Window_Base._faceWidth) / 2;
  402.     } else {
  403.       rect.width = this.contents.width / 2;
  404.     }
  405.     rect.height = this.lineHeight();
  406.     for (var i = 0; i < 8; ++i) {
  407.       rect = this.getRectPosition(rect, i);
  408.       this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
  409.     }
  410. };
  411.  
  412. Window_ShopInfo.prototype.drawDarkRect = function(dx, dy, dw, dh) {
  413.     var color = this.gaugeBackColor();
  414.     this.changePaintOpacity(false);
  415.     this.contents.fillRect(dx + 1, dy + 1, dw - 2, dh - 2, color);
  416.     this.changePaintOpacity(true);
  417. };
  418.  
  419. Window_ShopInfo.prototype.getRectPosition = function(rect, i) {
  420.     if (i % 2 === 0) {
  421.       if (eval(Yanfly.Param.ItemShowIcon)) {
  422.         rect.x = Window_Base._faceWidth;
  423.       } else {
  424.         rect.x = 0;
  425.       }
  426.       rect.y = i / 2 * this.lineHeight();
  427.     } else {
  428.       if (eval(Yanfly.Param.ItemShowIcon)) {
  429.         rect.x = Window_Base._faceWidth + rect.width;
  430.       } else {
  431.         rect.x = rect.width;
  432.       }
  433.     }
  434.     return rect;
  435. };
  436.  
  437. Window_ShopInfo.prototype.drawItemEntry = function() {
  438.     var item = this._item;
  439.     if (eval(Yanfly.Param.ItemShowIcon)) this.drawItemIcon(item);
  440.     if (DataManager.isItem(item)) this.drawItemInfo(item);
  441.     if (DataManager.isWeapon(item)) this.drawEquipInfo(item);
  442.     if (DataManager.isArmor(item)) this.drawEquipInfo(item);
  443. };
  444.  
  445. Window_ShopInfo.prototype.drawItemIcon = function() {
  446.     this.drawLargeIcon();
  447. };
  448.  
  449. if (Imported.YEP_X_ItemPictureImg) {
  450.  
  451. Yanfly.IPI.Window_ShopInfo_drawItemIcon =
  452.   Window_ShopInfo.prototype.drawItemIcon;
  453. Window_ShopInfo.prototype.drawItemIcon = function() {
  454.   if (this.itemHasPictureImage()) {
  455.     this.readyItemPictureImage(this._item);
  456.   } else {
  457.     Yanfly.IPI.Window_ShopInfo_drawItemIcon.call(this);
  458.   }
  459. };
  460.  
  461. Window_ShopInfo.prototype.itemHasPictureImage = function() {
  462.   if (!this._item) return false;
  463.   var filename = ItemManager.getItemPictureImageFilename(this._item);
  464.   return filename !== '';
  465. };
  466.  
  467. Window_ShopInfo.prototype.readyItemPictureImage = function(item) {
  468.   if (item !== this._item) return;
  469.   var bitmap = ItemManager.getItemPictureImage(item);
  470.   if (bitmap.width <= 0) {
  471.     return setTimeout(this.readyItemPictureImage.bind(this, item), 250);
  472.   } else {
  473.     this.drawItemPictureImage(bitmap);
  474.   }
  475. };
  476.  
  477. Window_ShopInfo.prototype.drawItemPictureImage = function(bitmap) {
  478.   var pw = bitmap.width;
  479.   var ph = bitmap.height;
  480.   var sx = 0;
  481.   var sy = 0;
  482.   var dw = pw;
  483.   var dh = ph;
  484.   if (dw > Yanfly.Param.ItemImageMaxWidth) {
  485.     var rate = Yanfly.Param.ItemImageMaxWidth / dw;
  486.     dw = Math.floor(dw * rate);
  487.     dh = Math.floor(dh * rate);
  488.   }
  489.   if (dh > Yanfly.Param.ItemImageMaxHeight) {
  490.     var rate = Yanfly.Param.ItemImageMaxHeight / dh;
  491.     dw = Math.floor(dw * rate);
  492.     dh = Math.floor(dh * rate);
  493.   }
  494.   var dx = (Window_Base._faceWidth - dw) / 2;
  495.   var dy = (Window_Base._faceHeight - dh) / 2;
  496.   this.contents.blt(bitmap, sx, sy, pw, ph, dx, dy, dw, dh);
  497. };
  498.  
  499. }; // Imported.YEP_X_ItemPictureImg
  500.  
  501. Window_ShopInfo.prototype.drawLargeIcon = function() {
  502.     var iconIndex = this._item.iconIndex;
  503.     var bitmap = ImageManager.loadSystem('IconSet');
  504.     var pw = Window_Base._iconWidth;
  505.     var ph = Window_Base._iconHeight;
  506.     var sx = iconIndex % 16 * pw;
  507.     var sy = Math.floor(iconIndex / 16) * ph;
  508.     var dw = Yanfly.Param.ItemIconSize;
  509.     var dh = Yanfly.Param.ItemIconSize;
  510.     var dx = (Window_Base._faceWidth - dw) / 2;
  511.     var dy = (Window_Base._faceHeight - dh) / 2;
  512.     this.contents._context.imageSmoothingEnabled = false;
  513.     this.contents.blt(bitmap, sx, sy, pw, ph, dx, dy, dw, dh);
  514.     this.contents._context.imageSmoothingEnabled = true;
  515. };
  516.  
  517. Window_ShopInfo.prototype.drawEquipInfo = function(item) {
  518.     var rect = new Rectangle();
  519.     if (eval(Yanfly.Param.ItemShowIcon)) {
  520.       rect.width = (this.contents.width - Window_Base._faceWidth) / 2;
  521.     } else {
  522.       rect.width = this.contents.width / 2;
  523.     }
  524.     for (var i = 0; i < 8; ++i) {
  525.       rect = this.getRectPosition(rect, i);
  526.       var dx = rect.x + this.textPadding();
  527.       var dw = rect.width - this.textPadding() * 2;
  528.       this.changeTextColor(this.systemColor());
  529.       this.drawText(TextManager.param(i), dx, rect.y, dw);
  530.       this.changeTextColor(this.paramchangeTextColor(item.params[i]));
  531.       var text = Yanfly.Util.toGroup(item.params[i]);
  532.       if (item.params[i] >= 0) text = '+' + text;
  533.       if (text === '+0') this.changePaintOpacity(false);
  534.       this.drawText(text, dx, rect.y, dw, 'right');
  535.       this.changePaintOpacity(true);
  536.     }
  537. };
  538.  
  539. Window_ShopInfo.prototype.drawItemInfo = function(item) {
  540.     var rect = new Rectangle();
  541.     if (eval(Yanfly.Param.ItemShowIcon)) {
  542.       rect.width = (this.contents.width - Window_Base._faceWidth) / 2;
  543.     } else {
  544.       rect.width = this.contents.width / 2;
  545.     }
  546.     for (var i = 0; i < 8; ++i) {
  547.       rect = this.getRectPosition(rect, i);
  548.       var dx = rect.x + this.textPadding();
  549.       var dw = rect.width - this.textPadding() * 2;
  550.       this.changeTextColor(this.systemColor());
  551.       var text = this.getItemInfoCategory(i);
  552.       this.drawText(text, dx, rect.y, dw);
  553.       this.drawItemData(i, dx, rect.y, dw);
  554.     }
  555. };
  556.  
  557. Window_ShopInfo.prototype.getItemInfoCategory = function(i) {
  558.     var fmt = Yanfly.Param.ItemRecoverFmt;
  559.     if (i === 0) return fmt.format(TextManager.param(0));
  560.     if (i === 1) return fmt.format(TextManager.hp);
  561.     if (i === 2) return fmt.format(TextManager.param(1));
  562.     if (i === 3) return fmt.format(TextManager.mp);
  563.     if (i === 4) return Yanfly.Param.ItemAddState;
  564.     if (i === 5) return Yanfly.Param.ItemRemoveState;
  565.     if (i === 6) return Yanfly.Param.ItemAddBuff;
  566.     if (i === 7) return Yanfly.Param.ItemRemoveBuff;
  567.     return '';
  568. };
  569.  
  570. Window_ShopInfo.prototype.drawItemData = function(i, dx, dy, dw) {
  571.     if (!this._item) return;
  572.     var effect;
  573.     var value = '---';
  574.     var pre = '';
  575.     var text = '';
  576.     var icons = [];
  577.     if (i === 0) {
  578.       effect = this.getEffect(Game_Action.EFFECT_RECOVER_HP);
  579.       value = (effect) ? effect.value1 : '---';
  580.       if (value === 0) value = '---';
  581.       if (value !== '---' && value !== 0) value *= 100;
  582.     }
  583.     if (i === 1) {
  584.       effect = this.getEffect(Game_Action.EFFECT_RECOVER_HP);
  585.       value = (effect) ? effect.value2 : '---';
  586.       if (value === 0) value = '---';
  587.     }
  588.     if (i === 2) {
  589.       effect = this.getEffect(Game_Action.EFFECT_RECOVER_MP);
  590.       value = (effect) ? effect.value1 : '---';
  591.       if (value === 0) value = '---';
  592.       if (value !== '---' && value !== 0) value *= 100;
  593.     }
  594.     if (i === 3) {
  595.       effect = this.getEffect(Game_Action.EFFECT_RECOVER_MP);
  596.       value = (effect) ? effect.value2 : '---';
  597.       if (value === 0) value = '---';
  598.     }
  599.     if (i >= 4) {
  600.       icons = this.getItemIcons(i, icons);
  601.     }
  602.     this.changeTextColor(this.normalColor());
  603.     if (value === '---') {
  604.       this.changePaintOpacity(false);
  605.     } else if (i < 4) {
  606.       if (value > 0) pre = '+';
  607.       value = Yanfly.Util.toGroup(parseInt(value));
  608.       if ([0, 2].contains(i)) text = '%';
  609.     }
  610.     if (icons.length > 0) {
  611.       this.changePaintOpacity(true);
  612.       dx = dx + dw - icons.length * Window_Base._iconWidth;
  613.       dx += this.textPadding() - 2;
  614.       for (var j = 0; j < icons.length; ++j) {
  615.         var icon = icons[j];
  616.         this.drawIcon(icon, dx, dy + 2);
  617.         dx += Window_Base._iconWidth;
  618.       }
  619.     } else {
  620.       text = pre + value + text;
  621.       this.drawText(text, dx, dy, dw, 'right');
  622.       this.changePaintOpacity(true);
  623.     }
  624. };
  625.  
  626. Window_ShopInfo.prototype.getEffect = function(code) {
  627.     var targetEffect;
  628.     this._item.effects.forEach(function(effect) {
  629.       if (effect.code === code) targetEffect = effect;
  630.     }, this);
  631.     return targetEffect;
  632. };
  633.  
  634. Window_ShopInfo.prototype.getItemIcons = function(i, array) {
  635.     this._item.effects.forEach(function(effect) {
  636.       if (i === 4 && effect.code === Game_Action.EFFECT_ADD_STATE) {
  637.         var state = $dataStates[effect.dataId];
  638.         if (state && state.iconIndex !== 0) array.push(state.iconIndex);
  639.       }
  640.       if (i === 5 && effect.code === Game_Action.EFFECT_REMOVE_STATE) {
  641.         var state = $dataStates[effect.dataId];
  642.         if (state && state.iconIndex !== 0) array.push(state.iconIndex);
  643.       }
  644.       if (i === 6 && effect.code === Game_Action.EFFECT_ADD_BUFF) {
  645.         var icon = Game_BattlerBase.ICON_BUFF_START + effect.dataId;
  646.         array.push(icon);
  647.       }
  648.       if (i === 6 && effect.code === Game_Action.EFFECT_ADD_DEBUFF) {
  649.         var icon = Game_BattlerBase.ICON_DEBUFF_START + effect.dataId;
  650.         array.push(icon);
  651.       }
  652.       if (i === 7 && effect.code === Game_Action.EFFECT_REMOVE_BUFF) {
  653.         var icon = Game_BattlerBase.ICON_BUFF_START + effect.dataId;
  654.         array.push(icon);
  655.       }
  656.       if (i === 7 && effect.code === Game_Action.EFFECT_REMOVE_DEBUFF) {
  657.         var icon = Game_BattlerBase.ICON_DEBUFF_START + effect.dataId;
  658.         array.push(icon);
  659.       }
  660.     }, this);
  661.     array = array.slice(0, Yanfly.Param.ItemMaxIcons);
  662.     return array;
  663. };
  664.  
  665. //=============================================================================
  666. // Window_ShopNumber
  667. //=============================================================================
  668.  
  669. Window_ShopNumber.prototype.windowWidth = function() {
  670.     return Math.ceil(eval(Yanfly.Param.ShopListWidth));
  671. };
  672.  
  673. Window_ShopNumber.prototype.refresh = function() {
  674.     this.contents.clear();
  675.     this._index = 0;
  676.     this.resetFontSettings();
  677.     this.drawItemName(this._item, 0, this.lineHeight(), this.contents.width);
  678.     this.drawMultiplicationSign();
  679.     this.drawNumber();
  680.     this.drawTotalPrice();
  681. };
  682.  
  683. Window_ShopNumber.prototype.itemY = function() {
  684.     return this.lineHeight() * 2;
  685. };
  686.  
  687. Window_ShopNumber.prototype.drawTotalPrice = function() {
  688.     var ww = this.contents.width - this.textPadding();
  689.     var wy = this.itemY();
  690.     this.drawHorzLine(this.lineHeight() * 3);
  691.     this.drawTotalCurrency(ww, wy + this.lineHeight() * 1);
  692.     this.drawTotalCost(ww, wy + this.lineHeight() * 2);
  693.     this.drawHorzLine(wy + this.lineHeight() * 3);
  694.     this.drawTotalAfter(ww, wy + this.lineHeight() * 3);
  695. };
  696.  
  697. Window_ShopNumber.prototype.drawTotalCurrency = function(ww, wy) {
  698.     var value = Yanfly.Util.toGroup(this.getTotalCurrency());
  699.     this.drawCurrencyValue(value, this._currencyUnit, 0, wy, ww);
  700. };
  701.  
  702. Window_ShopNumber.prototype.getTotalCurrency = function() {
  703.     if (this._currencyUnit === TextManager.currencyUnit) {
  704.       return $gameParty.gold();
  705.     }
  706.     return 0;
  707. };
  708.  
  709. Window_ShopNumber.prototype.drawTotalCost = function(ww, wy) {
  710.     var value = this._price * this._number;
  711.     if (!this.isSelling()) value *= -1;
  712.     value = Yanfly.Util.toGroup(value);
  713.     if (this.isSelling()) value = '+' + value;
  714.     this.drawCurrencyValue(value, this._currencyUnit, 0, wy, ww);
  715. };
  716.  
  717. Window_ShopNumber.prototype.drawHorzLine = function(y) {
  718.   this.contents.paintOpacity = 128;
  719.   this.contents.fillRect(0, y, this.contentsWidth(), 2, this.normalColor());
  720.   this.contents.paintOpacity = 255;
  721. };
  722.  
  723. Window_ShopNumber.prototype.drawTotalAfter = function(ww, wy) {
  724.     var value = this.getTotalCurrency();
  725.     value += (this._price * this._number) * (!this.isSelling() ? -1 : 1);
  726.     value = Yanfly.Util.toGroup(value);
  727.     this.drawCurrencyValue(value, this._currencyUnit, 0, wy, ww);
  728. };
  729.  
  730. Window_ShopNumber.prototype.isSelling = function() {
  731.     var scene = SceneManager._scene;
  732.     return scene.isSelling();
  733. };
  734.  
  735. Window_ShopNumber.prototype.cursorWidth = function() {
  736.     this.resetFontSettings();
  737.     var item = this._item
  738.     if (this._item && this._item.proxyBuy) {
  739.       var id = this._item.proxyBuy;
  740.       if (DataManager.isItem(this._item)) item = $dataItems[id];
  741.       if (DataManager.isWeapon(this._item)) item = $dataWeapons[id];
  742.       if (DataManager.isArmor(this._item)) item = $dataArmors[id];
  743.     }
  744.     var value = $gameParty.maxItems(item);
  745.     var digitWidth = this.textWidth(Yanfly.Util.toGroup(value));
  746.     return digitWidth + this.textPadding() * 2;
  747. };
  748.  
  749. //=============================================================================
  750. // Window_ShowBuy
  751. //=============================================================================
  752.  
  753. Window_ShopBuy.prototype.windowWidth = function() {
  754.     return Math.ceil(eval(Yanfly.Param.ShopListWidth));
  755. };
  756.  
  757. Window_ShopBuy.prototype.setInfoWindow = function(infoWindow) {
  758.     this._infoWindow = infoWindow;
  759.     this.callUpdateHelp();
  760. };
  761.  
  762. Yanfly.Shop.Window_ShopBuy_updateHelp = Window_ShopBuy.prototype.updateHelp;
  763. Window_ShopBuy.prototype.updateHelp = function() {
  764.     Yanfly.Shop.Window_ShopBuy_updateHelp.call(this);
  765.     if (this._infoWindow) this._infoWindow.setItem(this.item());
  766. };
  767.  
  768. //=============================================================================
  769. // Window_ShopCategory
  770. //=============================================================================
  771.  
  772. function Window_ShopCategory() {
  773.     this.initialize.apply(this, arguments);
  774. }
  775.  
  776. Window_ShopCategory.prototype = Object.create(Window_ItemCategory.prototype);
  777. Window_ShopCategory.prototype.constructor = Window_ShopCategory;
  778.  
  779. Window_ShopCategory.prototype.initialize = function() {
  780.     Window_ItemCategory.prototype.initialize.call(this);
  781. };
  782.  
  783. Window_ShopCategory.prototype.windowWidth = function() {
  784.     return 240;
  785. };
  786.  
  787. Window_ShopCategory.prototype.numVisibleRows = function() {
  788.     return 4;
  789. };
  790.  
  791. Window_ShopCategory.prototype.maxCols = function() {
  792.     return 1;
  793. };
  794.  
  795. Window_ShopCategory.prototype.itemTextAlign = function() {
  796.     return Yanfly.Param.ShopCommandAlign;
  797. };
  798.  
  799. //=============================================================================
  800. // Window_ShopBuy
  801. //=============================================================================
  802.  
  803. Window_ShopBuy.prototype.drawItem = function(index) {
  804.     var item = this._data[index];
  805.     var rect = this.itemRect(index);
  806.     rect.width -= this.textPadding();
  807.     this.changePaintOpacity(this.isEnabled(item));
  808.     this.drawBuyItem(item, rect);
  809.     this.drawBuyPrice(item, rect);
  810.     this.changePaintOpacity(true);
  811.     this.resetFontSettings();
  812. };
  813.  
  814. Window_ShopBuy.prototype.drawBuyItem = function(item, rect) {
  815.     this.drawItemName(item, rect.x, rect.y, rect.width);
  816. };
  817.  
  818. Window_ShopBuy.prototype.drawBuyPrice = function(item, rect) {
  819.     if (Imported.YEP_CoreEngine) {
  820.       this.contents.fontSize = Yanfly.Param.GoldFontSize;
  821.     }
  822.     var itemPrice = Yanfly.Util.toGroup(this.price(item));
  823.     this.drawCurrencyValue(itemPrice, this.currencyUnit(), rect.x, rect.y,
  824.         rect.width);
  825. };
  826.  
  827. Window_ShopBuy.prototype.currencyUnit = function() {
  828.     return TextManager.currencyUnit;
  829. };
  830.  
  831. //=============================================================================
  832. // Window_ShopSell
  833. //=============================================================================
  834.  
  835. Window_ShopSell.prototype.maxCols = function() {
  836.     return 1;
  837. };
  838.  
  839. Window_ShopSell.prototype.setInfoWindow = function(infoWindow) {
  840.     this._infoWindow = infoWindow;
  841.     this.callUpdateHelp();
  842. };
  843.  
  844. Window_ShopSell.prototype.setStatusWindow = function(statusWindow) {
  845.     this._statusWindow = statusWindow;
  846.     this.callUpdateHelp();
  847. };
  848.  
  849. Yanfly.Shop.Window_ShopSell_updateHelp = Window_ShopSell.prototype.updateHelp;
  850. Window_ShopSell.prototype.updateHelp = function() {
  851.     Yanfly.Shop.Window_ShopSell_updateHelp.call(this);
  852.     if (this._infoWindow) this._infoWindow.setItem(this.item());
  853.     if (this._statusWindow) this._statusWindow.setItem(this.item());
  854. };
  855.  
  856. Yanfly.Shop.Window_ShopSell_isEnabled = Window_ShopSell.prototype.isEnabled;
  857. Window_ShopSell.prototype.isEnabled = function(item) {
  858.     if (item) {
  859.       if ($gamePlayer.isDebugThrough()) return true;
  860.       if (item.cannotSell) return false;
  861.       if (item.canSell) return true;
  862.     }
  863.     return Yanfly.Shop.Window_ShopSell_isEnabled.call(this, item);
  864. };
  865.  
  866. //=============================================================================
  867. // Window_ShopStatus
  868. //=============================================================================
  869.  
  870. Yanfly.Shop.Window_ShopStatus_initialize =
  871.     Window_ShopStatus.prototype.initialize;
  872. Window_ShopStatus.prototype.initialize = function(x, y, width, height) {
  873.     Yanfly.Shop.Window_ShopStatus_initialize.call(this, x, y, width, height);
  874.     if (Yanfly.Param.ShopStatSwitch) this._paramId = 2;
  875.     this._displayMode = Yanfly.Param.ShopDefaultMode;
  876.     this._actorIndex = 0;
  877.     this._maxActorIndex = $gameParty.members().length - 1;
  878.     this._clickZoneX = this.textWidth('<<') + this.standardPadding();
  879.     this._clickZoneY = this.standardPadding() + this.lineHeight() * 2;
  880. };
  881.  
  882. Window_ShopStatus.prototype.displayMode = function() {
  883.     return this._displayMode;
  884. };
  885.  
  886. Window_ShopStatus.prototype.setDisplayMode = function(mode) {
  887.     this._displayMode = mode;
  888. };
  889.  
  890. Window_ShopStatus.prototype.isDefaultMode = function() {
  891.     return this.displayMode() === 'default';
  892. };
  893.  
  894. Window_ShopStatus.prototype.isActorMode = function() {
  895.     return this.displayMode() === 'actor';
  896. };
  897.  
  898. Window_ShopStatus.prototype.refresh = function() {
  899.     this.contents.clear();
  900.     if (!this._item) return;
  901.     this.resetTextColor();
  902.     this.resetFontSettings();
  903.     var x = this.textPadding();
  904.     this.drawPossession(x, 0);
  905.     if (!this.isEquipItem()) return;
  906.     this.resetTextColor();
  907.     this.resetFontSettings();
  908.     if (this.isDefaultMode()) this.drawDefaultData();
  909.     if (this.isActorMode()) this.drawActorData();
  910. };
  911.  
  912. Window_ShopStatus.prototype.drawDefaultData = function() {
  913.     this.drawStatDisplayed();
  914.     this.drawEquipInfo(this.textPadding(), this.lineHeight() * 2);
  915. };
  916.  
  917. Window_ShopStatus.prototype.drawStatDisplayed = function() {
  918.     var paramId = this.paramId();
  919.     var text = TextManager.param(paramId);
  920.     this.changeTextColor(this.normalColor());
  921.     this.drawText(text, 0, this.lineHeight(), this.contents.width, 'center');
  922.     if (!Yanfly.Param.ShopStatSwitch) return;
  923.     this.changeTextColor(this.systemColor());
  924.     var text = '<<';
  925.     this.drawText(text, 0, this.lineHeight(), this.contents.width, 'left');
  926.     var text = '>>';
  927.     this.drawText(text, 0, this.lineHeight(), this.contents.width, 'right');
  928. };
  929.  
  930. Window_ShopStatus.prototype.drawActorData = function() {
  931.     var actor = this.getActor();
  932.     this.drawActorDisplayed(actor);
  933.     this.drawDarkRectEntries();
  934.     this.drawActorStatInfo(actor);
  935. };
  936.  
  937. Window_ShopStatus.prototype.getActor = function() {
  938.     return $gameParty.members()[this._actorIndex];
  939. };
  940.  
  941. Window_ShopStatus.prototype.drawActorDisplayed = function(actor) {
  942.     var text = actor.name();
  943.     this.changeTextColor(this.normalColor());
  944.     this.drawText(text, 0, this.lineHeight(), this.contents.width, 'center');
  945.     this.changeTextColor(this.systemColor());
  946.     var text = '<<';
  947.     this.drawText(text, 0, this.lineHeight(), this.contents.width, 'left');
  948.     var text = '>>';
  949.     this.drawText(text, 0, this.lineHeight(), this.contents.width, 'right');
  950. };
  951.  
  952. Window_ShopStatus.prototype.drawDarkRectEntries = function() {
  953.     for (var i = 0; i < 8; ++i) {
  954.       var rect = this.getRectPosition(i);
  955.       this.drawDarkRect(rect.x, rect.y, rect.width, rect.height);
  956.     }
  957. };
  958.  
  959. Window_ShopStatus.prototype.getRectPosition = function(index) {
  960.     var rect = new Rectangle();
  961.     rect.width = Math.floor(this.contents.width / 2);
  962.     rect.height = this.lineHeight();
  963.     rect.x = index % 2 === 0 ? 0 : rect.width;
  964.     rect.y = Math.floor(index / 2) * this.lineHeight() + this.lineHeight() * 2;
  965.     return rect;
  966. };
  967.  
  968. Window_ShopStatus.prototype.drawDarkRect = function(dx, dy, dw, dh) {
  969.     var color = this.gaugeBackColor();
  970.     this.changePaintOpacity(false);
  971.     this.contents.fillRect(dx + 1, dy + 1, dw - 2, dh - 2, color);
  972.     this.changePaintOpacity(true);
  973. };
  974.  
  975. Window_ShopStatus.prototype.drawActorStatInfo = function(actor) {
  976.     this.contents.fontSize = Yanfly.Param.ShopStatFontSize;
  977.     var item1 = this.currentEquippedItem(actor, this._item.etypeId);
  978.     var canEquip = actor.canEquip(this._item);
  979.     for (var i = 0; i < 8; ++i) {
  980.       this.changePaintOpacity(true);
  981.       var rect = this.getRectPosition(i);
  982.       rect.x += this.textPadding();
  983.       rect.width -= this.textPadding() * 2;
  984.       this.changeTextColor(this.systemColor());
  985.       var text = TextManager.param(i);
  986.       this.drawText(text, rect.x, rect.y, rect.width);
  987.       if (!canEquip) this.drawActorCantEquip(actor, rect);
  988.       if (canEquip) this.drawActorChange(actor, rect, item1, i);
  989.     }
  990.     this.changePaintOpacity(true);
  991. };
  992.  
  993. Window_ShopStatus.prototype.drawActorCantEquip = function(actor, rect) {
  994.     this.changePaintOpacity(false);
  995.     this.resetTextColor();
  996.     this.contents.fontSize = Yanfly.Param.ShopCantSize;
  997.     var text = '-';
  998.     this.drawText(text, rect.x, rect.y, rect.width, 'right');
  999. };
  1000.  
  1001. Window_ShopStatus.prototype.drawActorChange = function(actor, rect, item1, i) {
  1002.     var change = this._item.params[i]
  1003.     change -= (item1 ? item1.params[i] : 0);
  1004.     this.changePaintOpacity(change !== 0);
  1005.     this.changeTextColor(this.paramchangeTextColor(change));
  1006.     var text = (change > 0 ? '+' : '') + Yanfly.Util.toGroup(change);
  1007.     this.drawText(text, rect.x, rect.y, rect.width, 'right');
  1008. };
  1009.  
  1010. Window_ShopStatus.prototype.drawEquipInfo = function(x, y) {
  1011.     var members = this.statusMembers();
  1012.     for (var i = 0; i < members.length; i++) {
  1013.       var wy = y;
  1014.       wy += i * this.lineHeight();
  1015.       this.drawActorEquipInfo(x, wy, members[i]);
  1016.     }
  1017. };
  1018.  
  1019. Window_ShopStatus.prototype.drawActorEquipInfo = function(x, y, actor) {
  1020.     var enabled = actor.canEquip(this._item);
  1021.     this.changePaintOpacity(enabled);
  1022.     this.resetTextColor();
  1023.     this.resetFontSettings();
  1024.     this.drawText(actor.name(), x, y, this.contents.width - x);
  1025.     var item1 = this.currentEquippedItem(actor, this._item.etypeId);
  1026.     if (enabled) {
  1027.       this.contents.fontSize = Yanfly.Param.ShopStatFontSize;
  1028.       this.drawActorParamChange(x, y, actor, item1);
  1029.     } else {
  1030.       this.contents.fontSize = Yanfly.Param.ShopCantSize;
  1031.       var ww = this.contents.width - this.textPadding();
  1032.       this.drawText(Yanfly.Param.ShopCantEquip, x, y, ww, 'right');
  1033.     }
  1034.     this.changePaintOpacity(true);
  1035. };
  1036.  
  1037. Window_ShopStatus.prototype.drawActorParamChange =
  1038. function(x, y, actor, item1) {
  1039.     var width = this.contents.width - this.textPadding() - x;
  1040.     var paramId = this.paramId();
  1041.     var change = this._item.params[paramId]
  1042.     change -= (item1 ? item1.params[paramId] : 0);
  1043.     this.changeTextColor(this.paramchangeTextColor(change));
  1044.     var text = (change > 0 ? '+' : '') + Yanfly.Util.toGroup(change);
  1045.     this.drawText(text, x, y, width, 'right');
  1046. };
  1047.  
  1048. Yanfly.Shop.Window_ShopStatus_update = Window_ShopStatus.prototype.update;
  1049. Window_ShopStatus.prototype.update = function() {
  1050.     Yanfly.Shop.Window_ShopStatus_update.call(this);
  1051.     if (this.isUpdateTrigger()) this.updateParamSwitch();
  1052. };
  1053.  
  1054. Window_ShopStatus.prototype.isUpdateTrigger = function() {
  1055.     if (this.isDefaultMode() && Yanfly.Param.ShopStatSwitch) return true;
  1056.     if (this.isActorMode()) return true;
  1057.     return false;
  1058. };
  1059.  
  1060. Window_ShopStatus.prototype.updateParamSwitch = function() {
  1061.     if (!this.isEquipItem()) return;
  1062.     if (this.isTouched(-1) || this.getInput('left')) {
  1063.       SoundManager.playCursor();
  1064.       this.adjustLeft();
  1065.       this.refresh();
  1066.     } else if (this.isTouched(1) || this.getInput('right')) {
  1067.       SoundManager.playCursor();
  1068.       this.adjustRight();
  1069.       this.refresh();
  1070.     } else if (Input.isRepeated('tab') || this.isTouched(0)) {
  1071.       SoundManager.playCursor();
  1072.       this.adjustMode();
  1073.       this.refresh();
  1074.     }
  1075. };
  1076.  
  1077. Window_ShopStatus.prototype.getInput = function(input) {
  1078.     if (SceneManager._scene._numberWindow.active) return false;
  1079.     return Input.isRepeated(input)
  1080. };
  1081.  
  1082. Window_ShopStatus.prototype.adjustLeft = function() {
  1083.     if (this.isDefaultMode()) {
  1084.       this._paramId -= 1;
  1085.       if (this._paramId < 0) this._paramId = 7;
  1086.     } else if (this.isActorMode()) {
  1087.       this._actorIndex -= 1;
  1088.       if (this._actorIndex < 0) this._actorIndex = this._maxActorIndex;
  1089.     }
  1090. };
  1091.  
  1092. Window_ShopStatus.prototype.adjustRight = function() {
  1093.     if (this.isDefaultMode()) {
  1094.       this._paramId += 1;
  1095.       if (this._paramId > 7) this._paramId = 0;
  1096.     } else if (this.isActorMode()) {
  1097.       this._actorIndex += 1;
  1098.       if (this._actorIndex > this._maxActorIndex) this._actorIndex = 0;
  1099.     }
  1100. };
  1101.  
  1102. Window_ShopStatus.prototype.adjustMode = function() {
  1103.     if (this.isDefaultMode()) {
  1104.       this.setDisplayMode('actor');
  1105.     } else if (this.isActorMode()) {
  1106.       this.setDisplayMode('default');
  1107.     }
  1108. };
  1109.  
  1110. Window_ShopStatus.prototype.isTouched = function(position) {
  1111.     if (!TouchInput.isTriggered()) return false;
  1112.     if (!this.isTouchedInsideFrame()) return false;
  1113.     var y = this.canvasToLocalY(TouchInput.y);
  1114.     if (y > this._clickZoneY) return false;
  1115.     var x = this.canvasToLocalX(TouchInput.x);
  1116.     if (position === -1 && x < this._clickZoneX) return true;
  1117.     if (position === 1 && x > this.width - this._clickZoneX) return true;
  1118.     if (position === 0) return true;
  1119.     return false;
  1120. };
  1121.  
  1122. Yanfly.Shop.Window_ShopStatus_paramId = Window_ShopStatus.prototype.paramId;
  1123. Window_ShopStatus.prototype.paramId = function() {
  1124.     if (Yanfly.Param.ShopStatSwitch) return this._paramId;
  1125.     return Yanfly.Shop.Window_ShopStatus_paramId.call(this);
  1126. };
  1127.  
  1128. Window_ShopStatus.prototype.isPageChangeRequested = function() {
  1129.     if (Input.isTriggered('shift')) return true;
  1130.     return false;
  1131. };
  1132.  
  1133. //=============================================================================
  1134. // Scene_Shop
  1135. //=============================================================================
  1136.  
  1137. Scene_Shop.prototype.failSafeGoods = function() {
  1138.   if (this._goods === undefined) {
  1139.     var goods = $gameTemp._shopGoods;
  1140.     var purchaseOnly = $gameTemp._shopPurchaseOnly;
  1141.     this.prepare(goods, purchaseOnly);
  1142.   }
  1143.   $gameTemp.clearShopGoods();
  1144. };
  1145.  
  1146. Scene_Shop.prototype.create = function() {
  1147.     Scene_MenuBase.prototype.create.call(this);
  1148.     this.failSafeGoods();
  1149.     this.createHelpWindow();
  1150.     this.createCommandWindow();
  1151.     this.createInfoWindow();
  1152.     this.createDummyWindow();
  1153.     this.createNumberWindow();
  1154.     this.createBuyWindow();
  1155.     this.createCategoryWindow();
  1156.     this.createSellWindow();
  1157.     this.createGoldWindow();
  1158.     this.createStatusWindow();
  1159.     this.createActorWindow();
  1160. };
  1161.  
  1162. Scene_Shop.prototype.createCommandWindow = function() {
  1163.     this._commandWindow = new Window_ShopCommand(0, this._purchaseOnly);
  1164.     this._commandWindow.y = this._helpWindow.height;
  1165.     this.addWindow(this._commandWindow);
  1166.     this.setCommandWindowHandlers();
  1167. };
  1168.  
  1169. Scene_Shop.prototype.setCommandWindowHandlers = function() {
  1170.     this._commandWindow.setHandler('buy',    this.commandBuy.bind(this));
  1171.     this._commandWindow.setHandler('sell',   this.commandSell.bind(this));
  1172.     this._commandWindow.setHandler('cancel', this.popScene.bind(this));
  1173.     this._commandWindow.setHandler('equip',  this.commandEquip.bind(this));
  1174. };
  1175.  
  1176. Scene_Shop.prototype.createInfoWindow = function() {
  1177.     var wx = this._commandWindow.width;
  1178.     var wy = this._commandWindow.y;
  1179.     var ww = Graphics.boxWidth - wx;
  1180.     var wh = this._commandWindow.height;
  1181.     this._infoWindow = new Window_ShopInfo(wx, wy, ww, wh);
  1182.     this.addWindow(this._infoWindow);
  1183. };
  1184.  
  1185. Scene_Shop.prototype.createDummyWindow = function() {
  1186.     var wy = this._commandWindow.y + this._commandWindow.height;
  1187.     var wh = Graphics.boxHeight - wy;
  1188.     var ww = Math.ceil(eval(Yanfly.Param.ShopListWidth));
  1189.     this._dummyWindow = new Window_Base(0, wy, ww, wh);
  1190.     this.addWindow(this._dummyWindow);
  1191. };
  1192.  
  1193. Scene_Shop.prototype.createBuyWindow = function() {
  1194.     var wy = this._dummyWindow.y;
  1195.     var wh = this._dummyWindow.height;
  1196.     this._buyWindow = new Window_ShopBuy(0, wy, wh, this._goods);
  1197.     this._buyWindow.setHelpWindow(this._helpWindow);
  1198.     this._buyWindow.setInfoWindow(this._infoWindow);
  1199.     this._buyWindow.hide();
  1200.     this._buyWindow.setHandler('ok',     this.onBuyOk.bind(this));
  1201.     this._buyWindow.setHandler('cancel', this.onBuyCancel.bind(this));
  1202.     this.addWindow(this._buyWindow);
  1203. };
  1204.  
  1205. Scene_Shop.prototype.createCategoryWindow = function() {
  1206.     this._categoryWindow = new Window_ShopCategory();
  1207.     this._categoryWindow.setHelpWindow(this._helpWindow);
  1208.     this._categoryWindow.y = this._commandWindow.y;
  1209.     this._categoryWindow.hide();
  1210.     this._categoryWindow.deactivate();
  1211.     this._categoryWindow.setHandler('ok',     this.onCategoryOk.bind(this));
  1212.     this._categoryWindow.setHandler('cancel', this.onCategoryCancel.bind(this));
  1213.     this.addWindow(this._categoryWindow);
  1214. };
  1215.  
  1216. Scene_Shop.prototype.createSellWindow = function() {
  1217.     var wy = this._dummyWindow.y;
  1218.     var ww = this._dummyWindow.width;
  1219.     var wh = this._dummyWindow.height;
  1220.     this._sellWindow = new Window_ShopSell(0, wy, ww, wh);
  1221.     this._sellWindow.setHelpWindow(this._helpWindow);
  1222.     this._sellWindow.hide();
  1223.     this._sellWindow.setInfoWindow(this._infoWindow);
  1224.     this._sellWindow.setHandler('ok',     this.onSellOk.bind(this));
  1225.     this._sellWindow.setHandler('cancel', this.onSellCancel.bind(this));
  1226.     this._categoryWindow.setItemWindow(this._sellWindow);
  1227.     this.addWindow(this._sellWindow);
  1228. };
  1229.  
  1230. Scene_Shop.prototype.createGoldWindow = function() {
  1231.     this._goldWindow = new Window_Gold(0, 0);
  1232.     this._goldWindow.x = this._buyWindow.width;
  1233.     this._goldWindow.y = Graphics.boxHeight - this._goldWindow.height;
  1234.     this._goldWindow.width = Graphics.boxWidth - this._goldWindow.x;
  1235.     this._goldWindow.createContents();
  1236.     this._goldWindow.refresh();
  1237.     this.addWindow(this._goldWindow);
  1238. };
  1239.  
  1240. Scene_Shop.prototype.createStatusWindow = function() {
  1241.     var wx = this._dummyWindow.width;
  1242.     var wy = this._dummyWindow.y;
  1243.     var ww = Graphics.boxWidth - wx;
  1244.     var wh = this._dummyWindow.height - this._goldWindow.height;
  1245.     this._statusWindow = new Window_ShopStatus(wx, wy, ww, wh);
  1246.     this.addWindow(this._statusWindow);
  1247.     this._buyWindow.setStatusWindow(this._statusWindow);
  1248.     this._sellWindow.setStatusWindow(this._statusWindow);
  1249. };
  1250.  
  1251. Yanfly.Shop.Scene_Shop_onBuyCancel = Scene_Shop.prototype.onBuyCancel;
  1252. Scene_Shop.prototype.onBuyCancel = function() {
  1253.     Yanfly.Shop.Scene_Shop_onBuyCancel.call(this);
  1254.     this._statusWindow.show();
  1255.     this._infoWindow.setItem(null);
  1256. };
  1257.  
  1258. Scene_Shop.prototype.doBuy = function(number) {
  1259.     if (Imported.YEP_ItemCore) $gameTemp.enableVarianceStock();
  1260.     this.doBuyGold(number);
  1261.     this.doBuyItem(number);
  1262.     if (Imported.YEP_ItemCore) $gameTemp.disableVarianceStock();
  1263. };
  1264.  
  1265. Scene_Shop.prototype.doBuyGold = function(number) {
  1266.     $gameParty.loseGold(number * this.buyingPrice());
  1267. };
  1268.  
  1269. Scene_Shop.prototype.doBuyItem = function(number) {
  1270.     $gameParty.gainItem(this._item, number);
  1271. };
  1272.  
  1273. Scene_Shop.prototype.doSell = function(number) {
  1274.     this.doSellGold(number);
  1275.     this.doSellItem(number);
  1276.     if (!Imported.YEP_ItemCore) return;
  1277.     if (!DataManager.isIndependent(this._item)) return;
  1278.     DataManager.removeIndependentItem(this._item);
  1279. };
  1280.  
  1281. Scene_Shop.prototype.doSellGold = function(number) {
  1282.     $gameParty.gainGold(number * this.sellingPrice());
  1283. };
  1284.  
  1285. Scene_Shop.prototype.doSellItem = function(number) {
  1286.     $gameParty.loseItem(this._item, number);
  1287. };
  1288.  
  1289. Yanfly.Shop.Scene_Shop_activateSellWindow =
  1290.     Scene_Shop.prototype.activateSellWindow;
  1291. Scene_Shop.prototype.activateSellWindow = function() {
  1292.     Yanfly.Shop.Scene_Shop_activateSellWindow.call(this);
  1293.     this._statusWindow.show();
  1294. };
  1295.  
  1296. Yanfly.Shop.Scene_Shop_onSellCancel = Scene_Shop.prototype.onSellCancel;
  1297. Scene_Shop.prototype.onSellCancel = function() {
  1298.     Yanfly.Shop.Scene_Shop_onSellCancel.call(this);
  1299.     this._infoWindow.setItem(null);
  1300. };
  1301.  
  1302. Scene_Shop.prototype.isSelling = function() {
  1303.     return this._commandWindow.currentSymbol() === 'sell';
  1304. };
  1305.  
  1306. Scene_Shop.prototype.createActorWindow = function() {
  1307.     this._actorWindow = new Window_MenuActor();
  1308.     this._actorWindow.setHandler('ok',     this.onActorOk.bind(this));
  1309.     this._actorWindow.setHandler('cancel', this.onActorCancel.bind(this));
  1310.     this.addWindow(this._actorWindow);
  1311. };
  1312.  
  1313. Scene_Shop.prototype.commandEquip = function() {  
  1314.     this._actorWindow.activate();
  1315.     this._actorWindow.show();
  1316.     this._actorWindow.select(0);
  1317. };
  1318.  
  1319. Scene_Shop.prototype.onActorOk = function() {
  1320.     this.onActorCommon();
  1321.     if (this._commandWindow.currentSymbol() === 'equip') {
  1322.       SceneManager.push(Scene_Equip);
  1323.     }
  1324. };
  1325.  
  1326. Scene_Shop.prototype.onActorCancel = function() {
  1327.     this._actorWindow.hide();
  1328.     this._actorWindow.deselect();
  1329.     this._commandWindow.activate();
  1330. };
  1331.  
  1332. Scene_Shop.prototype.onActorCommon = function() {
  1333.     $gameTemp.registerShopGoods();
  1334.     var index = this._actorWindow.index();
  1335.     var actor = $gameParty.members()[index];
  1336.     $gameParty.setMenuActor(actor);
  1337.     SoundManager.playOk();
  1338. };
  1339.  
  1340. Yanfly.Shop.Scene_Shop_sellingPrice = Scene_Shop.prototype.sellingPrice;
  1341. Scene_Shop.prototype.sellingPrice = function() {
  1342.     if (this._item && this._item.sellPrice !== undefined) {
  1343.       return this._item.sellPrice;
  1344.     }
  1345.     return Yanfly.Shop.Scene_Shop_sellingPrice.call(this);
  1346. };
  1347.  
  1348. //=============================================================================
  1349. // Utilities
  1350. //=============================================================================
  1351.  
  1352. Yanfly.Util = Yanfly.Util || {};
  1353.  
  1354. if (!Yanfly.Util.toGroup) {
  1355.     Yanfly.Util.toGroup = function(inVal) {
  1356.         return inVal;
  1357.     }
  1358. };
  1359.  
  1360. //=============================================================================
  1361. // End of File
  1362. //=============================================================================
h
头像被屏蔽

Lv4.逐梦者 (禁止发言)

梦石
0
星屑
18535
在线时间
27 小时
注册时间
2018-8-30
帖子
9
2
发表于 2018-8-30 18:14:41 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
3074
在线时间
685 小时
注册时间
2018-6-1
帖子
272
3
发表于 2018-8-30 18:16:31 | 只看该作者
关掉菜单的金钱窗口倒是很简单 直接注释掉
回复 支持 反对

使用道具 举报

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

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-22 23:51

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表