查看: 2459|回复: 2

[已经解决] 新人报道,另外请教一下各位大佬被动技能怎么做

[复制链接]
梦石
0
星屑
50
在线时间
23 小时
注册时间
2017-2-25
回帖
3
发表于 2017-2-28 16:18:15 | 显示全部楼层 |阅读模式

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

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

×
比如说:A升到30级,学会被动技能【双刃剑】,效果是输出伤害增加30%,受到伤害也增加30% 这个技能应该怎么弄
另外还有一个问题,在VA中怎么修改装备数量,磨人能装备5见,我想改成4件

老鹰

梦石
40
星屑
38049
在线时间
7128 小时
注册时间
2012-5-26
回帖
3306

极短24评委极短23参与极短22参与极短21评委老司机慢点开短篇十吟唱者组别冠军开拓者剧作品鉴家

发表于 2017-2-28 17:28:29 | 显示全部楼层
1.https://taroxd.github.io/rgss/ 中的 https://taroxd.github.io/rgss/Ta ... AE%BE%E7%BD%AE.html 与 https://taroxd.github.io/rgss/%E ... 8A%B6%E6%80%81.html

2.
Yanfly Engine Ace - Ace Equip Engine v1.05
  1. #==============================================================================
  2. #
  3. # ▼ Yanfly Engine Ace - Ace Equip Engine v1.05
  4. # -- Last Updated: 2012.01.22
  5. # -- Level: Normal, Hard
  6. # -- Requires: n/a
  7. #
  8. #==============================================================================

  9. $imported = {} if $imported.nil?
  10. $imported["YEA-AceEquipEngine"] = true

  11. #==============================================================================
  12. # ▼ Updates
  13. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  14. # 2012.01.22 - Bug Fixed: <equip slot> notetags updated to factor in spaces.
  15. # 2012.01.05 - Compatibility Update: Equip Dynamic Stats
  16. # 2011.12.30 - Bug Fixed: Stats didn't update.
  17. # 2011.12.23 - Script efficiency optimized.
  18. # 2011.12.18 - Script efficiency optimized.
  19. # 2011.12.13 - Started Script and Finished.
  20. #
  21. #==============================================================================
  22. # ▼ Introduction
  23. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  24. # The default equipment system in RPG Maker VX is the standard equipment system
  25. # seen in all of the previous iterations, which consists of weapon, shield,
  26. # headgear, bodygear, and accessory. To break free of that norm, this script
  27. # allows users access to giving actors and/or classes dynamic equipment setups
  28. # (including having multiples of the same categories). In addition to having
  29. # different equip slot setups, newer equipment types can be made to allow for
  30. # more diversity in armour types.
  31. #
  32. #==============================================================================
  33. # ▼ Instructions
  34. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  35. # To install this script, open up your script editor and copy/paste this script
  36. # to an open slot below ▼ Materials/素材 but above ▼ Main. Remember to save.
  37. #
  38. # -----------------------------------------------------------------------------
  39. # Actor Notetags - These notetags go in the actors notebox in the database.
  40. # -----------------------------------------------------------------------------
  41. # <equip slots>
  42. #  string
  43. #  string
  44. # </equip slots>
  45. # This sets the actor's default slots to whatever is listed in between the two
  46. # notetags. An actor's custom equip slots will take priority over a class's
  47. # custom equip slots, which will take priority over the default equip slots.
  48. # Replace "string" with the proper equipment type name or when in doubt, use
  49. # "equip type: x" with x as the equipment type.
  50. #
  51. # <starting gear: x>
  52. # <starting gear: x, x>
  53. # Adds armour x to the actor's list of starting gear. This is used primarily
  54. # for the newer pieces of gear that can't be added through the starting set of
  55. # equipment through the RPG Maker VX Ace editor by default. Insert multiple of
  56. # these notetags to add more pieces of starting gear if so desired.
  57. #
  58. # <fixed equip: x>
  59. # <fixed equip: x, x>
  60. # This will fix the equip type x. Fixed equip slots mean that the equipment
  61. # already on it are unable to be exchanged in or out by the player. This tag
  62. # has been made so that equip types can be fixed for equip type 5 and above.
  63. # Use multiple of these notetags to add more fixed equipment restrictions.
  64. #
  65. # <sealed equip: x>
  66. # <sealed equip: x, x>
  67. # This will seal the equip type x. Sealed equip slots mean that no equipment
  68. # can be equipped onto that equip type slot. This tag has been made so that
  69. # equip types can be sealed for equip type 5 and above. Use multiple of these
  70. # notetags to add more sealed equipment restrictions.
  71. #
  72. # -----------------------------------------------------------------------------
  73. # Class Notetags - These notetags go in the class notebox in the database.
  74. # -----------------------------------------------------------------------------
  75. # <equip slots>
  76. #  string
  77. #  string
  78. # </equip slots>
  79. # This sets the class's default slots to whatever is listed in between the two
  80. # notetags. An actor's custom equip slots will take priority over a class's
  81. # custom equip slots, which will take priority over the default equip slots.
  82. # Replace "string" with the proper equipment type name or when in doubt, use
  83. # "equip type: x" with x as the equipment type.
  84. #
  85. # <fixed equip: x>
  86. # <fixed equip: x, x>
  87. # This will fix the equip type x. Fixed equip slots mean that the equipment
  88. # already on it are unable to be exchanged in or out by the player. This tag
  89. # has been made so that equip types can be fixed for equip type 5 and above.
  90. # Use multiple of these notetags to add more fixed equipment restrictions.
  91. #
  92. # <sealed equip: x>
  93. # <sealed equip: x, x>
  94. # This will seal the equip type x. Sealed equip slots mean that no equipment
  95. # can be equipped onto that equip type slot. This tag has been made so that
  96. # equip types can be sealed for equip type 5 and above. Use multiple of these
  97. # notetags to add more sealed equipment restrictions.
  98. #
  99. # -----------------------------------------------------------------------------
  100. # Weapon Notetags - These notetags go in the weapons notebox in the database.
  101. # -----------------------------------------------------------------------------
  102. # <fixed equip: x>
  103. # <fixed equip: x, x>
  104. # This will fix the equip type x. Fixed equip slots mean that the equipment
  105. # already on it are unable to be exchanged in or out by the player. This tag
  106. # has been made so that equip types can be fixed for equip type 5 and above.
  107. # Use multiple of these notetags to add more fixed equipment restrictions.
  108. #
  109. # <sealed equip: x>
  110. # <sealed equip: x, x>
  111. # This will seal the equip type x. Sealed equip slots mean that no equipment
  112. # can be equipped onto that equip type slot. This tag has been made so that
  113. # equip types can be sealed for equip type 5 and above. Use multiple of these
  114. # notetags to add more sealed equipment restrictions.
  115. #
  116. # -----------------------------------------------------------------------------
  117. # Armour Notetags - These notetags go in the armour notebox in the database.
  118. # -----------------------------------------------------------------------------
  119. # <equip type: x>
  120. # <equip type: string>
  121. # For the newer equip types, replace x or string with the equip type ID or the
  122. # name of the equip type respectively. This will set that armour to that
  123. # particular equip type.
  124. #
  125. # <fixed equip: x>
  126. # <fixed equip: x, x>
  127. # This will fix the equip type x. Fixed equip slots mean that the equipment
  128. # already on it are unable to be exchanged in or out by the player. This tag
  129. # has been made so that equip types can be fixed for equip type 5 and above.
  130. # Use multiple of these notetags to add more fixed equipment restrictions.
  131. #
  132. # <sealed equip: x>
  133. # <sealed equip: x, x>
  134. # This will seal the equip type x. Sealed equip slots mean that no equipment
  135. # can be equipped onto that equip type slot. This tag has been made so that
  136. # equip types can be sealed for equip type 5 and above. Use multiple of these
  137. # notetags to add more sealed equipment restrictions.
  138. #
  139. # -----------------------------------------------------------------------------
  140. # State Notetags - These notetags go in the states notebox in the database.
  141. # -----------------------------------------------------------------------------
  142. # <fixed equip: x>
  143. # <fixed equip: x, x>
  144. # This will fix the equip type x. Fixed equip slots mean that the equipment
  145. # already on it are unable to be exchanged in or out by the player. This tag
  146. # has been made so that equip types can be fixed for equip type 5 and above.
  147. # Use multiple of these notetags to add more fixed equipment restrictions.
  148. #
  149. # <sealed equip: x>
  150. # <sealed equip: x, x>
  151. # This will seal the equip type x. Sealed equip slots mean that no equipment
  152. # can be equipped onto that equip type slot. This tag has been made so that
  153. # equip types can be sealed for equip type 5 and above. Use multiple of these
  154. # notetags to add more sealed equipment restrictions.
  155. #
  156. #==============================================================================
  157. # ▼ Compatibility
  158. # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
  159. # This script is made strictly for RPG Maker VX Ace. It is highly unlikely that
  160. # it will run with RPG Maker VX without adjusting.
  161. #
  162. #==============================================================================

  163. module YEA
  164.   module EQUIP
  165.    
  166.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  167.     # - General Equip Settings -
  168.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  169.     # This adjusts the default equip configuration. While actors can have their
  170.     # own unique equipment configurations, it's recommended to not change too
  171.     # much as things get really hairy when it comes to proper eventing.
  172.     #
  173.     # ID   Equip Type
  174.     # ---  ------------
  175.     #  0   Weapon
  176.     #  1   Shield
  177.     #  2   Headgear
  178.     #  3   Bodygear
  179.     #  4   Accessory
  180.     #
  181.     # Whatever you set the below slots to, the dual wield setup will be exactly
  182.     # identical except that the second slot will be changed to a weapon (0).
  183.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  184.     # Adjust this array to set the default slots used for all of your actors
  185.     # and classes if they do not have a custom equipment slot setup.
  186.     DEFAULT_BASE_SLOTS = [ 0, 1, 2, 3, 4, 4]
  187.    
  188.     # This hash adjusts the new equip types (past 4+). Adjust them to match
  189.     # their names properly. You can choose to allow certain types of equipment
  190.     # be removable or not, or whether or not optimize will affect them.
  191.     TYPES ={
  192.     # TypeID => ["Type Name", Removable?, Optimize?],
  193.            0 => [ "右手",       true,      true],
  194.            1 => [ "左手",       true,      true],
  195.            2 => [ "头部",       true,      true],
  196.            3 => [ "身体",       true,      true],
  197.            4 => [ "饰品",       true,      true],
  198.            5 => [ "足部",       true,      true],
  199.            6 => [ "书籍",       true,      true],
  200.            7 => [ "腰带",       true,      true],
  201.     } # Do not remove this.
  202.    
  203.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  204.     # - Equip Command List -
  205.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  206.     # Here, you can adjust the order at which the commands appear (or even
  207.     # remove commands as you see fit). Here's a list of which does what:
  208.     #
  209.     # -------------------------------------------------------------------------
  210.     # :command         Description
  211.     # -------------------------------------------------------------------------
  212.     # :equip           Activates the manual equip window. Default.
  213.     # :optimize        Optimizes equipment for the actor. Default.
  214.     # :clear           Clears all equipment from the actor. Default
  215.     #
  216.     # And that's all of the currently available commands. This list will be
  217.     # updated as more scripts become available.
  218.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  219.     # This array arranges the order of which the commands appear in the Equip
  220.     # Command window in the Equip Scene.
  221.     COMMAND_LIST =[
  222.       :equip,
  223.       :optimize,
  224.       :clear,
  225.     # :custom1,
  226.     # :custom2,
  227.     ] # Do not remove this.
  228.    
  229.     #--------------------------------------------------------------------------
  230.     # - Equip Custom Commands -
  231.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  232.     # For those who use scripts to that may produce unique effects for
  233.     # equipping, use this hash to manage the custom commands for the Equip
  234.     # Command Window. You can disable certain commands or prevent them from
  235.     # appearing by using switches. If you don't wish to bind them to a switch,
  236.     # set the proper switch to 0 for it to have no impact.
  237.     #--------------------------------------------------------------------------
  238.     CUSTOM_EQUIP_COMMANDS ={
  239.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  240.       :custom1 => [ "Custom Name",            0,          0, :command_name1],
  241.       :custom2 => [ "Custom Text",           13,          0, :command_name2],
  242.     } # Do not remove this.
  243.    
  244.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  245.     # - Misc Window Settings -
  246.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  247.     # This section adjusts the minor visuals that you see inside of the newly
  248.     # organized Equip Scene. Adjust the settings as you see fit.
  249.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  250.     # This sets the font size used for the status window in the lower right
  251.     # corner of the screen (which shows stats and comparisons).
  252.     STATUS_FONT_SIZE = 20
  253.    
  254.     # This sets the remove equip command in the item window.
  255.     REMOVE_EQUIP_ICON = 185
  256.     REMOVE_EQUIP_TEXT = "<卸下>"
  257.    
  258.     # This sets the no-equipment text in the slot window.
  259.     NOTHING_ICON = 185
  260.     NOTHING_TEXT = "< 空 >"
  261.    
  262.    
  263.   end # EQUIP
  264. end # YEA

  265. #==============================================================================
  266. # ▼ Editting anything past this point may potentially result in causing
  267. # computer damage, incontinence, explosion of user's head, coma, death, and/or
  268. # halitosis so edit at your own risk.
  269. #==============================================================================

  270. module YEA
  271.   module REGEXP
  272.   module BASEITEM
  273.    
  274.     EQUIP_SLOTS_ON  = /<(?:EQUIP_SLOTS|equip slots)>/i
  275.     EQUIP_SLOTS_OFF = /<\/(?:EQUIP_SLOTS|equip slots)>/i
  276.    
  277.     EQUIP_TYPE_INT = /<(?:EQUIP_TYPE|equip type):[ ]*(\d+)>/i
  278.     EQUIP_TYPE_STR = /<(?:EQUIP_TYPE|equip type):[ ]*(.*)>/i
  279.    
  280.     STARTING_GEAR = /<(?:STARTING_GEAR|starting gear):[ ](\d+(?:\s*,\s*\d+)*)>/i
  281.    
  282.     FIXED_EQUIP = /<(?:FIXED_EQUIP|fixed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i
  283.     SEALED_EQUIP = /<(?:SEALED_EQUIP|sealed equip):[ ](\d+(?:\s*,\s*\d+)*)>/i
  284.    
  285.   end # BASEITEM
  286.   end # REGEXP
  287. end # YEA

  288. #==============================================================================
  289. # ■ Vocab
  290. #==============================================================================

  291. module Vocab
  292.   
  293.   #--------------------------------------------------------------------------
  294.   # overwrite method: self.etype
  295.   #--------------------------------------------------------------------------
  296.   def self.etype(etype)
  297.     return $data_system.terms.etypes[etype] if [0,1,2,3,4].include?(etype)
  298.     return YEA::EQUIP::TYPES[etype][0] if YEA::EQUIP::TYPES.include?(etype)
  299.     return ""
  300.   end
  301.   
  302. end # Vocab

  303. #==============================================================================
  304. # ■ Icon
  305. #==============================================================================

  306. module Icon
  307.   
  308.   #--------------------------------------------------------------------------
  309.   # self.remove_equip
  310.   #--------------------------------------------------------------------------
  311.   def self.remove_equip; return YEA::EQUIP::REMOVE_EQUIP_ICON; end
  312.   
  313.   #--------------------------------------------------------------------------
  314.   # self.nothing_equip
  315.   #--------------------------------------------------------------------------
  316.   def self.nothing_equip; return YEA::EQUIP::NOTHING_ICON; end
  317.    
  318. end # Icon

  319. #==============================================================================
  320. # ■ Numeric
  321. #==============================================================================

  322. class Numeric
  323.   
  324.   #--------------------------------------------------------------------------
  325.   # new method: group_digits
  326.   #--------------------------------------------------------------------------
  327.   unless $imported["YEA-CoreEngine"]
  328.   def group; return self.to_s; end
  329.   end # $imported["YEA-CoreEngine"]
  330.    
  331. end # Numeric

  332. #==============================================================================
  333. # ■ DataManager
  334. #==============================================================================

  335. module DataManager
  336.   
  337.   #--------------------------------------------------------------------------
  338.   # alias method: load_database
  339.   #--------------------------------------------------------------------------
  340.   class <<self; alias load_database_aee load_database; end
  341.   def self.load_database
  342.     load_database_aee
  343.     load_notetags_aee
  344.   end
  345.   
  346.   #--------------------------------------------------------------------------
  347.   # new method: load_notetags_aee
  348.   #--------------------------------------------------------------------------
  349.   def self.load_notetags_aee
  350.     groups = [$data_actors, $data_classes, $data_weapons, $data_armors,
  351.       $data_states]
  352.     for group in groups
  353.       for obj in group
  354.         next if obj.nil?
  355.         obj.load_notetags_aee
  356.       end
  357.     end
  358.   end
  359.   
  360. end # DataManager

  361. #==============================================================================
  362. # ■ RPG::BaseItem
  363. #==============================================================================

  364. class RPG::BaseItem
  365.   
  366.   #--------------------------------------------------------------------------
  367.   # public instance variables
  368.   #--------------------------------------------------------------------------
  369.   attr_accessor :base_equip_slots
  370.   attr_accessor :fixed_equip_type
  371.   attr_accessor :sealed_equip_type
  372.   attr_accessor :extra_starting_equips
  373.   
  374.   #--------------------------------------------------------------------------
  375.   # common cache: load_notetags_aee
  376.   #--------------------------------------------------------------------------
  377.   def load_notetags_aee
  378.     @base_equip_slots = []
  379.     @equip_slots_on = false
  380.     @fixed_equip_type = []
  381.     @sealed_equip_type = []
  382.     @extra_starting_equips = []
  383.     #---
  384.     self.note.split(/[\r\n]+/).each { |line|
  385.       case line
  386.       #---
  387.       when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_ON
  388.         next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)
  389.         @equip_slots_on = true
  390.       when YEA::REGEXP::BASEITEM::EQUIP_SLOTS_OFF
  391.         next unless self.is_a?(RPG::Actor) ||self.is_a?(RPG::Class)
  392.         @equip_slots_on = false
  393.       #---
  394.       when YEA::REGEXP::BASEITEM::STARTING_GEAR
  395.         next unless self.is_a?(RPG::Actor)
  396.         $1.scan(/\d+/).each { |num|
  397.         @extra_starting_equips.push(num.to_i) if num.to_i > 0 }
  398.       when YEA::REGEXP::BASEITEM::FIXED_EQUIP
  399.         $1.scan(/\d+/).each { |num|
  400.         @fixed_equip_type.push(num.to_i) if num.to_i > 0 }
  401.       when YEA::REGEXP::BASEITEM::SEALED_EQUIP
  402.         $1.scan(/\d+/).each { |num|
  403.         @sealed_equip_type.push(num.to_i) if num.to_i > 0 }
  404.       #---
  405.       when YEA::REGEXP::BASEITEM::EQUIP_TYPE_INT
  406.         next unless self.is_a?(RPG::Armor)
  407.         @etype_id = [1, $1.to_i].max
  408.       when YEA::REGEXP::BASEITEM::EQUIP_TYPE_STR
  409.         next unless self.is_a?(RPG::Armor)
  410.         for key in YEA::EQUIP::TYPES
  411.           id = key[0]
  412.           next if YEA::EQUIP::TYPES[id][0].upcase != $1.to_s.upcase
  413.           @etype_id = [1, id].max
  414.           break
  415.         end
  416.       #---
  417.       else
  418.         if @equip_slots_on
  419.           case line.upcase
  420.           when /EQUIP TYPE[ ](\d+)/i, /EQUIP TYPE:[ ](\d+)/i
  421.             id = $1.to_i
  422.             @base_equip_slots.push(id) if [0,1,2,3,4].include?(id)
  423.             @base_equip_slots.push(id) if YEA::EQUIP::TYPES.include?(id)
  424.           when /WEAPON/i
  425.             @base_equip_slots.push(0)
  426.           when /SHIELD/i
  427.             @base_equip_slots.push(1)
  428.           when /HEAD/i
  429.             @base_equip_slots.push(2)
  430.           when /BODY/i, /ARMOR/i, /ARMOUR/i
  431.             @base_equip_slots.push(3)
  432.           when /ETC/i, /OTHER/i, /ACCESSOR/i
  433.             @base_equip_slots.push(4)
  434.           else
  435.             text = line.upcase.delete(" ")
  436.             for key in YEA::EQUIP::TYPES
  437.               id = key[0]
  438.               next if YEA::EQUIP::TYPES[id][0].upcase.delete(" ")!= text
  439.               @base_equip_slots.push(id)
  440.               break
  441.             end
  442.           end
  443.         end
  444.       end
  445.     } # self.note.split
  446.     #---
  447.     return unless self.is_a?(RPG::Class)
  448.     if @base_equip_slots.empty?
  449.       @base_equip_slots = YEA::EQUIP::DEFAULT_BASE_SLOTS.clone
  450.     end
  451.   end
  452.   
  453. end # RPG::BaseItem

  454. #==============================================================================
  455. # ■ Game_Temp
  456. #==============================================================================

  457. class Game_Temp
  458.   
  459.   #--------------------------------------------------------------------------
  460.   # public instance variables
  461.   #--------------------------------------------------------------------------
  462.   attr_accessor :eds_actor
  463.   attr_accessor :scene_equip_index
  464.   attr_accessor :scene_equip_oy
  465.   
  466. end # Game_Temp

  467. #==============================================================================
  468. # ■ Game_BaseItem
  469. #==============================================================================

  470. class Game_BaseItem
  471.   
  472.   #--------------------------------------------------------------------------
  473.   # public instance variables
  474.   #--------------------------------------------------------------------------
  475.   attr_accessor :item_id
  476.   
  477. end # Game_BaseItem

  478. #==============================================================================
  479. # ■ Game_BattlerBase
  480. #==============================================================================

  481. class Game_BattlerBase
  482.   
  483.   #--------------------------------------------------------------------------
  484.   # alias method: equip_type_fixed?
  485.   #--------------------------------------------------------------------------
  486.   alias game_battlerbase_equip_type_fixed_aee equip_type_fixed?
  487.   def equip_type_fixed?(etype_id)
  488.     return true if fixed_etypes.include?(etype_id) if actor?
  489.     return game_battlerbase_equip_type_fixed_aee(etype_id)
  490.   end
  491.   
  492.   #--------------------------------------------------------------------------
  493.   # alias method: equip_type_sealed?
  494.   #--------------------------------------------------------------------------
  495.   alias game_battlerbase_equip_type_sealed_aee equip_type_sealed?
  496.   def equip_type_sealed?(etype_id)
  497.     return true if sealed_etypes.include?(etype_id) if actor?
  498.     return game_battlerbase_equip_type_sealed_aee(etype_id)
  499.   end
  500.   
  501. end # Game_BattlerBase

  502. #==============================================================================
  503. # ■ Game_Actor
  504. #==============================================================================

  505. class Game_Actor < Game_Battler
  506.   
  507.   #--------------------------------------------------------------------------
  508.   # alias method: init_equips
  509.   #--------------------------------------------------------------------------
  510.   alias game_actor_init_equips_aee init_equips
  511.   def init_equips(equips)
  512.     game_actor_init_equips_aee(equips)
  513.     equip_extra_starting_equips
  514.   end
  515.   
  516.   #--------------------------------------------------------------------------
  517.   # new method: equip_extra_starting_equips
  518.   #--------------------------------------------------------------------------
  519.   def equip_extra_starting_equips
  520.     for equip_id in actor.extra_starting_equips
  521.       armour = $data_armors[equip_id]
  522.       next if armour.nil?
  523.       etype_id = armour.etype_id
  524.       next unless equip_slots.include?(etype_id)
  525.       slot_id = empty_slot(etype_id)
  526.       @equips[slot_id].set_equip(etype_id == 0, armour.id)
  527.     end
  528.     refresh
  529.   end
  530.   
  531.   #--------------------------------------------------------------------------
  532.   # overwrite method: equip_slots
  533.   #--------------------------------------------------------------------------
  534.   def equip_slots
  535.     return equip_slots_dual if dual_wield?
  536.     return equip_slots_normal
  537.   end
  538.   
  539.   #--------------------------------------------------------------------------
  540.   # new method: equip_slots_normal
  541.   #--------------------------------------------------------------------------
  542.   def equip_slots_normal
  543.     return self.actor.base_equip_slots if self.actor.base_equip_slots != []
  544.     return self.class.base_equip_slots
  545.   end
  546.   
  547.   #--------------------------------------------------------------------------
  548.   # new method: equip_slots_dual
  549.   #--------------------------------------------------------------------------
  550.   def equip_slots_dual
  551.     array = equip_slots_normal.clone
  552.     array[1] = 0 if array.size >= 2
  553.     return array
  554.   end
  555.   
  556.   #--------------------------------------------------------------------------
  557.   # new method: fixed_etypes
  558.   #--------------------------------------------------------------------------
  559.   def fixed_etypes
  560.     array = []
  561.     array |= self.actor.fixed_equip_type
  562.     array |= self.class.fixed_equip_type
  563.     for equip in equips
  564.       next if equip.nil?
  565.       array |= equip.fixed_equip_type
  566.     end
  567.     for state in states
  568.       next if state.nil?
  569.       array |= state.fixed_equip_type
  570.     end
  571.     return array
  572.   end
  573.   
  574.   #--------------------------------------------------------------------------
  575.   # new method: sealed_etypes
  576.   #--------------------------------------------------------------------------
  577.   def sealed_etypes
  578.     array = []
  579.     array |= self.actor.sealed_equip_type
  580.     array |= self.class.sealed_equip_type
  581.     for equip in equips
  582.       next if equip.nil?
  583.       array |= equip.sealed_equip_type
  584.     end
  585.     for state in states
  586.       next if state.nil?
  587.       array |= state.sealed_equip_type
  588.     end
  589.     return array
  590.   end
  591.   
  592.   #--------------------------------------------------------------------------
  593.   # alias method: change_equip
  594.   #--------------------------------------------------------------------------
  595.   alias game_actor_change_equip_aee change_equip
  596.   def change_equip(slot_id, item)
  597.     if item.nil? && !@optimize_clear
  598.       etype_id = equip_slots[slot_id]
  599.       return unless YEA::EQUIP::TYPES[etype_id][1]
  600.     elsif item.nil? && @optimize_clear
  601.       etype_id = equip_slots[slot_id]
  602.       return unless YEA::EQUIP::TYPES[etype_id][2]
  603.     end
  604.     game_actor_change_equip_aee(slot_id, item)
  605.   end
  606.   
  607.   #--------------------------------------------------------------------------
  608.   # overwrite method: optimize_equipments
  609.   #--------------------------------------------------------------------------
  610.   def optimize_equipments
  611.     $game_temp.eds_actor = self
  612.     @optimize_clear = true
  613.     clear_equipments
  614.     @optimize_clear = false
  615.     equip_slots.size.times do |i|
  616.       next if !equip_change_ok?(i)
  617.       next unless can_optimize?(i)
  618.       items = $game_party.equip_items.select do |item|
  619.         item.etype_id == equip_slots[i] &&
  620.         equippable?(item) && item.performance >= 0
  621.       end
  622.       change_equip(i, items.max_by {|item| item.performance })
  623.     end
  624.     $game_temp.eds_actor = nil
  625.   end
  626.   
  627.   #--------------------------------------------------------------------------
  628.   # new method: can_optimize?
  629.   #--------------------------------------------------------------------------
  630.   def can_optimize?(slot_id)
  631.     etype_id = equip_slots[slot_id]
  632.     return YEA::EQUIP::TYPES[etype_id][2]
  633.   end
  634.   
  635. end # Game_Actor

  636. #==============================================================================
  637. # ■ Game_Interpreter
  638. #==============================================================================

  639. class Game_Interpreter
  640.   
  641.   #--------------------------------------------------------------------------
  642.   # overwrite method: change equip
  643.   #--------------------------------------------------------------------------
  644.   def command_319
  645.     actor = $game_actors[@params[0]]
  646.     return if actor.nil?
  647.     if @params[1] == 0 && @params[2] != 0
  648.       item = $data_weapons[@params[2]]
  649.       return unless actor.equip_slots.include?(0)
  650.       slot_id = actor.empty_slot(0)
  651.     elsif @params[2] != 0
  652.       item = $data_armors[@params[2]]
  653.       return unless actor.equip_slots.include?(item.etype_id)
  654.       slot_id = actor.empty_slot(item.etype_id)
  655.     else
  656.       slot_id = @params[1]
  657.     end
  658.     actor.change_equip_by_id(slot_id, @params[2])
  659.   end
  660.   
  661. end # Game_Interpreter

  662. #==============================================================================
  663. # ■ Window_EquipStatus
  664. #==============================================================================

  665. class Window_EquipStatus < Window_Base
  666.   
  667.   #--------------------------------------------------------------------------
  668.   # overwrite method: initialize
  669.   #--------------------------------------------------------------------------
  670.   def initialize(dx, dy)
  671.     super(dx, dy, window_width, Graphics.height - dy)
  672.     @actor = nil
  673.     @temp_actor = nil
  674.     refresh
  675.   end
  676.   
  677.   #--------------------------------------------------------------------------
  678.   # overwrite method: window_width
  679.   #--------------------------------------------------------------------------
  680.   def window_width; return Graphics.width * 2 / 5; end
  681.   
  682.   #--------------------------------------------------------------------------
  683.   # overwrite method: refresh
  684.   #--------------------------------------------------------------------------
  685.   def refresh
  686.     contents.clear
  687.     8.times {|i| draw_item(0, line_height * i, i) }
  688.   end
  689.   
  690.   #--------------------------------------------------------------------------
  691.   # overwrite method: draw_item
  692.   #--------------------------------------------------------------------------
  693.   def draw_item(dx, dy, param_id)
  694.     draw_background_colour(dx, dy)
  695.     draw_param_name(dx + 4, dy, param_id)
  696.     draw_current_param(dx + 4, dy, param_id) if @actor
  697.     drx = (contents.width + 22) / 2
  698.     draw_right_arrow(drx, dy)
  699.     draw_new_param(drx + 22, dy, param_id) if @temp_actor
  700.     reset_font_settings
  701.   end
  702.   
  703.   #--------------------------------------------------------------------------
  704.   # new method: draw_background_colour
  705.   #--------------------------------------------------------------------------
  706.   def draw_background_colour(dx, dy)
  707.     colour = Color.new(0, 0, 0, translucent_alpha/2)
  708.     rect = Rect.new(dx+1, dy+1, contents.width - 2, line_height - 2)
  709.     contents.fill_rect(rect, colour)
  710.   end
  711.   
  712.   #--------------------------------------------------------------------------
  713.   # overwrite method: draw_param_name
  714.   #--------------------------------------------------------------------------
  715.   def draw_param_name(dx, dy, param_id)
  716.     contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  717.     change_color(system_color)
  718.     draw_text(dx, dy, contents.width, line_height, Vocab::param(param_id))
  719.   end
  720.   
  721.   #--------------------------------------------------------------------------
  722.   # overwrite method: draw_current_param
  723.   #--------------------------------------------------------------------------
  724.   def draw_current_param(dx, dy, param_id)
  725.     change_color(normal_color)
  726.     dw = (contents.width + 22) / 2
  727.     draw_text(0, dy, dw, line_height, @actor.param(param_id).group, 2)
  728.     reset_font_settings
  729.   end
  730.   
  731.   #--------------------------------------------------------------------------
  732.   # overwrite method: draw_new_param
  733.   #--------------------------------------------------------------------------
  734.   def draw_new_param(dx, dy, param_id)
  735.     contents.font.size = YEA::EQUIP::STATUS_FONT_SIZE
  736.     new_value = @temp_actor.param(param_id)
  737.     change_color(param_change_color(new_value - @actor.param(param_id)))
  738.     draw_text(0, dy, contents.width-4, line_height, new_value.group, 2)
  739.     reset_font_settings
  740.   end
  741.   
  742. end # Window_EquipStatus

  743. #==============================================================================
  744. # ■ Window_EquipCommand
  745. #==============================================================================

  746. class Window_EquipCommand < Window_HorzCommand
  747.   
  748.   #--------------------------------------------------------------------------
  749.   # overwrite method: make_command_list
  750.   #--------------------------------------------------------------------------
  751.   def make_command_list
  752.     for command in YEA::EQUIP::COMMAND_LIST
  753.       case command
  754.       when :equip
  755.         add_command(Vocab::equip2, :equip)
  756.       when :optimize
  757.         add_command(Vocab::optimize, :optimize)
  758.       when :clear
  759.         add_command(Vocab::clear, :clear)
  760.       else
  761.         process_custom_command(command)
  762.       end
  763.     end
  764.   end
  765.   
  766.   #--------------------------------------------------------------------------
  767.   # process_ok
  768.   #--------------------------------------------------------------------------
  769.   def process_ok
  770.     $game_temp.scene_equip_index = index
  771.     $game_temp.scene_equip_oy = self.oy
  772.     super
  773.   end
  774.   
  775.   #--------------------------------------------------------------------------
  776.   # new method: process_custom_command
  777.   #--------------------------------------------------------------------------
  778.   def process_custom_command(command)
  779.     return unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)
  780.     show = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][2]
  781.     continue = show <= 0 ? true : $game_switches[show]
  782.     return unless continue
  783.     text = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][0]
  784.     switch = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][1]
  785.     enabled = switch <= 0 ? true : $game_switches[switch]
  786.     add_command(text, command, enabled)
  787.   end
  788.   
  789.   #--------------------------------------------------------------------------
  790.   # overwrite method: window_width
  791.   #--------------------------------------------------------------------------
  792.   def window_width; return 160; end
  793.   
  794.   #--------------------------------------------------------------------------
  795.   # overwrite method: contents_width
  796.   #--------------------------------------------------------------------------
  797.   def contents_width; return width - standard_padding * 2; end
  798.   
  799.   #--------------------------------------------------------------------------
  800.   # overwrite method: contents_height
  801.   #--------------------------------------------------------------------------
  802.   def contents_height
  803.     ch = height - standard_padding * 2
  804.     return [ch - ch % item_height, row_max * item_height].max
  805.   end
  806.   
  807.   #--------------------------------------------------------------------------
  808.   # overwrite method: visible_line_number
  809.   #--------------------------------------------------------------------------
  810.   def visible_line_number; return 4; end
  811.   
  812.   #--------------------------------------------------------------------------
  813.   # overwrite method: col_max
  814.   #--------------------------------------------------------------------------
  815.   def col_max; return 1; end
  816.    
  817.   #--------------------------------------------------------------------------
  818.   # overwrite method: item_rect
  819.   #--------------------------------------------------------------------------
  820.   def item_rect(index)
  821.     rect = Rect.new
  822.     rect.width = item_width
  823.     rect.height = item_height
  824.     rect.x = index % col_max * (item_width + spacing)
  825.     rect.y = index / col_max * item_height
  826.     rect
  827.   end
  828.   
  829.   #--------------------------------------------------------------------------
  830.   # overwrite method: ensure_cursor_visible
  831.   #--------------------------------------------------------------------------
  832.   def ensure_cursor_visible
  833.     self.top_row = row if row < top_row
  834.     self.bottom_row = row if row > bottom_row
  835.   end
  836.    
  837.   #--------------------------------------------------------------------------
  838.   # overwrite method: cursor_down
  839.   #--------------------------------------------------------------------------
  840.   def cursor_down(wrap = false)
  841.     if index < item_max - col_max || (wrap && col_max == 1)
  842.       select((index + col_max) % item_max)
  843.     end
  844.   end
  845.   
  846.   #--------------------------------------------------------------------------
  847.   # overwrite method: cursor_up
  848.   #--------------------------------------------------------------------------
  849.   def cursor_up(wrap = false)
  850.     if index >= col_max || (wrap && col_max == 1)
  851.       select((index - col_max + item_max) % item_max)
  852.     end
  853.   end
  854.   
  855.   #--------------------------------------------------------------------------
  856.   # overwrite method: process_pageup
  857.   #--------------------------------------------------------------------------
  858.   def process_pageup
  859.     Sound.play_cursor
  860.     Input.update
  861.     deactivate
  862.     call_handler(:pageup)
  863.   end
  864.   
  865.   #--------------------------------------------------------------------------
  866.   # overwrite method: process_pagedown
  867.   #--------------------------------------------------------------------------
  868.   def process_pagedown
  869.     Sound.play_cursor
  870.     Input.update
  871.     deactivate
  872.     call_handler(:pagedown)
  873.   end
  874.   
  875. end # Window_EquipCommand

  876. #==============================================================================
  877. # ■ Window_EquipSlot
  878. #==============================================================================

  879. class Window_EquipSlot < Window_Selectable
  880.   
  881.   #--------------------------------------------------------------------------
  882.   # overwrite method: initialize
  883.   #--------------------------------------------------------------------------
  884.   def initialize(dx, dy, dw)
  885.     super(dx, dy, dw, Graphics.height - dy)
  886.     @actor = nil
  887.     refresh
  888.   end
  889.   
  890.   #--------------------------------------------------------------------------
  891.   # overwrite method: window_height
  892.   #--------------------------------------------------------------------------
  893.   def window_height; return self.height; end
  894.   
  895.   #--------------------------------------------------------------------------
  896.   # overwrite method: visible_line_number
  897.   #--------------------------------------------------------------------------
  898.   def visible_line_number; return item_max; end
  899.   
  900.   #--------------------------------------------------------------------------
  901.   # overwrite method: refresh
  902.   #--------------------------------------------------------------------------
  903.   def refresh
  904.     create_contents
  905.     super
  906.   end
  907.   
  908.   #--------------------------------------------------------------------------
  909.   # overwrite method: draw_item
  910.   #--------------------------------------------------------------------------
  911.   def draw_item(index)
  912.     return unless @actor
  913.     rect = item_rect_for_text(index)
  914.     change_color(system_color, enable?(index))
  915.     draw_text(rect.x, rect.y, 92, line_height, slot_name(index))
  916.     item = @actor.equips[index]
  917.     dx = rect.x + 92
  918.     dw = contents.width - dx - 24
  919.     if item.nil?
  920.       draw_nothing_equip(dx, rect.y, false, dw)
  921.     else
  922.       draw_item_name(item, dx, rect.y, enable?(index), dw)
  923.     end
  924.   end
  925.   
  926.   #--------------------------------------------------------------------------
  927.   # new method: draw_nothing_equip
  928.   #--------------------------------------------------------------------------
  929.   def draw_nothing_equip(dx, dy, enabled, dw)
  930.     change_color(normal_color, enabled)
  931.     draw_icon(Icon.nothing_equip, dx, dy, enabled)
  932.     text = YEA::EQUIP::NOTHING_TEXT
  933.     draw_text(dx + 24, dy, dw - 24, line_height, text)
  934.   end
  935.   
  936. end # Window_EquipSlot

  937. #==============================================================================
  938. # ■ Window_EquipItem
  939. #==============================================================================

  940. class Window_EquipItem < Window_ItemList
  941.   
  942.   #--------------------------------------------------------------------------
  943.   # overwrite method: col_max
  944.   #--------------------------------------------------------------------------
  945.   def col_max; return 1; end
  946.   
  947.   #--------------------------------------------------------------------------
  948.   # overwrite method: slot_id=
  949.   #--------------------------------------------------------------------------
  950.   def slot_id=(slot_id)
  951.     return if @slot_id == slot_id
  952.     @slot_id = slot_id
  953.     @last_item = nil
  954.     self.oy = 0
  955.   end
  956.   
  957.   #--------------------------------------------------------------------------
  958.   # overwrite method: draw_item
  959.   #--------------------------------------------------------------------------
  960.   def draw_item(index)
  961.     item = @data[index]
  962.     rect = item_rect(index)
  963.     rect.width -= 4
  964.     if item.nil?
  965.       draw_remove_equip(rect)
  966.       return
  967.     end
  968.     dw = contents.width - rect.x - 24
  969.     draw_item_name(item, rect.x, rect.y, enable?(item), dw)
  970.     draw_item_number(rect, item)
  971.   end
  972.   
  973.   #--------------------------------------------------------------------------
  974.   # new method: draw_remove_equip
  975.   #--------------------------------------------------------------------------
  976.   def draw_remove_equip(rect)
  977.     draw_icon(Icon.remove_equip, rect.x, rect.y)
  978.     text = YEA::EQUIP::REMOVE_EQUIP_TEXT
  979.     rect.x += 24
  980.     rect.width -= 24
  981.     draw_text(rect, text)
  982.   end
  983.   
  984.   #--------------------------------------------------------------------------
  985.   # overwrite method: include?
  986.   #--------------------------------------------------------------------------
  987.   def include?(item)
  988.     if item.nil? && !@actor.nil?
  989.       etype_id = @actor.equip_slots[@slot_id]
  990.       return YEA::EQUIP::TYPES[etype_id][1]
  991.     end
  992.     return true if item.nil?
  993.     return false unless item.is_a?(RPG::EquipItem)
  994.     return false if @slot_id < 0
  995.     return false if item.etype_id != @actor.equip_slots[@slot_id]
  996.     return @actor.equippable?(item)
  997.   end
  998.   
  999.   #--------------------------------------------------------------------------
  1000.   # overwrite method: enable?
  1001.   #--------------------------------------------------------------------------
  1002.   def enable?(item)
  1003.     if item.nil? && !@actor.nil?
  1004.       etype_id = @actor.equip_slots[@slot_id]
  1005.       return YEA::EQUIP::TYPES[etype_id][1]
  1006.     end
  1007.     return @actor.equippable?(item)
  1008.   end
  1009.   
  1010.   #--------------------------------------------------------------------------
  1011.   # new method: show
  1012.   #--------------------------------------------------------------------------
  1013.   def show
  1014.     @last_item = 0
  1015.     update_help
  1016.     super
  1017.   end
  1018.   
  1019.   #--------------------------------------------------------------------------
  1020.   # overwrite method: update_help
  1021.   #--------------------------------------------------------------------------
  1022.   def update_help
  1023.     super
  1024.     return if @actor.nil?
  1025.     return if @status_window.nil?
  1026.     return if @last_item == item
  1027.     @last_item = item
  1028.     temp_actor = Marshal.load(Marshal.dump(@actor))
  1029.     temp_actor.force_change_equip(@slot_id, item)
  1030.     @status_window.set_temp_actor(temp_actor)
  1031.   end
  1032.   
  1033. end # Window_EquipItem

  1034. #==============================================================================
  1035. # ■ Window_EquipActor
  1036. #==============================================================================

  1037. class Window_EquipActor < Window_Base
  1038.   
  1039.   #--------------------------------------------------------------------------
  1040.   # initialize
  1041.   #--------------------------------------------------------------------------
  1042.   def initialize(dx, dy)
  1043.     super(dx, dy, window_width, fitting_height(4))
  1044.     @actor = nil
  1045.   end
  1046.   
  1047.   #--------------------------------------------------------------------------
  1048.   # window_width
  1049.   #--------------------------------------------------------------------------
  1050.   def window_width; return Graphics.width - 160; end
  1051.   
  1052.   #--------------------------------------------------------------------------
  1053.   # actor=
  1054.   #--------------------------------------------------------------------------
  1055.   def actor=(actor)
  1056.     return if @actor == actor
  1057.     @actor = actor
  1058.     refresh
  1059.   end
  1060.   
  1061.   #--------------------------------------------------------------------------
  1062.   # refresh
  1063.   #--------------------------------------------------------------------------
  1064.   def refresh
  1065.     contents.clear
  1066.     return unless @actor
  1067.     draw_actor_face(@actor, 0, 0)
  1068.     draw_actor_simple_status(@actor, 108, line_height / 2)
  1069.   end
  1070.   
  1071. end # Window_EquipActor

  1072. #==============================================================================
  1073. # ■ Scene_Equip
  1074. #==============================================================================

  1075. class Scene_Equip < Scene_MenuBase
  1076.   
  1077.   #--------------------------------------------------------------------------
  1078.   # overwrite method: create_status_window
  1079.   #--------------------------------------------------------------------------
  1080.   def create_status_window
  1081.     wx = Graphics.width - (Graphics.width * 2 / 5)
  1082.     wy = @help_window.height + 120
  1083.     @status_window = Window_EquipStatus.new(wx, wy)
  1084.     @status_window.viewport = @viewport
  1085.     @status_window.actor = @actor
  1086.   end
  1087.   
  1088.   #--------------------------------------------------------------------------
  1089.   # overwrite method: create_command_window
  1090.   #--------------------------------------------------------------------------
  1091.   def create_command_window
  1092.      
  1093.     wx = 0
  1094.     wy = @help_window.height
  1095.     ww = 160
  1096.     @command_window = Window_EquipCommand.new(wx, wy, ww)
  1097.     @command_window.viewport = @viewport
  1098.     @command_window.help_window = @help_window
  1099.     if !$game_temp.scene_equip_index.nil?
  1100.       @command_window.select($game_temp.scene_equip_index)
  1101.       @command_window.oy = $game_temp.scene_equip_oy
  1102.     end
  1103.     $game_temp.scene_equip_index = nil
  1104.     $game_temp.scene_equip_oy = nil
  1105.     @command_window.set_handler(:equip,    method(:command_equip))
  1106.     @command_window.set_handler(:optimize, method(:command_optimize))
  1107.     @command_window.set_handler(:clear,    method(:command_clear))
  1108.     @command_window.set_handler(:cancel,   method(:return_scene))
  1109.     @command_window.set_handler(:pagedown, method(:next_actor))
  1110.     @command_window.set_handler(:pageup,   method(:prev_actor))
  1111.     process_custom_equip_commands
  1112.     create_actor_window
  1113.   end
  1114.   
  1115.   #--------------------------------------------------------------------------
  1116.   # new method: create_actor_window
  1117.   #--------------------------------------------------------------------------
  1118.   def create_actor_window
  1119.     wy = @help_window.height
  1120.     @actor_window = Window_EquipActor.new(@command_window.width, wy)
  1121.     @actor_window.viewport = @viewport
  1122.     @actor_window.actor = @actor
  1123.   end
  1124.   
  1125.   #--------------------------------------------------------------------------
  1126.   # new method: process_custom_equip_commands
  1127.   #--------------------------------------------------------------------------
  1128.   def process_custom_equip_commands
  1129.     for command in YEA::EQUIP::COMMAND_LIST
  1130.       next unless YEA::EQUIP::CUSTOM_EQUIP_COMMANDS.include?(command)
  1131.       called_method = YEA::EQUIP::CUSTOM_EQUIP_COMMANDS[command][3]
  1132.       @command_window.set_handler(command, method(called_method))
  1133.     end
  1134.   end
  1135.   
  1136.   #--------------------------------------------------------------------------
  1137.   # overwrite method: create_slot_window
  1138.   #--------------------------------------------------------------------------
  1139.   def create_slot_window
  1140.     wx = 0
  1141.     wy = @command_window.y + @command_window.height
  1142.     ww = Graphics.width - @status_window.width
  1143.     @slot_window = Window_EquipSlot.new(wx, wy, ww)
  1144.     @slot_window.viewport = @viewport
  1145.     @slot_window.help_window = @help_window
  1146.     @slot_window.status_window = @status_window
  1147.     @slot_window.actor = @actor
  1148.     @slot_window.set_handler(:ok,       method(:on_slot_ok))
  1149.     @slot_window.set_handler(:cancel,   method(:on_slot_cancel))
  1150.   end
  1151.   
  1152.   #--------------------------------------------------------------------------
  1153.   # overwrite method: create_item_window
  1154.   #--------------------------------------------------------------------------
  1155.   def create_item_window
  1156.     wx = @slot_window.x
  1157.     wy = @slot_window.y
  1158.     ww = @slot_window.width
  1159.     wh = @slot_window.height
  1160.     @item_window = Window_EquipItem.new(wx, wy, ww, wh)
  1161.     @item_window.viewport = @viewport
  1162.     @item_window.help_window = @help_window
  1163.     @item_window.status_window = @status_window
  1164.     @item_window.actor = @actor
  1165.     @item_window.set_handler(:ok,     method(:on_item_ok))
  1166.     @item_window.set_handler(:cancel, method(:on_item_cancel))
  1167.     @slot_window.item_window = @item_window
  1168.     @item_window.hide
  1169.   end
  1170.   
  1171.   #--------------------------------------------------------------------------
  1172.   # alias method: command_optimize
  1173.   #--------------------------------------------------------------------------
  1174.   alias scene_equip_command_optimize_aee command_optimize
  1175.   def command_optimize
  1176.     scene_equip_command_optimize_aee
  1177.     @actor_window.refresh
  1178.   end
  1179.   
  1180.   #--------------------------------------------------------------------------
  1181.   # alias method: command_clear
  1182.   #--------------------------------------------------------------------------
  1183.   alias scene_equip_command_clear_aee command_clear
  1184.   def command_clear
  1185.     scene_equip_command_clear_aee
  1186.     @actor_window.refresh
  1187.   end
  1188.   
  1189.   #--------------------------------------------------------------------------
  1190.   # alias method: on_slot_ok
  1191.   #--------------------------------------------------------------------------
  1192.   alias scene_equip_on_slot_ok_aee on_slot_ok
  1193.   def on_slot_ok
  1194.     scene_equip_on_slot_ok_aee
  1195.     @slot_window.hide
  1196.     @item_window.refresh
  1197.     @item_window.show
  1198.   end
  1199.   
  1200.   #--------------------------------------------------------------------------
  1201.   # alias method: on_item_ok
  1202.   #--------------------------------------------------------------------------
  1203.   alias scene_equip_on_item_ok_aee on_item_ok
  1204.   def on_item_ok
  1205.     scene_equip_on_item_ok_aee
  1206.     @actor_window.refresh
  1207.     @slot_window.show
  1208.     @item_window.hide
  1209.   end
  1210.   
  1211.   #--------------------------------------------------------------------------
  1212.   # alias method: on_item_cancel
  1213.   #--------------------------------------------------------------------------
  1214.   alias scene_equip_on_item_cancel_aee on_item_cancel
  1215.   def on_item_cancel
  1216.     scene_equip_on_item_cancel_aee
  1217.     @slot_window.show
  1218.     @item_window.hide
  1219.   end
  1220.   
  1221.   #--------------------------------------------------------------------------
  1222.   # alias method: on_actor_change
  1223.   #--------------------------------------------------------------------------
  1224.   alias scene_equip_on_actor_change_aee on_actor_change
  1225.   def on_actor_change
  1226.     scene_equip_on_actor_change_aee
  1227.     @actor_window.actor = @actor
  1228.   end
  1229.   
  1230.   #--------------------------------------------------------------------------
  1231.   # new method: command_name1
  1232.   #--------------------------------------------------------------------------
  1233.   def command_name1
  1234.     # Do nothing.
  1235.   end
  1236.   
  1237.   #--------------------------------------------------------------------------
  1238.   # new method: command_name2
  1239.   #--------------------------------------------------------------------------
  1240.   def command_name2
  1241.     # Do nothing.
  1242.   end
  1243.   
  1244. end # Scene_Equip

  1245. #==============================================================================
  1246. #
  1247. # ▼ End of File
  1248. #
  1249. #==============================================================================
复制代码

评分

参与人数 1星屑 +150 收起 理由
RaidenInfinity + 150 认可答案

查看全部评分

回复

使用道具 举报

梦石
0
星屑
50
在线时间
23 小时
注册时间
2017-2-25
回帖
3
 楼主| 发表于 2017-2-28 19:10:05 | 显示全部楼层
百里_飞柳 发表于 2017-2-28 17:28
1.https://taroxd.github.io/rgss/ 中的 https://taroxd.github.io/rgss/Taroxd%E5%9F%BA%E7%A1%80%E8%AE%B ...

多谢大佬
回复

使用道具 举报

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

本版积分规则

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

在本版发帖返回顶部