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

Project1

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

[已经解决] 如何去掉装备佩戴类型?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
38
在线时间
1165 小时
注册时间
2012-3-16
帖子
5336
跳转到指定楼层
1
 楼主| 发表于 2013-3-7 21:11:46 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
就是说我武器可以装备到头盔、身体什么的地方,武器和防具可以随意装备没有分类~
或者实现可以佩戴4个饰品,头盔什么的都不要了~
@protosssonny P叔会不会0w0/
我想要到的是保护同伴的力量,能与同伴一起欢笑的未来的力量,如果无法做到的话,那就无需继承,如果是这样的彭格列的话,那我亲手毁掉它!
  
                       欢迎加入我们的家族~

Lv1.梦旅人

梦石
0
星屑
38
在线时间
1165 小时
注册时间
2012-3-16
帖子
5336
2
 楼主| 发表于 2013-3-7 21:13:56 | 只看该作者
貌似装备扩张脚本也能实现来着~有的话求脚本0w0/

点评

VA什么的没有研究过,VX倒是简单。话说刚想按VX区版规扣除你20经验,却发现是VA区,于是飘走了~  发表于 2013-3-7 21:27
我想要到的是保护同伴的力量,能与同伴一起欢笑的未来的力量,如果无法做到的话,那就无需继承,如果是这样的彭格列的话,那我亲手毁掉它!
  
                       欢迎加入我们的家族~
回复 支持 反对

使用道具 举报

Lv3.寻梦者

虚空人形

梦石
0
星屑
4604
在线时间
2037 小时
注册时间
2011-8-11
帖子
3398

贵宾

3
发表于 2013-3-9 09:24:19 | 只看该作者
本帖最后由 hcm 于 2013-4-3 12:07 编辑

使用时查找   DEFAULT_BASE_SLOTS = [ 0,1,1, 4, 4, 4, 2,](多个相同数字表示同类装备)
总的来说就是装备类型和数量完全在这里设定(对应数据库——系统——用语),
可以完全修改原本的装备配置,没有武器全部饰品也可以
  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,1, 4, 4, 4, 2,]
  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 => [   "武器",      false,      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.     } # Do not remove this.
  201.    
  202.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  203.     # - Equip Command List -
  204.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  205.     # Here, you can adjust the order at which the commands appear (or even
  206.     # remove commands as you see fit). Here's a list of which does what:
  207.     #
  208.     # -------------------------------------------------------------------------
  209.     # :command         Description
  210.     # -------------------------------------------------------------------------
  211.     # :equip           Activates the manual equip window. Default.
  212.     # :optimize        Optimizes equipment for the actor. Default.
  213.     # :clear           Clears all equipment from the actor. Default
  214.     #
  215.     # And that's all of the currently available commands. This list will be
  216.     # updated as more scripts become available.
  217.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  218.     # This array arranges the order of which the commands appear in the Equip
  219.     # Command window in the Equip Scene.
  220.     COMMAND_LIST =[
  221.       :equip,
  222.       :optimize,
  223.       :clear,
  224.     # :custom1,
  225.     # :custom2,
  226.     ] # Do not remove this.
  227.    
  228.     #--------------------------------------------------------------------------
  229.     # - Equip Custom Commands -
  230.     # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  231.     # For those who use scripts to that may produce unique effects for
  232.     # equipping, use this hash to manage the custom commands for the Equip
  233.     # Command Window. You can disable certain commands or prevent them from
  234.     # appearing by using switches. If you don't wish to bind them to a switch,
  235.     # set the proper switch to 0 for it to have no impact.
  236.     #--------------------------------------------------------------------------
  237.     CUSTOM_EQUIP_COMMANDS ={
  238.     # :command => ["Display Name", EnableSwitch, ShowSwitch, Handler Method],
  239.       :custom1 => [ "Custom Name",            0,          0, :command_name1],
  240.       :custom2 => [ "Custom Text",           13,          0, :command_name2],
  241.     } # Do not remove this.
  242.    
  243.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  244.     # - Misc Window Settings -
  245.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  246.     # This section adjusts the minor visuals that you see inside of the newly
  247.     # organized Equip Scene. Adjust the settings as you see fit.
  248.     #=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  249.     # This sets the font size used for the status window in the lower right
  250.     # corner of the screen (which shows stats and comparisons).
  251.     STATUS_FONT_SIZE = 20
  252.    
  253.     # This sets the remove equip command in the item window.
  254.     REMOVE_EQUIP_ICON = 185
  255.     REMOVE_EQUIP_TEXT = "<Remove Equip>"
  256.    
  257.     # This sets the no-equipment text in the slot window.
  258.     NOTHING_ICON = 185
  259.     NOTHING_TEXT = "<Empty>"
  260.    
  261.    
  262.   end # EQUIP
  263. end # YEA

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

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

  287. #==============================================================================
  288. # ■ Vocab
  289. #==============================================================================

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

  302. #==============================================================================
  303. # ■ Icon
  304. #==============================================================================

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

  318. #==============================================================================
  319. # ■ Numeric
  320. #==============================================================================

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

  331. #==============================================================================
  332. # ■ DataManager
  333. #==============================================================================

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

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

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

  453. #==============================================================================
  454. # ■ Game_Temp
  455. #==============================================================================

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

  466. #==============================================================================
  467. # ■ Game_BaseItem
  468. #==============================================================================

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

  477. #==============================================================================
  478. # ■ Game_BattlerBase
  479. #==============================================================================

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

  501. #==============================================================================
  502. # ■ Game_Actor
  503. #==============================================================================

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

  635. #==============================================================================
  636. # ■ Game_Interpreter
  637. #==============================================================================

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

  661. #==============================================================================
  662. # ■ Window_EquipStatus
  663. #==============================================================================

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

  742. #==============================================================================
  743. # ■ Window_EquipCommand
  744. #==============================================================================

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

  875. #==============================================================================
  876. # ■ Window_EquipSlot
  877. #==============================================================================

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

  936. #==============================================================================
  937. # ■ Window_EquipItem
  938. #==============================================================================

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

  1033. #==============================================================================
  1034. # ■ Window_EquipActor
  1035. #==============================================================================

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

  1071. #==============================================================================
  1072. # ■ Scene_Equip
  1073. #==============================================================================

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

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

评分

参与人数 1梦石 +1 收起 理由
Mic_洛洛 + 1 认可答案

查看全部评分

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-10-6 19:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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