Advertisement
roninator2

Shop Scene Detail Stats

Nov 21st, 2024
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 43.00 KB | None | 0 0
  1. # ╔═══════════════════════════════════════════════╦════════════════════╗
  2. # ║ Title: Shop Scene Detail Stats                ║  Version: 1.00     ║
  3. # ║ Author: Roninator2                            ║                    ║
  4. # ╠═══════════════════════════════════════════════╬════════════════════╣
  5. # ║ Function:                                     ║   Date Created     ║
  6. # ║   Adjusts number window to show               ╠════════════════════╣
  7. # ║   equipment stats on two pages                ║    12 Feb 2021     ║
  8. # ╚═══════════════════════════════════════════════╩════════════════════╝
  9. # ╔════════════════════════════════════════════════════════════════════╗
  10. # ║ Requires: nil                                                      ║
  11. # ║                                                                    ║
  12. # ╚════════════════════════════════════════════════════════════════════╝
  13. # ╔════════════════════════════════════════════════════════════════════╗
  14. # ║ Brief Description:                                                 ║
  15. # ║       Show stats in shop for items                                 ║
  16. # ╚════════════════════════════════════════════════════════════════════╝
  17. # ╔════════════════════════════════════════════════════════════════════╗
  18. # ║ Instructions:                                                      ║
  19. # ║  Script provides the ability to see equipment stats,               ║
  20. # ║  for the item selected to purchase, before accepting.              ║
  21. # ║  Made to have two screens, can be adjusted to have only            ║
  22. # ║  one. Simply change the rows value.                                ║
  23. # ║  Default resolution allows 11 rows per screen                      ║
  24. # ║  So if you want to display lots of stats on your                   ║
  25. # ║  equipmnent, you can use 33 to get three pages.                    ║
  26. # ║  However all equipment will have three pages.                      ║
  27. # ╚════════════════════════════════════════════════════════════════════╝
  28. # ╔════════════════════════════════════════════════════════════════════╗
  29. # ║ Updates:                                                           ║
  30. # ║ 1.00 - 12 Feb 2021 - Script finished                               ║
  31. # ║                                                                    ║
  32. # ╚════════════════════════════════════════════════════════════════════╝
  33. # ╔════════════════════════════════════════════════════════════════════╗
  34. # ║ Credits and Thanks:                                                ║
  35. # ║   Roninator2                                                       ║
  36. # ║                                                                    ║
  37. # ╚════════════════════════════════════════════════════════════════════╝
  38. # ╔════════════════════════════════════════════════════════════════════╗
  39. # ║ Terms of use:                                                      ║
  40. # ║  Follow the original Authors terms of use where applicable         ║
  41. # ║    - When not made by me (Roninator2)                              ║
  42. # ║  Free for all uses in RPG Maker except nudity                      ║
  43. # ║  Anyone using this script in their project before these terms      ║
  44. # ║  were changed are allowed to use this script even if it conflicts  ║
  45. # ║  with these new terms. New terms effective 03 Apr 2024             ║
  46. # ║  No part of this code can be used with AI programs or tools        ║
  47. # ║  Credit must be given                                              ║
  48. # ╚════════════════════════════════════════════════════════════════════╝
  49.  
  50. module R2_SHOP_STATS
  51.  
  52.   # Determine the number of lines the number window will have
  53.   # Default of 22 provides two pages at default resolution
  54.   # Instruct players to press L or R ( Q & W ) to switch pages
  55.   ITEM_ROWS = 22 # adjust for data shown
  56.  
  57.   ITEMS_PER_PAGE = 11 # used to control the cursor
  58.   # specify how many rows are on a page. Only controls the cursor
  59.   # count how many rows show up.
  60.   #------------------------------------------------------------------------
  61.   # PURCHASE WINDOW OPTIONS
  62.   #------------------------------------------------------------------------
  63.  
  64.   # The following determines the text displayed at the amount selection
  65.   # screen. Change the information here accordingly.
  66.   PURCHASE = "L < Page     Purchase     Page > R"
  67.   # Title of purchasing information.
  68.   COST_ICN = 361                  # Icon of total cost.
  69.   COST_TXT = "Total Cost"         # Text for total cost.
  70.   ITEM_STAT = "Item Info"         # Text for item data.
  71.   WPN_STAT = "Weapon Info"        # Text for weapon data.
  72.   ARM_STAT = "Armour Info"        # Text for armour data.
  73.   FONTSIZE = 20 # Use 18 or 20    # Font size used for data text.
  74.   USE_SPACES = false               # Attempt to separate section
  75.  
  76.   # Draw stats for items?
  77.   ITEM_STATES = true              # Show item states applied
  78.   ITEM_BUFFS  = true              # Show item buffs added/removed
  79.   ITEM_STATS  = true              # Show item stat additions
  80.   ITEM_SKILL  = true              # Show skills learned from the item
  81.  
  82.   ITEM_STAT_HP_DAM = "HP Damage"  # Text for item stats
  83.   ITEM_STAT_MP_DAM = "MP Damage"  # Text for item stats
  84.   ITEM_STAT_HP_REC = "HP Recover" # Text for item stats
  85.   ITEM_STAT_MP_REC = "MP Recover" # Text for item stats
  86.   ITEM_STAT_HP_DRN = "HP Drain"   # Text for item stats
  87.   ITEM_STAT_MP_DRN = "MP Drain"   # Text for item stats
  88.  
  89.   ITEM_DAM_TYPE = "Damage Type"   # Text for item stats
  90.  
  91.   ITEM_ADD_BUFF   = "Add Buff"        # Text for item buffs
  92.   ITEM_ADD_DEBUFF = "Add Debuff"      # Text for item buffs
  93.   ITEM_RM_BUFF    = "Remove Buff"     # Text for item buffs
  94.   ITEM_RM_DEBUFF  = "Remove Debuff"   # Text for item buffs
  95.  
  96.   # text for when an item had effects that change the base stats
  97.   R2_SHOP_STATS::ITEM_STAT_TEXT = "Change Base Stats"
  98.  
  99.   # text for when an item adds skills to the player
  100.   R2_SHOP_STATS::ITEM_SKILL_ADD = "Skill(s) Learned"
  101.  
  102.   # text for when an equipment adds skills to the player
  103.   R2_SHOP_STATS::EQUIP_SKILL_ADD = "Skill(s) Learned"
  104.  
  105.   TEXT_ADD_STATES = "States Added"       # States added text
  106.   TEXT_RM_STATES  = "States Removed"     # States removed text
  107.   TEXT_SEAL_STATES  = "Skill(s) Sealed"  # States sealed text
  108.  
  109.   # This part defines the data used for item/equipment properties.
  110.   HP_HEAL_TEXT = "HP Effect"      # Text used for HP recovery.
  111.   HP_HEAL_ICON = 128              # Icon used for HP recovery.
  112.   MP_HEAL_TEXT = "MP Effect"      # Text used for MP recovery.
  113.   MP_HEAL_ICON = 202              # Icon used for MP recovery.
  114.   ERASE_STATE  = "Removes Status" # Text used for removing states.
  115.   APPLY_STATE  = "Applies Status" # Text used for applying states.
  116.   PARAM_BOOST  = "Raises %s"      # Text used for parameter raising.
  117.   SPELL_EFFECT = "Spell Effect"   # Text used for spell effect items.
  118.   SPELL_DAMAGE = "%d Base Dmg"    # Text used for spell damage.
  119.   SPELL_HEAL   = "%d Base Heal"   # Text used for spell healing.
  120.   NO_EQ_STAT   = "---"            # Text used when no equip
  121.   EQ_ELEMENT_W = "Apply Element"  # Text used to represent equip elements.
  122.   EQ_ELEMENT_A = "Guard Element"  # Text used to represent equip elements.
  123.   EQ_STATUS_W  = "Apply Status"   # Text used to represent equip states.
  124.   EQ_STATUS_A  = "Guard Status"   # Text used to represent equip states.
  125.   STATE_RESIST = "State Resist"   # Text used to represent resist states.
  126.  
  127.   STATS_TEXT = "Item Parameters"
  128.   # These are the general icons and text used for various aspects of new
  129.   # shop windows. Used for items and equips alike.
  130.   ICON_HP  = 32           # Icon for MAXHP
  131.   ICON_MP  = 33           # Icon for MAXMP
  132.   ICON_ATK = 34           # Icon for ATK
  133.   ICON_DEF = 35           # Icon for DEF
  134.   ICON_MAT = 36           # Icon for SPI
  135.   ICON_MDF = 37           # Icon for AGI
  136.   ICON_AGI = 38           # Icon for HIT
  137.   ICON_LUK = 39           # Icon for EVA
  138.  
  139.   TEXT_HP  = "HP"         # Text for HP
  140.   TEXT_MP  = "MP"         # Text for MP
  141.   TEXT_TP  = "TP"         # Text for TP
  142.   ICON_TP  = 33           # Icon for TP
  143.  
  144.   # set to true to show ex paramaters in number window
  145.   SHOW_EX_PARAM = true
  146.   EXSTATS_TEXT = "Extra Parameters"
  147.   SHOW_EXTEXT = true
  148.   ICON_HIT = 184          #
  149.   TEXT_HIT = "HIT"        #
  150.   ICON_EVA = 185          #
  151.   TEXT_EVA = "EVA"        #
  152.   ICON_CRI = 186          #
  153.   TEXT_CRI = "CRI"        #
  154.   ICON_CEV = 187          #
  155.   TEXT_CEV = "CEV"        #
  156.   ICON_MEV = 188          #
  157.   TEXT_MEV = "MEV"        #
  158.   ICON_MRF = 189          #
  159.   TEXT_MRF = "MRF"        #
  160.   ICON_CNT = 190          #
  161.   TEXT_CNT = "CNT"        #
  162.   ICON_HRG = 191          #
  163.   TEXT_HRG = "HRG"        #
  164.   ICON_MRG = 192          #
  165.   TEXT_MRG = "MRG"        #
  166.   ICON_TRG = 193          #
  167.   TEXT_TRG = "TRG"        #
  168.  
  169.   # set to true to show sp paramaters in number window
  170.   SHOW_SP_PARAM = true
  171.   SPSTATS_TEXT = "Special Parameters"
  172.   SHOW_SPTEXT = true
  173.   ICON_TGR = 368          #
  174.   TEXT_TGR = "TGR"        #
  175.   ICON_GRD = 369          #
  176.   TEXT_GRD = "GRD"        #
  177.   ICON_REC = 370          #
  178.   TEXT_REC = "REC"        #
  179.   ICON_PHA = 371          #
  180.   TEXT_PHA = "PHA"        #
  181.   ICON_MCR = 372          #
  182.   TEXT_MCR = "MCR"        #
  183.   ICON_TCR = 373          #
  184.   TEXT_TCR = "TCR"        #
  185.   ICON_PDR = 374          #
  186.   TEXT_PDR = "PDR"        #
  187.   ICON_MDR = 375          #
  188.   TEXT_MDR = "MDR"        #
  189.   ICON_FDR = 376          #
  190.   TEXT_FDR = "FDR"        #
  191.   ICON_EXR = 377          #
  192.   TEXT_EXR = "EXR"        #
  193.  
  194.   # The following determines which elements can be shown in the elements
  195.   # list. If an element is not included here, it is ignored.
  196.   DRAW_ELEMENTS = true
  197.   SHOWN_ELEMENTS ={
  198.   # Element ID => Icon ID
  199.         1 => 11,
  200.         2 => 16,
  201.         3 => 96,
  202.         4 => 97,
  203.         5 => 98,
  204.         6 => 99,
  205.         7 => 100,
  206.         8 => 101,
  207.         9 => 102,
  208.         10 => 103,
  209.     } # Do not remove this.
  210.  
  211.   DRAW_STATES = true # Draw states applied to the weapon or armour
  212.   EQUIP_SKILL = true # Show skills learned from weapon or armour
  213.   EQUIP_SKILL_SEAL = true # Show skills sealed from weapon or armour
  214.   EQUIP_DEBUFF = true # Show Debuff Rates
  215.  
  216.   # Text for stating a debuff rate is applied
  217.   EQUIP_DEBUFF_TEXT = "Debuff Rate"
  218.  
  219.   EQUIP_ATTACK_STATE = true # Show attack states
  220.   # Text for stating attack states are applied
  221.   # Be sure no not have more than 3, otherwise the script will need changing
  222.   EQUIP_ATTACK_STATE_TEXT = "Attack state(s)"
  223.  
  224.   EQUIP_ATTACK_SPEED = true # Show attack speed for item
  225.   # Text for showing attack speed
  226.   EQUIP_ATTACK_SPEED_TEXT = "Attack Speed"
  227.  
  228.   EQUIP_ATTACK_TIMES = true # Show attack times for item
  229.   # Text for showing attack times value
  230.   EQUIP_ATTACK_TIMES_TEXT = "Attack Times"
  231.  
  232.   EQUIP_ACTION_TIMES = true # Show action times for item
  233.   # Text for showing action times
  234.   EQUIP_ACTION_TIMES_TEXT = "Action Times"
  235.  
  236.   EQUIP_PARTY_ABILITY = true # Show if party gains an ability from item
  237.  
  238. end
  239.  
  240. # ╔════════════════════════════════════════════════════════════════════╗
  241. # ║                      End of editable region                        ║
  242. # ╚════════════════════════════════════════════════════════════════════╝
  243.  
  244. class Scene_Shop < Scene_MenuBase
  245.   alias r2_on_number_cancel_number_stats   on_number_cancel
  246.   def on_number_cancel
  247.     @number_window.num_reset
  248.     @number_window.cursor_pageup
  249.     r2_on_number_cancel_number_stats
  250.   end
  251. end
  252.  
  253. #===============================================================================
  254. # Window_ShopNumber
  255. #===============================================================================
  256.  
  257. class Window_ShopNumber < Window_Selectable
  258.  
  259.   alias r2_shop_number_stat_init  initialize
  260.   def initialize(x, y, height)
  261.     @num_page = 0
  262.     r2_shop_number_stat_init(x, y, height)
  263.   end
  264.  
  265.   #--------------------------------------------------------------------------
  266.   # overwrite refresh
  267.   #--------------------------------------------------------------------------
  268.   def refresh
  269.     dy = 0
  270.     sw = self.width - 32
  271.     contents.clear
  272.     change_color(system_color)
  273.     contents.font.size = Font.default_size
  274.     draw_text(-10, dy, 300, 24, R2_SHOP_STATS::PURCHASE, 1)
  275.     dy += 24
  276.     change_color(normal_color)
  277.     draw_item_name(@item, 0, dy)
  278.     draw_text(212, dy, 20, 24, "×")
  279.     draw_text(218, dy, 50, 24, @number, 2)
  280.     cursor_rect.set(207, dy, 64, 24)
  281.     dy += 24
  282.     draw_icon(R2_SHOP_STATS::COST_ICN, 0, dy)
  283.     draw_text(24, dy, sw-24, 24, R2_SHOP_STATS::COST_TXT)
  284.     draw_currency_value(@price * @number, @currency_unit, 4, dy, 264)
  285.     dy += 24
  286.     if @item.is_a?(RPG::Item)
  287.       draw_text(0, dy, sw-24, 24, R2_SHOP_STATS::ITEM_STAT, 1)
  288.       draw_item_stats(dy, sw)
  289.     elsif @item.is_a?(RPG::Weapon)
  290.       draw_text(0, dy, sw-24, 24, R2_SHOP_STATS::WPN_STAT, 1)
  291.       draw_equip_stats(dy, sw)
  292.     else
  293.       draw_text(0, dy, sw-24, 24, R2_SHOP_STATS::ARM_STAT, 1)
  294.       draw_equip_stats(dy, sw)
  295.     end
  296.   end
  297.  
  298.   def num_reset
  299.     @num_page = 0
  300.   end
  301.  
  302.   #--------------------------------------------------------------------------
  303.   # overwrite cursor rect - set to size of purchase number
  304.   #--------------------------------------------------------------------------
  305.   def update_cursor
  306.     cursor_rect.set(207, 24, 64, 24)
  307.   end
  308.  
  309.   #--------------------------------------------------------------------------
  310.   # overwrite item row - change in module above
  311.   #--------------------------------------------------------------------------
  312.   def item_max
  313.     return R2_SHOP_STATS::ITEM_ROWS
  314.   end
  315.  
  316.   #--------------------------------------------------------------------------
  317.   # * Alias Cursor One Page Down - hides cursor
  318.   #--------------------------------------------------------------------------
  319.   alias r2_cursor_pagedown_hide cursor_pagedown
  320.   def cursor_pagedown
  321.     r2_cursor_pagedown_hide
  322.     @num_page = @num_page + 1
  323.     if @num_page > (R2_SHOP_STATS::ITEM_ROWS / R2_SHOP_STATS::ITEMS_PER_PAGE) - 1
  324.       @num_page = (R2_SHOP_STATS::ITEM_ROWS / R2_SHOP_STATS::ITEMS_PER_PAGE) - 1
  325.     end
  326.     cursor_rect.set(0, 0, 0, 0)
  327.   end
  328.   #--------------------------------------------------------------------------
  329.   # * Alias Cursor One Page Up - shows cursor
  330.   #--------------------------------------------------------------------------
  331.   def cursor_pageup
  332.     @num_page = @num_page - 1
  333.     if top_row > 0
  334.       self.top_row -= page_row_max
  335.       select([@index - page_item_max, 0].max) if @num_page == 0
  336.     end
  337.     @num_page = 0 if @num_page < 0
  338.     update_cursor if @num_page == 0
  339.   end
  340.  
  341. ##########################################################################
  342.   #--------------------------------------------------------------------------
  343.   # draw_item_stats
  344.   #--------------------------------------------------------------------------
  345. ##########################################################################
  346.   def draw_item_stats(dy, sw)
  347.     dy += 24
  348.     if @item.damage.type != 0
  349.       case @item.damage.type
  350.       when 1
  351.         text = R2_SHOP_STATS::ITEM_STAT_HP_DAM
  352.       when 2
  353.         text = R2_SHOP_STATS::ITEM_STAT_MP_DAM
  354.       when 3
  355.         text = R2_SHOP_STATS::ITEM_STAT_HP_REC
  356.       when 4
  357.         text = R2_SHOP_STATS::ITEM_STAT_MP_REC
  358.       when 5
  359.         text = R2_SHOP_STATS::ITEM_STAT_HP_DRN
  360.       when 6
  361.         text = R2_SHOP_STATS::ITEM_STAT_MP_REC
  362.       end
  363.       change_color(system_color)
  364.       draw_text(0, dy, sw-24, 24, R2_SHOP_STATS::ITEM_DAM_TYPE, 0)
  365.       contents.font.size = R2_SHOP_STATS::FONTSIZE
  366.       change_color(normal_color)
  367.       draw_text(130, dy + 2, sw/2-24, 24, text, 0)
  368.       if @item.damage.element_id != 0
  369.         if @item.damage.element_id != -1
  370.         draw_icon(R2_SHOP_STATS::SHOWN_ELEMENTS[@item.damage.element_id], 250, dy, 2)
  371.         end
  372.       end
  373.       dy += 24 if R2_SHOP_STATS::USE_SPACES
  374.     end
  375.     count = 0
  376.     dy += 24 if R2_SHOP_STATS::USE_SPACES
  377.     @item.effects.each do |set|
  378.       case set.code
  379.       when 11 #---HP---
  380.         count += 1
  381.         word = R2_SHOP_STATS::TEXT_HP
  382.         icon = R2_SHOP_STATS::ICON_HP
  383.       when 12 #---MP---
  384.         count += 1
  385.         word = R2_SHOP_STATS::TEXT_MP
  386.         icon = R2_SHOP_STATS::ICON_MP
  387.       when 13 #---TP---
  388.         count += 1
  389.         word = R2_SHOP_STATS::TEXT_TP
  390.         icon = R2_SHOP_STATS::ICON_TP
  391.       else
  392.         next
  393.       end
  394.       num1 = 0
  395.       num2 = 0
  396.       if set.value1 != 0
  397.         num1 = set.value1
  398.         num1 = (num1 * 100).to_i
  399.       end
  400.       if set.value2 != 0
  401.         num2 = set.value2.to_i
  402.       end
  403.       if num1 != 0 && num2 != 0
  404.         text1 = sprintf("%d", num1)
  405.         text2 = sprintf("%d", num2)
  406.         text = "+" + text2 + " & " + text1 + "%"
  407.       elsif num1 != 0 && set.code == 13
  408.         text = sprintf("%d", num1)
  409.         text = "+" + text
  410.       elsif num1 != 0 && set.code != 13
  411.         text = sprintf("%d", num1)
  412.         text = text + "%"
  413.       elsif num2 != 0
  414.         text = sprintf("%d", num2)
  415.         text = "+" + text
  416.       end
  417.       if count.odd?
  418.         change_color(system_color)
  419.         draw_text(29, dy, sw/2-24, 24, word)
  420.         change_color(normal_color)
  421.         draw_icon(icon, 0, dy, icon != 0)
  422.         if (text.size * 8) > (sw / 5)
  423.           draw_text(sw*1/6-50, dy, sw/2, 24, text, 2)
  424.         else
  425.           draw_text(sw*1/4, dy, sw/5, 24, text, 2)
  426.         end
  427.       else
  428.         change_color(system_color)
  429.         draw_text(sw/2+29, dy, sw/2-24, 24, word)
  430.         change_color(normal_color)
  431.         draw_icon(icon, sw/2, dy, icon != 0)
  432.         if (text.size * 8) > (sw / 5)
  433.           draw_text(sw*3/6, dy, sw/2, 24, text, 2)
  434.         else
  435.           draw_text(sw*3/4, dy, sw/5, 24, text, 2)
  436.         end
  437.       end
  438.       if count % 2 == 0
  439.         dy += 24
  440.       end
  441.     end
  442. ##########################################################################
  443.     if R2_SHOP_STATS::ITEM_STATES
  444.       add_states = []
  445.       remove_states = []
  446.       @item.effects.each do |set|
  447.         next if set.code == 0
  448.         if set.code == 21
  449.           add_states.push(set.data_id)
  450.         elsif set.code == 22
  451.           remove_states.push(set.data_id)
  452.         end
  453.       end
  454.       if add_states != [] # Draw Add States
  455.         dy += 24
  456.         text = R2_SHOP_STATS::TEXT_ADD_STATES
  457.         change_color(system_color)
  458.         draw_text(0, dy, sw/2, 24, text)
  459.         dx = sw - (add_states.size * 24)
  460.         for i in add_states
  461.           icon = $data_states[i].icon_index
  462.           draw_icon(icon, dx, dy)
  463.           dx += 24
  464.         end
  465.       end
  466.       if remove_states != [] # Draw Remove States
  467.         dy += 24
  468.         text = R2_SHOP_STATS::TEXT_RM_STATES
  469.         change_color(system_color)
  470.         draw_text(0, dy, sw/2, 24, text)
  471.         dx = sw - (remove_states.size * 24)
  472.         for i in remove_states
  473.           icon = $data_states[i].icon_index
  474.           draw_icon(icon, dx, dy)
  475.           dx += 24
  476.         end
  477.       end
  478.       dy += 24 if R2_SHOP_STATS::USE_SPACES
  479.     end
  480. ##########################################################################
  481.     if R2_SHOP_STATS::ITEM_BUFFS
  482.       @item.effects.each do |set|
  483.         case set.code
  484.         when 31 #---ADD BUFF---
  485.           buff = R2_SHOP_STATS::ITEM_ADD_BUFF
  486.         when 32 #---ADD DEBUFF---
  487.           buff = R2_SHOP_STATS::ITEM_ADD_DEBUFF
  488.         when 33 #---REMOVE BUFF---
  489.           buff = R2_SHOP_STATS::ITEM_RM_BUFF
  490.         when 34 #---REMOVE DEBUFF---
  491.           buff = R2_SHOP_STATS::ITEM_RM_DEBUFF
  492.         else
  493.           next
  494.         end
  495.         case set.data_id
  496.         when 0 #---HP---
  497.           word = Vocab::param(set.data_id)
  498.           icon = R2_SHOP_STATS::ICON_HP
  499.         when 1 #---MP---
  500.           word = Vocab::param(set.data_id)
  501.           icon = R2_SHOP_STATS::ICON_MP
  502.         when 2 #---ATK---
  503.           word = Vocab::param(set.data_id)
  504.           icon = R2_SHOP_STATS::ICON_ATK
  505.         when 3 #---DEF---
  506.           word = Vocab::param(set.data_id)
  507.           icon = R2_SHOP_STATS::ICON_DEF
  508.         when 4 #---MAT---
  509.           word = Vocab::param(set.data_id)
  510.           icon = R2_SHOP_STATS::ICON_MAT
  511.         when 5 #---MDF---
  512.           word = Vocab::param(set.data_id)
  513.           icon = R2_SHOP_STATS::ICON_MDF
  514.         when 6 #---AGI---
  515.           word = Vocab::param(set.data_id)
  516.           icon = R2_SHOP_STATS::ICON_AGI
  517.         when 7 #---LUK---
  518.           word = Vocab::param(set.data_id)
  519.           icon = R2_SHOP_STATS::ICON_LUK
  520.         end
  521.         num = 0
  522.         if set.value1 != 0
  523.           num = set.value1.to_i
  524.         end
  525.         if num != 0 && set.code == 31
  526.           text = sprintf("%d", num)
  527.           text = "+" + text + " turns"
  528.         elsif num != 0 && set.code == 32
  529.           text = sprintf("%d", num)
  530.           text = "+" + text + " turns"
  531.         end
  532.         dy += 24
  533.         change_color(system_color)
  534.         draw_text(0, dy, sw/2, 24, buff)
  535.         draw_text(90, dy, sw/2-24, 24, word)
  536.         change_color(normal_color)
  537.         draw_icon(icon, 120, dy, icon != 0)
  538.         draw_text(150, dy, sw/3, 24, text, 2)
  539.         dy += 24 if R2_SHOP_STATS::USE_SPACES
  540.       end
  541.     end
  542. ##########################################################################
  543.     if R2_SHOP_STATS::ITEM_STATS
  544.       @item.effects.each do |set|
  545.         case set.code
  546.         when 42 #---Grow Stat---
  547.           buff = R2_SHOP_STATS::ITEM_STAT_TEXT
  548.         else
  549.           next
  550.         end
  551.         case set.data_id
  552.         when 0 #---HP---
  553.           word = Vocab::param(set.data_id)
  554.           icon = R2_SHOP_STATS::ICON_HP
  555.         when 1 #---MP---
  556.           word = Vocab::param(set.data_id)
  557.           icon = R2_SHOP_STATS::ICON_MP
  558.         when 2 #---ATK---
  559.           word = Vocab::param(set.data_id)
  560.           icon = R2_SHOP_STATS::ICON_ATK
  561.         when 3 #---DEF---
  562.           word = Vocab::param(set.data_id)
  563.           icon = R2_SHOP_STATS::ICON_DEF
  564.         when 4 #---MAT---
  565.           word = Vocab::param(set.data_id)
  566.           icon = R2_SHOP_STATS::ICON_MAT
  567.         when 5 #---MDF---
  568.           word = Vocab::param(set.data_id)
  569.           icon = R2_SHOP_STATS::ICON_MDF
  570.         when 6 #---AGI---
  571.           word = Vocab::param(set.data_id)
  572.           icon = R2_SHOP_STATS::ICON_AGI
  573.         when 7 #---LUK---
  574.           word = Vocab::param(set.data_id)
  575.           icon = R2_SHOP_STATS::ICON_LUK
  576.         end
  577.         num = 0
  578.         if set.value1 != 0
  579.           num = set.value1.to_i
  580.         end
  581.         if num != 0 && set.code == 42
  582.           text = sprintf("%d", num)
  583.           if num >= 1
  584.             text = "+" + text
  585.           else
  586.             text = "-" + text
  587.           end
  588.         end
  589.         dy += 24
  590.         change_color(system_color)
  591.         draw_text(0, dy, sw/2, 24, buff)
  592.         draw_text(140, dy, sw/2-24, 24, word)
  593.         change_color(normal_color)
  594.         draw_icon(icon, 170, dy, icon != 0)
  595.         draw_text(200, dy, sw/5, 24, text, 2)
  596.         dy += 24 if R2_SHOP_STATS::USE_SPACES
  597.       end
  598.     end
  599. ##########################################################################
  600.     if R2_SHOP_STATS::ITEM_SKILL
  601.       skills_add = []
  602.       text = R2_SHOP_STATS::ITEM_SKILL_ADD
  603.       @item.effects.each do |set|
  604.         case set.code
  605.         when 43 #---Grow Stat---
  606.           skills_add.push(set.data_id)
  607.         else
  608.           next
  609.         end
  610.       end
  611.       if skills_add != [] # Draw States
  612.         dy += 24
  613.         change_color(system_color)
  614.         draw_text(0, dy, sw/2, 24, text)
  615.         dx = sw - (skills_add.size * 24)
  616.         for i in skills_add
  617.           icon = $data_skills[i].icon_index
  618.           draw_icon(icon, dx, dy)
  619.           dx += 24
  620.         end
  621.       end
  622.     end
  623.   end # end draw_item_stats
  624.  
  625. ##########################################################################
  626.   #--------------------------------------------------------------------------
  627.   # draw_equip_stats
  628.   #--------------------------------------------------------------------------
  629. ##########################################################################
  630.   def draw_equip_stats(dy, sw)
  631.     contents.font.size = R2_SHOP_STATS::FONTSIZE
  632.     change_color(normal_color)
  633.     dy += 24
  634.     draw_text(0, dy, sw-24, 24, R2_SHOP_STATS::STATS_TEXT, 1)
  635.     dy += 24
  636.     count = 0
  637.     i = 0
  638.     @item.params.each do |param|
  639.       if param != 0
  640.         text = sprintf("%d", param)
  641.         case i
  642.         when 0 #---HP---
  643.           count += 1
  644.           word = Vocab::param(i)
  645.           icon = R2_SHOP_STATS::ICON_HP
  646.         when 1 #---MP---
  647.           count += 1
  648.           word = Vocab::param(i)
  649.           icon = R2_SHOP_STATS::ICON_MP
  650.         when 2 #---ATK---
  651.           count += 1
  652.           word = Vocab::param(i)
  653.           icon = R2_SHOP_STATS::ICON_ATK
  654.         when 3 #---DEF---
  655.           count += 1
  656.           word = Vocab::param(i)
  657.           icon = R2_SHOP_STATS::ICON_DEF
  658.         when 4 #---MAT---
  659.           count += 1
  660.           word = Vocab::param(i)
  661.           icon = R2_SHOP_STATS::ICON_MAT
  662.         when 5 #---MDF---
  663.           count += 1
  664.           word = Vocab::param(i)
  665.           icon = R2_SHOP_STATS::ICON_MDF
  666.         when 6 #---AGI---
  667.           count += 1
  668.           word = Vocab::param(i)
  669.           icon = R2_SHOP_STATS::ICON_AGI
  670.         when 7 #---LUK---
  671.           count += 1
  672.           word = Vocab::param(i)
  673.           icon = R2_SHOP_STATS::ICON_LUK
  674.         else
  675.           next
  676.         end
  677.         if count.odd?
  678.           change_color(system_color)
  679.           draw_text(29, dy, sw/2-24, 24, word)
  680.           change_color(normal_color)
  681.           draw_icon(icon, 0, dy, icon != 0)
  682.           draw_text(sw*1/4, dy, sw/5, 24, text, 2)
  683.         else
  684.           change_color(system_color)
  685.           draw_text(sw/2+29, dy, sw/2-24, 24, word)
  686.           change_color(normal_color)
  687.           draw_icon(icon, sw/2, dy, icon != 0)
  688.           draw_text(sw*3/4, dy, sw/5, 24, text, 2)
  689.         end
  690.         if count % 2 == 0
  691.           dy += 24
  692.         end
  693.       end
  694.       i += 1
  695.     end
  696.     dy += 24 if count.odd?
  697.     dy += 24 if R2_SHOP_STATS::USE_SPACES && count > 0
  698. ##########################################################################
  699.     if R2_SHOP_STATS::SHOW_EX_PARAM
  700.       #------Ex Parameters------
  701.       count = 0
  702.       @item.features.each do |set|
  703.         next unless set.code == 22
  704.         change_color(normal_color)
  705.         draw_text(0, dy, sw-24, 24, R2_SHOP_STATS::EXSTATS_TEXT, 1) if R2_SHOP_STATS::SHOW_EXTEXT
  706.         dy += 24 if R2_SHOP_STATS::SHOW_EXTEXT
  707.         num = (set.value * 100).to_i
  708.         text = sprintf("%d", num)
  709.         case set.data_id
  710.         when 0 #---HIT---
  711.           count += 1
  712.           word = R2_SHOP_STATS::TEXT_HIT
  713.           icon = R2_SHOP_STATS::ICON_HIT
  714.         when 1 #---EVA---
  715.           count += 1
  716.           word = R2_SHOP_STATS::TEXT_EVA
  717.           icon = R2_SHOP_STATS::ICON_EVA
  718.         when 2 #---CRI---
  719.           count += 1
  720.           word = R2_SHOP_STATS::TEXT_CRI
  721.           icon = R2_SHOP_STATS::ICON_CRI
  722.         when 3 #---CEV---
  723.           count += 1
  724.           word = R2_SHOP_STATS::TEXT_CEV
  725.           icon = R2_SHOP_STATS::ICON_CEV
  726.         when 4 #---MEV---
  727.           count += 1
  728.           word = R2_SHOP_STATS::TEXT_MEV
  729.           icon = R2_SHOP_STATS::ICON_MEV
  730.         when 5 #---MRF---
  731.           count += 1
  732.           word = R2_SHOP_STATS::TEXT_MRF
  733.           icon = R2_SHOP_STATS::ICON_MRF
  734.         when 6 #---CNT---
  735.           count += 1
  736.           word = R2_SHOP_STATS::TEXT_CNT
  737.           icon = R2_SHOP_STATS::ICON_CNT
  738.         when 7 #---HRG---
  739.           count += 1
  740.           word = R2_SHOP_STATS::TEXT_HRG
  741.           icon = R2_SHOP_STATS::ICON_HRG
  742.         when 8 #---MRG---
  743.           count += 1
  744.           word = R2_SHOP_STATS::TEXT_MRG
  745.           icon = R2_SHOP_STATS::ICON_MRG
  746.         when 9 #---TRG---
  747.           count += 1
  748.           word = R2_SHOP_STATS::TEXT_TRG
  749.           icon = R2_SHOP_STATS::ICON_TRG
  750.         else
  751.           next
  752.         end
  753.         if count.odd?
  754.           change_color(system_color)
  755.           draw_text(29, dy, sw/2-24, 24, word)
  756.           change_color(normal_color)
  757.           draw_icon(icon, 0, dy, icon != 0)
  758.           draw_text(sw*1/4, dy, sw/5, 24, text + "%", 2)
  759.         else
  760.           change_color(system_color)
  761.           draw_text(sw/2+29, dy, sw/2-24, 24, word)
  762.           change_color(normal_color)
  763.           draw_icon(icon, sw/2, dy, icon != 0)
  764.           draw_text(sw*3/4, dy, sw/5, 24, text + "%", 2)
  765.         end
  766.         if count % 2 == 0
  767.           dy += 24
  768.         end
  769.       end
  770.       dy += 24 if count.odd?
  771.       dy += 24 if R2_SHOP_STATS::USE_SPACES && count > 2
  772.     end
  773. ##########################################################################
  774.     if R2_SHOP_STATS::SHOW_SP_PARAM
  775.       #------SP Parameters------
  776.       count = 0
  777.       @item.features.each do |set|
  778.         next unless set.code == 23
  779.         num = (set.value * 100).to_i
  780.         text = sprintf("%d", num)
  781.         change_color(normal_color)
  782.         draw_text(0, dy, sw-24, 24, R2_SHOP_STATS::SPSTATS_TEXT, 1) if R2_SHOP_STATS::SHOW_SPTEXT
  783.         dy += 24 if R2_SHOP_STATS::SHOW_SPTEXT
  784.         case set.data_id
  785.         when 0 #---TGR---
  786.           count += 1
  787.           word = R2_SHOP_STATS::TEXT_TGR
  788.           icon = R2_SHOP_STATS::ICON_TGR
  789.         when 1 #---GRD---
  790.           count += 1
  791.           word = R2_SHOP_STATS::TEXT_GRD
  792.           icon = R2_SHOP_STATS::ICON_GRD
  793.         when 2 #---REC---
  794.           count += 1
  795.           word = R2_SHOP_STATS::TEXT_REC
  796.           icon = R2_SHOP_STATS::ICON_REC
  797.         when 3 #---PHA---
  798.           count += 1
  799.           word = R2_SHOP_STATS::TEXT_PHA
  800.           icon = R2_SHOP_STATS::ICON_PHA
  801.         when 4 #---MCR---
  802.           count += 1
  803.           word = R2_SHOP_STATS::TEXT_MCR
  804.           icon = R2_SHOP_STATS::ICON_MCR
  805.         when 5 #---TCR---
  806.           count += 1
  807.           word = R2_SHOP_STATS::TEXT_TCR
  808.           icon = R2_SHOP_STATS::ICON_TCR
  809.         when 6 #---PDR---
  810.           count += 1
  811.           word = R2_SHOP_STATS::TEXT_PDR
  812.           icon = R2_SHOP_STATS::ICON_PDR
  813.         when 7 #---MDR---
  814.           count += 1
  815.           word = R2_SHOP_STATS::TEXT_MDR
  816.           icon = R2_SHOP_STATS::ICON_MDR
  817.         when 8 #---FDR---
  818.           count += 1
  819.           word = R2_SHOP_STATS::TEXT_FDR
  820.           icon = R2_SHOP_STATS::ICON_FDR
  821.         when 9 #---EXR---
  822.           count += 1
  823.           word = R2_SHOP_STATS::TEXT_EXR
  824.           icon = R2_SHOP_STATS::ICON_EXR
  825.         else
  826.           next
  827.         end
  828.         if count.odd?
  829.           change_color(system_color)
  830.           draw_text(29, dy, sw/2-24, 24, word)
  831.           change_color(normal_color)
  832.           draw_icon(icon, 0, dy, icon != 0)
  833.           draw_text(sw*1/4, dy, sw/5, 24, text + "%", 2)
  834.         else
  835.           change_color(system_color)
  836.           contents.draw_text(sw/2+29, dy, sw/2-24, 24, word)
  837.           change_color(normal_color)
  838.           draw_icon(icon, sw/2, dy, icon != 0)
  839.           draw_text(sw*3/4, dy, sw/5, 24, text + "%", 2)
  840.         end
  841.         if count % 2 == 0
  842.           dy += 24
  843.         end
  844.       end
  845.       dy += 24 if R2_SHOP_STATS::USE_SPACES && count > 0
  846.     end
  847. ##########################################################################
  848.     if R2_SHOP_STATS::DRAW_ELEMENTS
  849.       #------ELEMENTS------
  850.       drawn_elements = []
  851.       elem = false
  852.       @item.features.each do |set|
  853.         next if set.data_id == 0
  854.         case set.code
  855.         when 31 # weapon
  856.           drawn_elements.push(set.data_id)
  857.           elem = true
  858.         when 11 # armour
  859.           drawn_elements.push(set.data_id)
  860.           elem = true
  861.         else
  862.           next
  863.         end
  864.       end
  865.       if drawn_elements != [] # Draw Elements
  866.         drawn_elements = drawn_elements.sort!
  867.         dy += 24
  868.         if @item.is_a?(RPG::Weapon)
  869.           text = R2_SHOP_STATS::EQ_ELEMENT_W
  870.         else
  871.           text = R2_SHOP_STATS::EQ_ELEMENT_A
  872.         end
  873.         change_color(system_color)
  874.         draw_text(0, dy, sw/2, 24, text)
  875.         dx = sw - (drawn_elements.size * 24)
  876.         for ele_id in drawn_elements
  877.           draw_icon(R2_SHOP_STATS::SHOWN_ELEMENTS[ele_id], dx, dy)
  878.           dx += 24
  879.         end
  880.       end
  881.       dy += 24 if R2_SHOP_STATS::USE_SPACES && elem == true
  882.     end
  883. ##########################################################################
  884.     if R2_SHOP_STATS::DRAW_STATES
  885.       #------STATES------
  886.       drawn_states = []
  887.       resist_states = []
  888.       @item.features.each do |set|
  889.         next if set.data_id == 0
  890.         case set.code
  891.         when 32 # weapons
  892.           drawn_states.push(set.data_id)
  893.         when 13 # armour
  894.           drawn_states.push(set.data_id)
  895.         when 14 # armour resist states
  896.           resist_states.push(set.data_id)
  897.         else
  898.           next
  899.         end
  900.       end
  901.       if drawn_states != [] # Draw States
  902.         dy += 24
  903.         if @item.is_a?(RPG::Weapon)
  904.           text = R2_SHOP_STATS::EQ_STATUS_W
  905.         else
  906.           text = R2_SHOP_STATS::EQ_STATUS_A
  907.         end
  908.         change_color(system_color)
  909.         draw_text(0, dy, sw/2, 24, text)
  910.         dx = sw - (drawn_states.size * 24)
  911.         for icon in drawn_states
  912.           draw_icon(icon, dx, dy)
  913.           dx += 24
  914.         end
  915.       end
  916.       if resist_states != [] # Draw Resist States (Armour)
  917.         dy += 24
  918.         text = R2_SHOP_STATS::STATE_RESIST
  919.         change_color(system_color)
  920.         draw_text(0, dy, sw/2, 24, text)
  921.         dx = sw - (resist_states.size * 24)
  922.         for icon in resist_states
  923.           draw_icon(icon, dx, dy)
  924.           dx += 24
  925.         end
  926.       end
  927.       dy += 24 if R2_SHOP_STATS::USE_SPACES && ((drawn_states != []) || (resist_states != []))
  928.     end
  929. ##########################################################################
  930.     if R2_SHOP_STATS::EQUIP_SKILL
  931.       skills_add = []
  932.       text = R2_SHOP_STATS::EQUIP_SKILL_ADD
  933.       @item.features.each do |set|
  934.         case set.code
  935.         when 43 #---Grow Stat---
  936.           skills_add.push(set.data_id)
  937.         else
  938.           next
  939.         end
  940.       end
  941.       if skills_add != [] # Draw States
  942.         dy += 24
  943.         change_color(system_color)
  944.         draw_text(0, dy, sw/2, 24, text)
  945.         dx = sw - (skills_add.size * 24)
  946.         for i in skills_add
  947.           icon = $data_skills[i].icon_index
  948.           draw_icon(icon, dx, dy)
  949.           dx += 24
  950.         end
  951.       end
  952.       dy += 24 if R2_SHOP_STATS::USE_SPACES
  953.     end
  954. ##########################################################################
  955.     if R2_SHOP_STATS::EQUIP_SKILL_SEAL
  956.       skills_seal = []
  957.       text = R2_SHOP_STATS::TEXT_SEAL_STATES
  958.       @item.features.each do |set|
  959.         case set.code
  960.         when 44 #---Grow Stat---
  961.           skills_seal.push(set.data_id)
  962.         else
  963.           next
  964.         end
  965.       end
  966.       if skills_seal != [] # Draw States
  967.         dy += 24
  968.         change_color(system_color)
  969.         draw_text(0, dy, sw/2, 24, text)
  970.         dx = sw - (skills_seal.size * 24)
  971.         for i in skills_seal
  972.           icon = $data_skills[i].icon_index
  973.           draw_icon(icon, dx, dy)
  974.           dx += 24
  975.         end
  976.       end
  977.     end
  978. ##########################################################################
  979.     if R2_SHOP_STATS::EQUIP_DEBUFF
  980.       @item.features.each do |set|
  981.         case set.code
  982.         when 12 #---DEBUFF RATE---
  983.           debuff = R2_SHOP_STATS::EQUIP_DEBUFF_TEXT
  984.         else
  985.           next
  986.         end
  987.         case set.data_id
  988.         when 0 #---HP---
  989.           word = Vocab::param(set.data_id)
  990.           icon = R2_SHOP_STATS::ICON_HP
  991.         when 1 #---MP---
  992.           word = Vocab::param(set.data_id)
  993.           icon = R2_SHOP_STATS::ICON_MP
  994.         when 2 #---ATK---
  995.           word = Vocab::param(set.data_id)
  996.           icon = R2_SHOP_STATS::ICON_ATK
  997.         when 3 #---DEF---
  998.           word = Vocab::param(set.data_id)
  999.           icon = R2_SHOP_STATS::ICON_DEF
  1000.         when 4 #---MAT---
  1001.           word = Vocab::param(set.data_id)
  1002.           icon = R2_SHOP_STATS::ICON_MAT
  1003.         when 5 #---MDF---
  1004.           word = Vocab::param(set.data_id)
  1005.           icon = R2_SHOP_STATS::ICON_MDF
  1006.         when 6 #---AGI---
  1007.           word = Vocab::param(set.data_id)
  1008.           icon = R2_SHOP_STATS::ICON_AGI
  1009.         when 7 #---LUK---
  1010.           word = Vocab::param(set.data_id)
  1011.           icon = R2_SHOP_STATS::ICON_LUK
  1012.         end
  1013.         num = 0
  1014.         if set.value != 0
  1015.           num = set.value.to_f
  1016.           num = (num * 100).to_i
  1017.           text = sprintf("%d", num)
  1018.           text = "+" + text + "%"
  1019.         end
  1020.         dy += 24 if R2_SHOP_STATS::USE_SPACES
  1021.         dy += 24
  1022.         change_color(system_color)
  1023.         draw_text(0, dy, sw/2, 24, debuff)
  1024.         draw_text(110, dy, sw/2-24, 24, word)
  1025.         change_color(normal_color)
  1026.         draw_icon(icon, 140, dy, icon != 0)
  1027.         draw_text(150, dy, sw/3, 24, text, 2)
  1028.       end
  1029.     end
  1030. ##########################################################################
  1031.     if R2_SHOP_STATS::EQUIP_ATTACK_STATE
  1032.       attack_state = []
  1033.       attack_numb = []
  1034.       text = R2_SHOP_STATS::EQUIP_ATTACK_STATE_TEXT
  1035.       @item.features.each do |set|
  1036.         case set.code
  1037.         when 32 #---DEBUFF RATE---
  1038.           attack_state.push(set.data_id)
  1039.           value = (set.value * 100).round
  1040.           strng = value.to_s + "%"
  1041.           attack_numb.push(strng)
  1042.         else
  1043.           next
  1044.         end
  1045.       end
  1046.       if attack_state != [] # Draw States
  1047.         dy += 24 if R2_SHOP_STATS::USE_SPACES
  1048.         dy += 24
  1049.         change_color(system_color)
  1050.         draw_text(0, dy, sw/2, 24, text)
  1051.         dx = sw - (attack_state.size * 48)
  1052.         change_color(normal_color)
  1053.         n = 0
  1054.         for i in attack_state
  1055.           icon = $data_states[i].icon_index
  1056.           numb = attack_numb[n]
  1057.           draw_icon(icon, dx, dy)
  1058.           draw_text(dx+24, dy, 24, 24, numb)
  1059.           dx += 48
  1060.           n += 1
  1061.         end
  1062.       end
  1063.     end
  1064. ##########################################################################
  1065.     if R2_SHOP_STATS::EQUIP_ATTACK_SPEED
  1066.       speed_value = 0
  1067.       text = R2_SHOP_STATS::EQUIP_ATTACK_SPEED_TEXT
  1068.       @item.features.each do |set|
  1069.         case set.code
  1070.         when 33 #---Attack speed---
  1071.           speed_value = set.value.to_i
  1072.         else
  1073.           next
  1074.         end
  1075.       end
  1076.       if speed_value != 0
  1077.         dy += 24 if R2_SHOP_STATS::USE_SPACES
  1078.         dy += 24
  1079.         change_color(system_color)
  1080.         draw_text(0, dy, sw/2, 24, text)
  1081.         change_color(normal_color)
  1082.         dx = text.size * 10
  1083.         draw_text(dx + 20, dy, sw/3, 24, speed_value)
  1084.       end
  1085.     end
  1086. ##########################################################################
  1087.     if R2_SHOP_STATS::EQUIP_ATTACK_TIMES
  1088.       text = R2_SHOP_STATS::EQUIP_ATTACK_TIMES_TEXT
  1089.       times_value = 0
  1090.       @item.features.each do |set|
  1091.         case set.code
  1092.         when 34 #---Attack Times---
  1093.           num = set.value.to_i
  1094.           times_value = "+" + num.to_s
  1095.         else
  1096.           next
  1097.         end
  1098.       end
  1099.       if times_value != 0
  1100.         dy += 24 if R2_SHOP_STATS::USE_SPACES
  1101.         dy += 24
  1102.         change_color(system_color)
  1103.         draw_text(0, dy, sw/2, 24, text)
  1104.         change_color(normal_color)
  1105.         dx = text.size * 10
  1106.         draw_text(dx + 20, dy, sw/3, 24, times_value)
  1107.       end
  1108.     end
  1109. ##########################################################################
  1110.     if R2_SHOP_STATS::EQUIP_ACTION_TIMES
  1111.       text = R2_SHOP_STATS::EQUIP_ACTION_TIMES_TEXT
  1112.       action_value = 0
  1113.       @item.features.each do |set|
  1114.         case set.code
  1115.         when 61 #---Action times---
  1116.           num = (set.value * 100).to_i
  1117.           action_value = num.to_s + "%"
  1118.         else
  1119.           next
  1120.         end
  1121.       end
  1122.       if action_value != 0
  1123.         dy += 24 if R2_SHOP_STATS::USE_SPACES
  1124.         dy += 24
  1125.         change_color(system_color)
  1126.         draw_text(0, dy, sw/2, 24, text)
  1127.         change_color(normal_color)
  1128.         dx = text.size * 10
  1129.         draw_text(dx + 20, dy, sw/3, 24, action_value)
  1130.       end
  1131.     end
  1132. ##########################################################################
  1133.     if R2_SHOP_STATS::EQUIP_PARTY_ABILITY
  1134.       @item.features.each do |set|
  1135.         if set.code == 64 # Party Ability
  1136.           case set.data_id
  1137.           when 0 #---TGR---
  1138.             ability = "Encounter Half"
  1139.           when 1 #---GRD---
  1140.             ability = "Encounter None"
  1141.           when 2 #---REC---
  1142.             ability = "Cancel Surprise"
  1143.           when 3 #---PHA---
  1144.             ability = "Raise Preemptive"
  1145.           when 4 #---MCR---
  1146.             ability = "Double Gold"
  1147.           when 5 #---TCR---
  1148.             ability = "Double Item Drop"
  1149.           else
  1150.             next
  1151.           end
  1152.           dy += 24 if R2_SHOP_STATS::USE_SPACES
  1153.           dy += 24
  1154.           change_color(system_color)
  1155.           draw_text(0, dy, sw/2, 24, ability)
  1156.           change_color(normal_color)
  1157.         end
  1158.       end
  1159.     end
  1160.  
  1161.   end
  1162.  
  1163. end # Window_ShopNumber
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement