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

Project1

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

[已经过期] 为什么不能显示商店和物品栏的信息!!着急

[复制链接]

Lv1.梦旅人

梦石
0
星屑
50
在线时间
114 小时
注册时间
2012-4-25
帖子
163
跳转到指定楼层
1
 楼主| 发表于 2013-2-10 18:13:00 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
RUBY 代码复制
  1. #==============================================================================
  2. # 禾西製作 / Created by Quarcy
  3. #==============================================================================
  4. class Window_Help < Window_Base
  5.   attr_reader :materia
  6.   #--------------------------------------------------------------------------
  7.   # ● 定義不顯示的屬性與狀態
  8.   #--------------------------------------------------------------------------
  9.   def unshown
  10.     @unshow_elements = [17, 18]
  11.     @unshow_states = []
  12.   end
  13.   #--------------------------------------------------------------------------
  14.   # ● 初始化對象
  15.   #--------------------------------------------------------------------------
  16.   def initialize
  17.     super(0, 0, 640, 64)
  18.     self.opacity = 150
  19.     self.z=150
  20.     self.visible = false
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 設置文本
  24.   #     data  : 窗口顯示的字符串/物品資料
  25.   #     align : 對齊方式 (0..左對齊、1..中間對齊、2..右對齊)
  26.   #--------------------------------------------------------------------------
  27.   def set_text(data, align=0)
  28.     #------------------------------------------------------------------------
  29.     # ● 當資料爲文字時候
  30.     #------------------------------------------------------------------------
  31.     # 如果文本或對齊方式至少一方与上次的不同
  32.     if data != @text or align != @align
  33.       if data.is_a?(String)
  34.         # 再描繪文本
  35.         self.width = 640
  36.         self.height = 64
  37.         self.x=0
  38.         self.y=0
  39.         self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  40.         self.contents.clear
  41.         self.contents.font.color = normal_color
  42.         self.contents.font.size = 20
  43.         self.contents.draw_text(4, 0, self.width - 40, 32, data, align)
  44.         @text = data
  45.         @align = align
  46.         [url=home.php?mod=space&uid=95897]@actor[/url] = nil
  47.         self.visible = true
  48.       end
  49.     end
  50.     return if data.is_a?(String)
  51.     #------------------------------------------------------------------------
  52.     # ● 當沒有資料時候
  53.     #------------------------------------------------------------------------
  54.     if data.nil?
  55.       self.visible=false
  56.     else
  57.       self.visible=true
  58.     end
  59.     #------------------------------------------------------------------------
  60.     # ● 當資料爲物品/技能時候
  61.     #------------------------------------------------------------------------
  62.     if data != nil && @data != data
  63.       self.width = 210
  64.       self.height = 430
  65.       self.x=0
  66.       self.y=200
  67.       unshown
  68.       non_auto_update(data)
  69.     else
  70.       return
  71.     end
  72.   end
  73.   #--------------------------------------------------------------------------
  74.   # ● 更新帮助窗口
  75.   #--------------------------------------------------------------------------
  76.   def non_auto_update(data=@data)
  77.     @data = data
  78.     case @data
  79.     when RPG::Item
  80.       set_item_text(@data)
  81.     when RPG::Weapon
  82.       set_equipment_text(@data)
  83.     when RPG::Armor
  84.       set_equipment_text(@data)
  85.     when RPG::Skill
  86.       set_skill_text(@data)
  87.     end
  88.   end
  89.   #--------------------------------------------------------------------------
  90.   # ● 裝備帮助窗口
  91.   #--------------------------------------------------------------------------
  92.   def set_equipment_text(equipment)
  93.     #------------------------------------------------------------------------
  94.     # ● 取得基本質料
  95.     #------------------------------------------------------------------------
  96.     # 取得屬性、附加狀態、解除狀態之副本
  97.     case equipment
  98.     when RPG::Weapon
  99.       element_set = equipment.element_set.clone
  100.       plus_state_set = equipment.plus_state_set.clone
  101.       minus_state_set = equipment.minus_state_set.clone
  102.       #----------------------#
  103.       # 過濾不顯示的狀態描述 #
  104.       #----------------------#
  105.       plus_state_set -= @unshow_states
  106.       minus_state_set -= @unshow_states
  107.     when RPG::Armor
  108.       element_set = equipment.guard_element_set.clone
  109.       guard_state_set = equipment.guard_state_set.clone
  110.       #----------------------#
  111.       # 過濾不顯示的狀態描述 #
  112.       #----------------------#
  113.       auto_state_id = equipment.auto_state_id
  114.       guard_state_set -= @unshow_states
  115.     end
  116.     #----------------------#
  117.     # 過濾不顯示的屬性描述 #
  118.     #----------------------#
  119.     element_set -= @unshow_elements
  120.     #--------------#
  121.     # 取得說明文字 #
  122.     #--------------#
  123.     description = equipment.description.clone
  124.     # 初始化數據設定
  125.     x = 0
  126.     y = 0
  127.     h = 0
  128.     phrase = {}
  129.  
  130.     # 基本文字設定
  131.     phrase["price"] = "价格:"
  132.     phrase["elements"] = "属性:"
  133.     phrase["minus_states"] = "解除状态:"
  134.     phrase["plus_states"] = "附加状态:"
  135.     phrase["guard_elements"] = "防御属性"
  136.     phrase["guard_states"] = "防御状态"
  137.     phrase["auto_state"] = "自动状态"
  138.  
  139.     # 基本數據設定
  140. =begin
  141.     name_size = 名字文字大小
  142.     size = 描述文字大小
  143.     word = 每行的描述文字數
  144.     move = 全體描述偏移幅度
  145. =end
  146.     name_size = 18
  147.     size = 14
  148.     word = 12
  149.     move = 80
  150.     #------------------------------------------------------------------------
  151.     # ● 確定背景圖片的高度
  152.     #------------------------------------------------------------------------
  153.     h += (description.size/3/word)
  154.     h += 1 if (description.size/3%word) > 0
  155.     h += 1 if equipment.is_a?(RPG::Weapon)
  156.     now_h = h
  157.     h += 1
  158.     h += 1 unless equipment.pdef.zero?
  159.     h += 1 unless equipment.mdef.zero?
  160.     h += 1 if element_set.size > 0
  161.     h += 1 if element_set.size >= 5
  162.     case equipment
  163.     when RPG::Weapon
  164.       h += 1 unless minus_state_set.empty?
  165.       h += minus_state_set.size
  166.       h += 1 unless plus_state_set.empty?
  167.       h += plus_state_set.size
  168.     when RPG::Armor
  169.       h += 1 unless guard_state_set.empty?
  170.       h += guard_state_set.size
  171.       h += 1 unless auto_state_id.zero?
  172.     end
  173.     h += 1
  174.     h += 1 unless equipment.str_plus.zero?
  175.     h += 1 unless equipment.dex_plus.zero?
  176.     h += 1 unless equipment.agi_plus.zero?
  177.     h += 1 unless equipment.int_plus.zero?
  178.     h += materia_height_plus(equipment) unless self.materia.nil?
  179.     #------------------------------------------------------------------------
  180.     # ● 圖片顯示保證高度
  181.     #------------------------------------------------------------------------
  182.     h = 6 + now_h if (h - now_h) < 6
  183.     #------------------------------------------------------------------------
  184.     # ● 換算高度
  185.     #------------------------------------------------------------------------
  186.     self.height = h * size + name_size + 32
  187.     #------------------------------------------------------------------------
  188.     # ● 生成背景
  189.     #------------------------------------------------------------------------
  190.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  191.     self.contents.clear
  192.     #------------------------------------------------------------------------
  193.     # ● 名字描繪
  194.     #------------------------------------------------------------------------
  195.     text = equipment.name
  196.     self.contents.font.color = normal_color
  197.     self.contents.font.size = name_size
  198.     if text.nil?
  199.       self.visible = false
  200.     else
  201.       self.visible = true
  202.       self.contents.draw_text(0, 0, text.size*7, name_size, text, 0)
  203.     end
  204.     #------------------------------------------------------------------------
  205.     # ● 說明描繪
  206.     #------------------------------------------------------------------------
  207.     x = 0
  208.     y += 1
  209.     while ((text = description.slice!(/./m)) != nil)
  210.       self.contents.font.color = normal_color
  211.       self.contents.font.size = size
  212.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  213.       x+=1
  214.       if x == word
  215.         x=0
  216.         y+=1   
  217.       end
  218.     end
  219.     #------------------------------------------------------------------------
  220.     # ● 圖標描繪
  221.     #------------------------------------------------------------------------
  222.     bitmap = RPG::Cache.icon(equipment.icon_name)
  223.     opacity = self.contents.font.color == normal_color ? 255 : 128
  224.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  225.  
  226.     #------------------------------------------------------------------------
  227.     # ● 攻擊力描繪(武器)
  228.     #------------------------------------------------------------------------
  229.     if equipment.is_a?(RPG::Weapon)
  230.       x = 0
  231.       y += 1
  232.       text = $data_system.words.atk+":"+equipment.atk.to_s
  233.       self.contents.font.color = normal_color
  234.       self.contents.font.size = size
  235.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  236.     end
  237.     #------------------------------------------------------------------------
  238.     # ● 價格描繪
  239.     #------------------------------------------------------------------------
  240.     x = 0
  241.     y += 1
  242.     text = phrase["price"] + equipment.price.to_s
  243.     self.contents.font.color = normal_color
  244.     self.contents.font.size = size
  245.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  246.     #------------------------------------------------------------------------
  247.     # ● 物理防禦
  248.     #------------------------------------------------------------------------
  249.     unless equipment.pdef.zero?
  250.       x = 0
  251.       y += 1
  252.       text = $data_system.words.pdef+":"+equipment.pdef.to_s
  253.       self.contents.font.color = normal_color
  254.       self.contents.font.size = size
  255.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  256.     end
  257.     #------------------------------------------------------------------------
  258.     # ● 魔法防禦
  259.     #------------------------------------------------------------------------
  260.     unless equipment.mdef.zero?
  261.       x = 0
  262.       y += 1
  263.       text=$data_system.words.mdef+":"+equipment.mdef.to_s
  264.       self.contents.font.color = normal_color
  265.       self.contents.font.size = size
  266.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  267.     end
  268.     #------------------------------------------------------------------------
  269.     # ● 屬性
  270.     #------------------------------------------------------------------------
  271.     if element_set.size > 0
  272.       x = 0
  273.       y += 1
  274.       text = phrase["elements"]
  275.       for i in 0...element_set.size
  276.         break if i > 4
  277.         text += $data_system.elements[element_set[i]]
  278.       end
  279.       self.contents.font.color = normal_color
  280.       self.contents.font.size = size
  281.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  282.     end
  283.     if element_set.size >= 5
  284.       x = (phrase["elements"].size)*5-4
  285.       y += 1
  286.       text = ""
  287.       for i in 4...element_set.size
  288.         text += $data_system.elements[element_set[i]]
  289.       end
  290.       self.contents.font.color = normal_color
  291.       self.contents.font.size = size
  292.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  293.     end
  294.     #------------------------------------------------------------------------
  295.     # ● 描述分流 武器/防具
  296.     #------------------------------------------------------------------------
  297.     case equipment
  298.     when RPG::Weapon
  299.       #------------------------------------------------------------------------
  300.       # ● 解除狀態(武器)
  301.       #------------------------------------------------------------------------
  302.       unless minus_state_set.empty?
  303.         x = 0
  304.         y += 1
  305.         text=phrase["minus_states"]
  306.         text=phrase["guard_states"]
  307.         self.contents.font.color = normal_color
  308.         self.contents.font.size = size
  309.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  310.         for i in 0...minus_state_set.size
  311.           y += 1
  312.           text = $data_states[minus_state_set[i]].name        
  313.           self.contents.font.color = normal_color
  314.           self.contents.font.size = size
  315.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  316.         end
  317.       end
  318.       #------------------------------------------------------------------------
  319.       # ● 附加狀態(武器)
  320.       #------------------------------------------------------------------------
  321.       unless plus_state_set.empty?
  322.         x = 0
  323.         y += 1
  324.         text = phrase["plus_states"]
  325.         self.contents.font.color = normal_color
  326.         self.contents.font.size = size
  327.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  328.         for i in 0...plus_state_set.size
  329.           y += 1
  330.           text=$data_states[plus_state_set[i]].name        
  331.           self.contents.font.color = normal_color
  332.           self.contents.font.size = size
  333.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  334.         end  
  335.       end
  336.     when RPG::Armor
  337.       #------------------------------------------------------------------------
  338.       # ● 防禦狀態(防具)
  339.       #------------------------------------------------------------------------
  340.       unless guard_state_set.empty?
  341.         x = 0
  342.         y += 1
  343.         text=phrase["guard_states"]
  344.         self.contents.font.color = normal_color
  345.         self.contents.font.size = size
  346.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  347.         for i in 0...guard_state_set.size
  348.           y += 1
  349.           text = $data_states[guard_state_set[i]].name        
  350.           self.contents.font.color = normal_color
  351.           self.contents.font.size = size
  352.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  353.         end
  354.       end
  355.       #------------------------------------------------------------------------
  356.       # ● 自動狀態(防具)
  357.       #------------------------------------------------------------------------
  358.       unless auto_state_id.zero?
  359.         x = 0
  360.         y += 1
  361.         text = phrase["auto_state"] + $data_states[auto_state_id].name
  362.         self.contents.font.color = normal_color
  363.         self.contents.font.size = size
  364.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  365.       end
  366.     end
  367.     #------------------------------------------------------------------------
  368.     # ● 空行
  369.     #------------------------------------------------------------------------
  370.     y+=1
  371.     #------------------------------------------------------------------------
  372.     # ● 力量
  373.     #------------------------------------------------------------------------
  374.     unless equipment.str_plus.zero?
  375.       x = 0
  376.       y += 1
  377.       h += 1
  378.       if equipment.str_plus > 0
  379.         text=$data_system.words.str+" +"+ equipment.str_plus.to_s
  380.       else
  381.         text=$data_system.words.str+" -"+ (-equipment.str_plus).to_s
  382.       end
  383.       self.contents.font.color = normal_color
  384.       self.contents.font.size = size
  385.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)  
  386.     end
  387.     #------------------------------------------------------------------------
  388.     # ● 靈巧
  389.     #------------------------------------------------------------------------
  390.     unless equipment.dex_plus.zero?
  391.       x = 0
  392.       y += 1
  393.       h += 1
  394.       if equipment.dex_plus > 0
  395.         text=$data_system.words.dex+" +"+ equipment.dex_plus.to_s
  396.       else
  397.         text=$data_system.words.dex+" -"+ (-equipment.dex_plus).to_s
  398.       end
  399.       self.contents.font.color = normal_color
  400.       self.contents.font.size = size
  401.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  402.     end
  403.     #------------------------------------------------------------------------
  404.     # ● 速度
  405.     #------------------------------------------------------------------------
  406.     unless equipment.agi_plus.zero?
  407.       x = 0
  408.       y += 1
  409.       h += 1
  410.       if equipment.agi_plus > 0
  411.         text=$data_system.words.agi+" +"+ equipment.agi_plus.to_s
  412.       else
  413.         text=$data_system.words.agi+" -"+ (-equipment.agi_plus).to_s
  414.       end
  415.       self.contents.font.color = normal_color
  416.       self.contents.font.size = size
  417.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  418.     end
  419.     #------------------------------------------------------------------------
  420.     # ● 智力
  421.     #------------------------------------------------------------------------
  422.     unless equipment.int_plus.zero?
  423.       x = 0
  424.       y += 1
  425.       h += 1
  426.       if equipment.int_plus > 0
  427.         text=$data_system.words.int+" +"+ equipment.int_plus.to_s
  428.       else
  429.         text=$data_system.words.int+" -"+ (-equipment.int_plus).to_s
  430.       end
  431.       self.contents.font.color = normal_color
  432.       self.contents.font.size = size
  433.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  434.     end
  435.     #------------------------------------------------------------------------
  436.     # ● 魔力石描繪
  437.     #------------------------------------------------------------------------
  438.     y += draw_materia(equipment, move, y, size) unless self.materia.nil?
  439.   end
  440.   #--------------------------------------------------------------------------
  441.   # ● 物品幫助窗口
  442.   #--------------------------------------------------------------------------
  443.   def set_item_text(item)
  444.     # 取得描述
  445.     description = item.description.clone
  446.     # 取得屬性、附加狀態、解除狀態之副本
  447.     element_set = item.element_set.clone
  448.     plus_state_set = item.plus_state_set.clone
  449.     minus_state_set = item.minus_state_set.clone
  450.     # 過濾不顯示的描述
  451.     element_set -= @unshow_elements
  452.     plus_state_set -= @unshow_states
  453.     minus_state_set -= @unshow_states
  454.     # 初始化數據設定
  455.     x = 0
  456.     y = 0
  457.     h = 0
  458.     phrase = {}
  459.     scope ={}
  460.     parameter_type = {}
  461.  
  462.     # 基本數據設定
  463. =begin
  464.     name_size = 名字文字大小
  465.     size = 描述文字大小
  466.     word = 每行的描述文字數
  467.     move = 全體描述偏移幅度
  468. =end
  469.     name_size = 18
  470.     size = 14
  471.     word = 12
  472.     move = 80
  473.  
  474.     # 基本文字設定
  475.     phrase["scope"] = "范围:"
  476.     phrase["price"] = "价格:"
  477.     phrase["recover_hp_rate"] = "HP 回复率:"
  478.     phrase["recover_hp"] = "HP 回复量:"
  479.     phrase["recover_sp_rate"] = "SP 回复率:"
  480.     phrase["recover_sp"] = "SP 回复量:"
  481.     phrase["elements"] = "属性:"
  482.     phrase["plus"] = "附加"
  483.     phrase["minus"] = "解除"
  484.     phrase["states"] = "状态"
  485.     scope[0] = "特殊物品"
  486.     scope[1] = "特殊物品"
  487.     scope[2] = "敌单体"
  488.     scope[3] = "敌全体"
  489.     scope[4] = "己方单体"
  490.     scope[5] = "己方全体"
  491.     scope[6] = "己方昏死单体"
  492.     scope[7] = "己方昏死全体"
  493.     scope[8] = "使用者"
  494.  
  495.     parameter_type[1] = "MaxHP"
  496.     parameter_type[2] = "MaxSP"
  497.     parameter_type[3] = $data_system.words.str
  498.     parameter_type[4] = $data_system.words.dex
  499.     parameter_type[5] = $data_system.words.agi
  500.     parameter_type[6] = $data_system.words.int
  501.  
  502.     #依顯示内容確定自身高
  503.     h = (description.size/3/word)
  504.     h +=1 if (description.size/3%word)> 0
  505.     now_h = h
  506.     h +=3  # 空行,效果範圍,價格
  507.     h += 1 unless item.recover_hp_rate.zero?
  508.     h += 1 unless item.recover_hp.zero?
  509.     h += 1 unless item.recover_sp_rate.zero?
  510.     h += 1 unless item.recover_sp.zero?
  511.     h += 1 unless item.parameter_type.zero?
  512.     h += 1 unless element_set[0].nil?
  513.     h += 1 unless element_set[4].nil?
  514.     h += (1+plus_state_set.size) unless plus_state_set.empty?
  515.     h += (1+minus_state_set.size) unless minus_state_set.empty?
  516.     #------------------------------------------------------------------------
  517.     # ● 圖片顯示保證高度
  518.     #------------------------------------------------------------------------
  519.     h = 6 + now_h if (h - now_h) < 6
  520.     #------------------------------------------------------------------------
  521.     # ● 換算高度
  522.     #------------------------------------------------------------------------
  523.     self.height = h * size + name_size + 32
  524.     #------------------------------------------------------------------------
  525.     # ● 生成背景
  526.     #------------------------------------------------------------------------
  527.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  528.     self.contents.clear
  529.     #------------------------------------------------------------------------
  530.     # ● 名字描繪
  531.     #------------------------------------------------------------------------
  532.     text = item.name
  533.     self.contents.font.color = normal_color#顔色腳本
  534.     self.contents.font.size = name_size
  535.     if text.nil?
  536.       self.visible = false
  537.     else
  538.       self.visible = true
  539.       self.contents.draw_text(0,0, text.size*7, 20, text, 0)
  540.     end
  541.     #------------------------------------------------------------------------
  542.     # ● 說明描繪
  543.     #------------------------------------------------------------------------
  544.     x = 0
  545.     y += 1
  546.     while ((text = description.slice!(/./m)) != nil)
  547.       self.contents.font.color = normal_color
  548.       self.contents.font.size = size
  549.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  550.       x+=1
  551.       if x == word
  552.         x = 0
  553.         y += 1
  554.       end
  555.     end
  556.     #------------------------------------------------------------------------
  557.     # ● 圖標描繪
  558.     #------------------------------------------------------------------------
  559.     bitmap = RPG::Cache.icon(item.icon_name) unless item.icon_name.nil?
  560.     opacity = self.contents.font.color == normal_color ? 255 : 128
  561.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  562.     #------------------------------------------------------------------------
  563.     # ● 魔力石接口
  564.     #------------------------------------------------------------------------
  565.     unless self.materia.nil?
  566.       return if is_materia?(item)
  567.     end
  568.     #------------------------------------------------------------------------
  569.     # ● 效果範圍
  570.     #------------------------------------------------------------------------
  571.     text= phrase["scope"] + scope[item.scope]
  572.     x = 0
  573.     y += 1
  574.     self.contents.font.color = normal_color
  575.     self.contents.font.size = size
  576.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  577.     #------------------------------------------------------------------------
  578.     # ● 價格
  579.     #------------------------------------------------------------------------
  580.     x = 0
  581.     y += 1      
  582.     text = phrase["price"] + item.price.to_s
  583.     self.contents.font.color = normal_color
  584.     self.contents.font.size = size
  585.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  586.  
  587.     #------------------------------------------------------------------------
  588.     # ● HP回復率
  589.     #------------------------------------------------------------------------
  590.     unless item.recover_hp_rate.zero?  
  591.       x = 0
  592.       y += 1
  593.       text = phrase["recover_hp_rate"] + item.recover_hp_rate.to_s+"%"
  594.       self.contents.font.color = normal_color
  595.       self.contents.font.size = size
  596.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  597.     end
  598.     #------------------------------------------------------------------------
  599.     # ● HP回復量
  600.     #------------------------------------------------------------------------
  601.     unless item.recover_hp.zero?  
  602.       x = 0
  603.       y += 1      
  604.       text = phrase["recover_hp"] + item.recover_hp.to_s
  605.       self.contents.font.color = normal_color
  606.       self.contents.font.size = size
  607.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  608.     end
  609.     #------------------------------------------------------------------------
  610.     # ● SP回復率
  611.     #------------------------------------------------------------------------
  612.     unless item.recover_sp_rate.zero?
  613.       x = 0
  614.       y += 1      
  615.       text = phrase["recover_sp_rate"] + item.recover_sp_rate.to_s+"%"
  616.       self.contents.font.color = normal_color
  617.       self.contents.font.size = size
  618.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  619.     end
  620.     #------------------------------------------------------------------------
  621.     # ● SP回復量
  622.     #------------------------------------------------------------------------
  623.     unless item.recover_sp.zero?  
  624.       x = 0
  625.       y += 1      
  626.       text = phrase["elements"] + item.recover_sp.to_s
  627.       self.contents.font.color = normal_color
  628.       self.contents.font.size = size
  629.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  630.     end
  631.     #------------------------------------------------------------------------
  632.     # ● 能力值增加
  633.     #------------------------------------------------------------------------
  634.     unless item.parameter_type.zero?
  635.       x = 0
  636.       y += 1      
  637.       text= parameter_type[item.parameter_type]+" +"+item.parameter_points.to_s
  638.  
  639.       self.contents.font.color = normal_color
  640.       self.contents.font.size = size
  641.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  642.     end
  643.     #------------------------------------------------------------------------
  644.     # ● 屬性
  645.     #------------------------------------------------------------------------
  646.     if element_set.size > 0
  647.       x = 0
  648.       y += 1
  649.       text = phrase["elements"]
  650.       for i in 0...element_set.size
  651.         break if i > 4
  652.         text += $data_system.elements[element_set[i]]
  653.       end
  654.       self.contents.font.color = normal_color
  655.       self.contents.font.size = size
  656.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  657.     end
  658.     if element_set.size >= 5
  659.       x = (phrase["elements"].size)*5-4
  660.       y += 1
  661.       text = ""
  662.       for i in 4...element_set.size
  663.         text += $data_system.elements[element_set[i]]
  664.       end
  665.       self.contents.font.color = normal_color
  666.       self.contents.font.size = size
  667.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  668.     end
  669.     #------------------------------------------------------------------------
  670.     # ● 狀態添加
  671.     #------------------------------------------------------------------------
  672.     unless plus_state_set.empty?
  673.       text = phrase["plus"]
  674.       x = 0
  675.       y += 1
  676.       self.contents.font.color = normal_color
  677.       self.contents.font.size = size
  678.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  679.       plus_state_set.each do |plus_state|
  680.         y += 1
  681.         text = $data_states[plus_state].name        
  682.         self.contents.font.color = normal_color
  683.         self.contents.font.size = size
  684.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)      
  685.       end  
  686.     end
  687.     #------------------------------------------------------------------------
  688.     # ● 狀態解除
  689.     #------------------------------------------------------------------------
  690.     unless minus_state_set.empty?
  691.       text = phrase["minus"]
  692.       x = 0
  693.       y += 1
  694.       self.contents.font.color = normal_color
  695.       self.contents.font.size = size
  696.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  697.       minus_state_set.each do |minus_state|
  698.         y += 1
  699.         text = $data_states[minus_state].name
  700.         self.contents.font.color = normal_color
  701.         self.contents.font.size = size
  702.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  703.       end
  704.     end
  705.   end
  706.   #--------------------------------------------------------------------------
  707.   # ● 技能帮助窗口
  708.   #--------------------------------------------------------------------------
  709.   def set_skill_text(skill)
  710.     # 取得描述
  711.     description = skill.description.clone
  712.     # 取得屬性、附加狀態、解除狀態之副本
  713.     element_set = skill.element_set.clone
  714.     plus_state_set = skill.plus_state_set.clone
  715.     minus_state_set = skill.minus_state_set.clone
  716.     # 過濾不顯示的描述
  717.     element_set -= @unshow_elements
  718.     plus_state_set -= @unshow_states
  719.     minus_state_set -= @unshow_states
  720.     # 初始化設定
  721.     x = 0
  722.     y = 0
  723.     h = 0
  724.     phrase = {}
  725.     scope = {}
  726.  
  727.     # 基本數據設定
  728. =begin
  729.     name_size = 名字文字大小
  730.     size = 描述文字大小
  731.     word = 每行的描述文字數
  732.     move = 全體描述偏移幅度
  733. =end
  734.     name_size = 18
  735.     size = 14
  736.     word = 12
  737.     move = 80
  738.  
  739.     # 基本文字設定
  740.     phrase["scope"] = "范围:"
  741.     #
  742.     phrase["power"] = "威力:"
  743.     phrase["cost_sp"] = "消耗SP:"
  744.     phrase["hit_rate"] = "命中率:"
  745.     phrase["elements"] = "攻击属性"
  746.     #
  747.     phrase["plus"] = "附加"
  748.     phrase["minus"] = "解除"
  749.     phrase["states"] = "状态"
  750.     scope[0] = "特殊技能"
  751.     scope[1] = "敌单体"
  752.     scope[2] = "敌全体"
  753.     scope[3] = "我方单体"
  754.     scope[4] = "我方全体"
  755.     scope[5] = "我方昏死(单体)"
  756.     scope[6] = "我方昏死(全体)"
  757.     scope[7] = "自身"
  758.  
  759.  
  760.     #由描叙确定高
  761.     h =description.size/3/word
  762.     h += 1 if (description.size%3/word) > 0
  763.     h += 4  #空行,效果范围,消费SP,命中率
  764.     h += 1 unless skill.power.zero?
  765.     h += 1 unless element_set.empty?
  766.     h += 1 unless element_set[4].nil?
  767.     h += plus_state_set.size
  768.     h += minus_state_set.size
  769.     #------------------------------------------------------------------------
  770.     # ● 換算高度
  771.     #------------------------------------------------------------------------
  772.     self.height=h * size + name_size + 32  
  773.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  774.     self.contents.clear
  775.  
  776.     #------------------------------------------------------------------------
  777.     # ● 名字描述
  778.     #------------------------------------------------------------------------
  779.     text = skill.name
  780.     self.contents.font.color = Color.new(255, 255, 128, 255)
  781.     self.contents.font.size = name_size
  782.     if text!=nil
  783.       self.visible = true
  784.       self.contents.draw_text(0,0, text.size*7, name_size, text, 0)
  785.     else
  786.       self.visible = false
  787.     end
  788.  
  789.     #------------------------------------------------------------------------
  790.     # ● 說明描述
  791.     #------------------------------------------------------------------------
  792.     x = 0
  793.     y += 1
  794.     text = description
  795.     while ((text = description.slice!(/./m)) != nil)
  796.       self.contents.font.color = normal_color
  797.       self.contents.font.size = size
  798.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  799.       x+=1
  800.       if x==word#每行10个字
  801.         x = 0
  802.         y += 1      
  803.       end
  804.     end
  805.  
  806.     #------------------------------------------------------------------------
  807.     # ● 攻擊範圍
  808.     #------------------------------------------------------------------------
  809.     text = phrase["scope"] + scope[skill.scope]
  810.     x = 0
  811.     y += 1
  812.     self.contents.font.color = normal_color
  813.     self.contents.font.size = size
  814.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  815.     #------------------------------------------------------------------------
  816.     # ● 空一行
  817.     #------------------------------------------------------------------------
  818.     y += 1
  819.     #------------------------------------------------------------------------
  820.     # ● 威力描述
  821.     #------------------------------------------------------------------------
  822.     unless skill.power.zero?
  823.       power = skill.power > 0 ? skill.power : -1 * skill.power
  824.       text = phrase["power"] + power.to_s
  825.       x = 0
  826.       y += 1
  827.       self.contents.font.color = normal_color
  828.       self.contents.font.size = size  
  829.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  830.     end  
  831.     #------------------------------------------------------------------------
  832.     # ● 消費SP描述
  833.     #------------------------------------------------------------------------
  834.     text = phrase["cost_sp"] + skill.sp_cost.to_s
  835.     x = 0
  836.     y += 1
  837.     self.contents.font.color = normal_color
  838.     self.contents.font.size = size   
  839.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  840.     #------------------------------------------------------------------------
  841.     # ● 命中率描述
  842.     #------------------------------------------------------------------------
  843.     text = phrase["hit_rate"] + skill.hit.to_s + "%"
  844.     x = 0
  845.     y += 1
  846.     self.contents.font.color = normal_color
  847.     self.contents.font.size = size
  848.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  849.     #------------------------------------------------------------------------
  850.     # ● 攻擊屬性
  851.     #------------------------------------------------------------------------
  852.     if element_set.size > 0
  853.       text=phrase["elements"]
  854.       for i in 0...element_set.size
  855.         if i < 4
  856.           text+=$data_system.elements[element_set[i]]
  857.         else
  858.           break
  859.         end        
  860.       end
  861.       x = 0
  862.       y += 1
  863.       self.contents.font.color = normal_color
  864.       self.contents.font.size = size
  865.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  866.     end
  867.     if element_set.size >= 5
  868.       text=""
  869.       for i in 4...element_set.size
  870.         text+=$data_system.elements[element_set[i]]
  871.       end
  872.       x= (phrase["elements"].size)*3
  873.       y += 1
  874.       self.contents.font.color = normal_color
  875.       self.contents.font.size = size
  876.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  877.     end
  878.     #------------------------------------------------------------------------
  879.     # ● 狀態附加
  880.     #------------------------------------------------------------------------
  881.     unless plus_state_set.empty?
  882.       text= phrase["plus"]
  883.       x = 0
  884.       y += 1
  885.       self.contents.font.color = normal_color
  886.       self.contents.font.size = size
  887.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  888.       plus_state_set.each do |plus_state|
  889.         y += 1
  890.         text=$data_states[plus_state].name        
  891.         self.contents.font.color = normal_color
  892.         self.contents.font.size = size
  893.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  894.       end  
  895.     end
  896.     #------------------------------------------------------------------------
  897.     # ●狀態解除
  898.     #------------------------------------------------------------------------
  899.     unless minus_state_set.empty?
  900.       text = phrase["minus"]
  901.       x = 0
  902.       y += 1
  903.       self.contents.font.color = normal_color
  904.       self.contents.font.size=size
  905.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  906.       minus_state_set.each do |minus_state|
  907.         y += 1
  908.         text=$data_states[minus_state].name        
  909.         self.contents.font.color = normal_color
  910.         self.contents.font.size=size
  911.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  912.       end  
  913.     end     
  914.   end
  915.   #--------------------------------------------------------------------------
  916.   # ● 设置角色
  917.   #     actor : 要显示状态的角色
  918.   #--------------------------------------------------------------------------
  919.   def set_actor(actor)
  920.     if actor != @actor
  921.       self.contents.clear
  922.       draw_actor_name(actor, 4, 0)
  923.       draw_actor_state(actor, 140, 0)
  924.       draw_actor_hp(actor, 284, 0)
  925.       draw_actor_sp(actor, 460, 0)
  926.       @actor = actor
  927.       @text = nil
  928.       self.visible = true
  929.     end
  930.   end
  931.   #--------------------------------------------------------------------------
  932.   # ● 設置角色
  933.   #     actor : 要顯示狀態之角色
  934.   #--------------------------------------------------------------------------
  935.   def set_actor(actor)
  936.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  937.     if actor != @actor
  938.       self.contents.clear
  939.       draw_actor_name(actor, 4, 0)
  940.       draw_actor_state(actor, 140, 0)
  941.       draw_actor_hp(actor, 284, 0)
  942.       draw_actor_sp(actor, 460, 0)
  943.       @actor = actor
  944.       @text = nil
  945.       self.visible = true
  946.     end
  947.   end
  948.   #--------------------------------------------------------------------------
  949.   # ● 設置敵人
  950.   #     enemy : 要顯示名字與狀態之敵人
  951.   #--------------------------------------------------------------------------
  952.   def set_enemy(enemy)
  953.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  954.     text = enemy.name.sub(/\[Ff][([0-9]+)]/) {""}
  955.     state_text = make_battler_state_text(enemy, 112, false)
  956.     if state_text != ""
  957.       text += "  " + state_text
  958.     end
  959.     set_text(text, 1)
  960.     self.visible = true
  961.   end
  962.   #--------------------------------------------------------------------------
  963.   # ● 校正帮助窗口位置
  964.   #--------------------------------------------------------------------------
  965.   def set_pos(x,y,width,oy,index,column_max)
  966.     #光标坐标
  967.     cursor_width = width / column_max - 32
  968.     xx = index % column_max * (cursor_width + 32)
  969.     yy = index / column_max * 32 - oy
  970.     self.x=xx+x+150
  971.     self.y=yy+y+30
  972.     if self.x+self.width>640
  973.       self.x=640-self.width
  974.     end
  975.     if self.y+self.height>480
  976.       self.y=480-self.height
  977.     end  
  978.   end
  979.   #------------------------------------------------------------------------
  980.   # ● 裝備名字顔色變化 接口
  981.   #------------------------------------------------------------------------
  982.   def draw_name_color(equipment)
  983.     return normal_color
  984.   end
  985.   #------------------------------------------------------------------------
  986.   # ● 自身身份確認
  987.   #------------------------------------------------------------------------
  988.   def original_help?
  989.     return false
  990.   end
  991. end
  992.  
  993. #------------------------------------------------------------------------------
  994.  
  995.  
  996.  
  997. #------------------------------------------------------------------------------
  998. #==============================================================================
  999. # ■ Window_Item
  1000. #------------------------------------------------------------------------------
  1001. #  物品画面、战斗画面、显示浏览物品的窗口。
  1002. #==============================================================================
  1003.  
  1004. class Window_Item < Window_Selectable
  1005.   #--------------------------------------------------------------------------
  1006.   # ● 初始化对像
  1007.   #--------------------------------------------------------------------------
  1008.   def initialize
  1009.     super(0, 64-64, 640, 416+64)
  1010.     @column_max = 2
  1011.     refresh
  1012.     self.index = 0
  1013.     # 战斗中的情况下将窗口移至中央并将其半透明化
  1014.     if $game_temp.in_battle
  1015.       self.y = 64
  1016.       self.height = 256
  1017.       self.back_opacity = 160
  1018.     end
  1019.   end
  1020.   #--------------------------------------------------------------------------
  1021.   # ● 刷新帮助文本
  1022.   #--------------------------------------------------------------------------
  1023.   def update_help
  1024.     @help_window.set_text(item)
  1025.     #校正帮助窗口位置
  1026.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1027.   end
  1028. end
  1029. #------------------------------------------------------------------------------
  1030.  
  1031.  
  1032. #------------------------------------------------------------------------------
  1033.  
  1034.  
  1035.  
  1036. #------------------------------------------------------------------------------
  1037. #==============================================================================
  1038. # ■ Window_SkillStatus
  1039. #------------------------------------------------------------------------------
  1040. #  显示特技画面、特技使用者的窗口。
  1041. #==============================================================================
  1042.  
  1043. class Window_SkillStatus < Window_Base
  1044.   #--------------------------------------------------------------------------
  1045.   # ● 初始化对像
  1046.   #     actor : 角色
  1047.   #--------------------------------------------------------------------------
  1048.   def initialize(actor)
  1049. # -------------------
  1050. # 修改開始
  1051.     super(0, 64-64, 640, 64+64)#★★★★★★★★★★★★★★★★★★★★
  1052. # 修改終了
  1053. # -------------------
  1054.     self.contents = Bitmap.new(width - 32, height - 32)
  1055.     @actor = actor
  1056.     refresh
  1057.   end
  1058. end
  1059. #------------------------------------------------------------------------------
  1060.  
  1061.  
  1062.  
  1063. #------------------------------------------------------------------------------
  1064. #==============================================================================
  1065. # ■ Window_EquipLeft
  1066. #------------------------------------------------------------------------------
  1067. #  装备画面的、显示角色能力值变化的窗口。
  1068. #==============================================================================
  1069. class Window_EquipLeft < Window_Base
  1070.   #--------------------------------------------------------------------------
  1071.   # ● 初始化对像
  1072.   #     actor : 角色
  1073.   #--------------------------------------------------------------------------
  1074.   def initialize(actor)
  1075. # -------------------
  1076. # 修改開始
  1077.     super(0, 64-64, 272, 416+64)#★★★★★★★★★★★★★★★★★★★★
  1078. # 修改終了
  1079. # -------------------
  1080.     self.contents = Bitmap.new(width - 32, height - 32)
  1081.     @actor = actor
  1082.     refresh
  1083.   end
  1084. end
  1085. #------------------------------------------------------------------------------
  1086.  
  1087.  
  1088.  
  1089. #------------------------------------------------------------------------------
  1090. #==============================================================================
  1091. # ■ Window_EquipRight
  1092. #------------------------------------------------------------------------------
  1093. #  装备画面、显示角色现在装备的物品的窗口。
  1094. #==============================================================================
  1095.  
  1096. class Window_EquipRight < Window_Selectable
  1097.   #--------------------------------------------------------------------------
  1098.   # ● 初始化对像
  1099.   #     actor : 角色
  1100.   #--------------------------------------------------------------------------
  1101.   def initialize(actor)
  1102. # -------------------
  1103. # 修改開始
  1104.     super(272, 64-64, 368, 256+64)#★★★★★★★★★★★★★★★★★★★★
  1105. # 修改終了
  1106. # -------------------
  1107.     self.contents = Bitmap.new(width - 32, height - 32)
  1108.     @actor = actor
  1109.     refresh
  1110.     self.index = 0
  1111.   end
  1112.   #--------------------------------------------------------------------------
  1113.   # ● 刷新帮助文本
  1114.   #--------------------------------------------------------------------------
  1115.  
  1116.   def update_help
  1117.     @help_window.set_text(item)
  1118.     #校正帮助窗口位置
  1119.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1120.   end
  1121. end
  1122. #------------------------------------------------------------------------------
  1123.  
  1124.  
  1125.  
  1126. #------------------------------------------------------------------------------
  1127. #==============================================================================
  1128. # ■ Window_EquipItem
  1129. #------------------------------------------------------------------------------
  1130. #  装备画面、显示浏览变更装备的候补物品的窗口。
  1131. #==============================================================================
  1132.  
  1133. class Window_EquipItem < Window_Selectable
  1134.   #--------------------------------------------------------------------------
  1135.   # ● 初始化对像
  1136.   #     actor      : 角色
  1137.   #     equip_type : 装备部位 (0~3)
  1138.   #--------------------------------------------------------------------------
  1139.   def initialize(actor, equip_type)
  1140. # -------------------
  1141. # 修改開始
  1142.     super(272, 320, 368, 160)#★★★★★★★★★★★★★★★★★★★★
  1143. # 修改終了
  1144. # -------------------
  1145.     @actor = actor
  1146.     @equip_type = equip_type
  1147.     @column_max = 1
  1148.  
  1149.     refresh
  1150.     self.active = false
  1151.     self.index = -1
  1152.   end
  1153.   def update_help
  1154.     @help_window.set_text(item)
  1155.     #校正帮助窗口位置
  1156.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1157.   end
  1158. end
  1159. #------------------------------------------------------------------------------
  1160.  
  1161. #------------------------------------------------------------------------------
  1162. #==============================================================================
  1163. # ■ Scene_Equip
  1164. #------------------------------------------------------------------------------
  1165. #  处理装备画面的类。
  1166. #==============================================================================
  1167.  
  1168. class Scene_Equip
  1169.   #--------------------------------------------------------------------------
  1170.   # ● 刷新画面 (右侧窗口被激活的情况下)
  1171.   #--------------------------------------------------------------------------
  1172.   def update_right
  1173. # -------------------
  1174. # 修改開始
  1175.     if @right_window.item==nil
  1176.         @help_window.visible=false
  1177.     else
  1178.         @help_window.visible=true
  1179.     end
  1180. # 修改終了
  1181. # -------------------
  1182.     # 按下 B 键的情况下
  1183.     if Input.trigger?(Input::B)
  1184.       # 演奏取消 SE
  1185.       $game_system.se_play($data_system.cancel_se)
  1186.       # 切换到菜单画面
  1187.       $scene = Scene_Menu.new(2)
  1188.       return
  1189.     end
  1190.     # 按下 C 键的情况下
  1191.     if Input.trigger?(Input::C)
  1192.       # 固定装备的情况下
  1193.       if @actor.equip_fix?(@right_window.index)
  1194.         # 演奏冻结 SE
  1195.         $game_system.se_play($data_system.buzzer_se)
  1196.         return
  1197.       end
  1198.       # 演奏确定 SE
  1199.       $game_system.se_play($data_system.decision_se)
  1200.       # 激活物品窗口
  1201.       @right_window.active = false
  1202.       @item_window.active = true
  1203.       @item_window.index = 0
  1204.       return
  1205.     end
  1206.     # 按下 R 键的情况下
  1207.     if Input.trigger?(Input::R)
  1208.       # 演奏光标 SE
  1209.       $game_system.se_play($data_system.cursor_se)
  1210.       # 移至下一位角色
  1211.       @actor_index += 1
  1212.       @actor_index %= $game_party.actors.size
  1213.       # 切换到别的装备画面
  1214.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  1215.       return
  1216.     end
  1217.     # 按下 L 键的情况下
  1218.     if Input.trigger?(Input::L)
  1219.       # 演奏光标 SE
  1220.       $game_system.se_play($data_system.cursor_se)
  1221.       # 移至上一位角色
  1222.       @actor_index += $game_party.actors.size - 1
  1223.       @actor_index %= $game_party.actors.size
  1224.       # 切换到别的装备画面
  1225.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  1226.       return
  1227.     end
  1228.   end
  1229.   #--------------------------------------------------------------------------
  1230.   # ● 刷新画面 (物品窗口被激活的情况下)
  1231.   #--------------------------------------------------------------------------
  1232.   def update_item
  1233. # -------------------
  1234. # 修改開始
  1235.     if @item_window.item==nil
  1236.         @help_window.visible=false
  1237.     else
  1238.         @help_window.visible=true
  1239.     end
  1240. # 修改終了
  1241. # -------------------
  1242.     # 按下 B 键的情况下
  1243.     if Input.trigger?(Input::B)
  1244.       # 演奏取消 SE
  1245.       $game_system.se_play($data_system.cancel_se)
  1246.       # 激活右侧窗口
  1247.       @right_window.active = true
  1248.       @item_window.active = false
  1249.       @item_window.index = -1
  1250.       return
  1251.     end
  1252.     # 按下 C 键的情况下
  1253.     if Input.trigger?(Input::C)
  1254.       # 演奏装备 SE
  1255.       $game_system.se_play($data_system.equip_se)
  1256.       # 获取物品窗口现在选择的装备数据
  1257.       item = @item_window.item
  1258.       # 变更装备
  1259.       @actor.equip(@right_window.index, item == nil ? 0 : item.id)
  1260.       # 激活右侧窗口
  1261.       @right_window.active = true
  1262.       @item_window.active = false
  1263.       @item_window.index = -1
  1264.       # 再生成右侧窗口、物品窗口的内容
  1265.       @right_window.refresh
  1266.       @item_window.refresh
  1267.       return
  1268.     end
  1269.   end
  1270. end
  1271. #------------------------------------------------------------------------------
  1272.  
  1273.  
  1274.  
  1275.  
  1276.  
  1277. #‘‘──eu国猪于2012-7-21 12:22补充以下内容:
  1278.  
  1279. #==============================================================================
  1280. # 禾西製作 / Created by Quarcy
  1281. #==============================================================================
  1282. class Window_Help < Window_Base
  1283.   attr_reader :materia
  1284.   #--------------------------------------------------------------------------
  1285.   # ● 定義不顯示的屬性與狀態
  1286.   #--------------------------------------------------------------------------
  1287.   def unshown
  1288.     @unshow_elements = [17, 18]
  1289.     @unshow_states = []
  1290.   end
  1291.   #--------------------------------------------------------------------------
  1292.   # ● 初始化對象
  1293.   #--------------------------------------------------------------------------
  1294.   def initialize
  1295.     super(0, 0, 640, 64)
  1296.     self.opacity = 150
  1297.     self.z=150
  1298.     self.visible = false
  1299.   end
  1300.   #--------------------------------------------------------------------------
  1301.   # ● 設置文本
  1302.   #     data  : 窗口顯示的字符串/物品資料
  1303.   #     align : 對齊方式 (0..左對齊、1..中間對齊、2..右對齊)
  1304.   #--------------------------------------------------------------------------
  1305.   def set_text(data, align=0)
  1306.     #------------------------------------------------------------------------
  1307.     # ● 當資料爲文字時候
  1308.     #------------------------------------------------------------------------
  1309.     # 如果文本或對齊方式至少一方与上次的不同
  1310.     if data != @text or align != @align
  1311.       if data.is_a?(String)
  1312.         # 再描繪文本
  1313.         self.width = 640
  1314.         self.height = 64
  1315.         self.x=0
  1316.         self.y=0
  1317.         self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  1318.         self.contents.clear
  1319.         self.contents.font.color = normal_color
  1320.         self.contents.font.size = 20
  1321.         self.contents.draw_text(4, 0, self.width - 40, 32, data, align)
  1322.         @text = data
  1323.         @align = align
  1324.         @actor = nil
  1325.         self.visible = true
  1326.       end
  1327.     end
  1328.     return if data.is_a?(String)
  1329.     #------------------------------------------------------------------------
  1330.     # ● 當沒有資料時候
  1331.     #------------------------------------------------------------------------
  1332.     if data.nil?
  1333.       self.visible=false
  1334.     else
  1335.       self.visible=true
  1336.     end
  1337.     #------------------------------------------------------------------------
  1338.     # ● 當資料爲物品/技能時候
  1339.     #------------------------------------------------------------------------
  1340.     if data != nil && @data != data
  1341.       self.width = 210
  1342.       self.height = 430
  1343.       self.x=0
  1344.       self.y=200
  1345.       unshown
  1346.       non_auto_update(data)
  1347.     else
  1348.       return
  1349.     end
  1350.   end
  1351.   #--------------------------------------------------------------------------
  1352.   # ● 更新帮助窗口
  1353.   #--------------------------------------------------------------------------
  1354.   def non_auto_update(data=@data)
  1355.     @data = data
  1356.     case @data
  1357.     when RPG::Item
  1358.       set_item_text(@data)
  1359.     when RPG::Weapon
  1360.       set_equipment_text(@data)
  1361.     when RPG::Armor
  1362.       set_equipment_text(@data)
  1363.     when RPG::Skill
  1364.       set_skill_text(@data)
  1365.     end
  1366.   end
  1367.   #--------------------------------------------------------------------------
  1368.   # ● 裝備帮助窗口
  1369.   #--------------------------------------------------------------------------
  1370.   def set_equipment_text(equipment)
  1371.     #------------------------------------------------------------------------
  1372.     # ● 取得基本質料
  1373.     #------------------------------------------------------------------------
  1374.     # 取得屬性、附加狀態、解除狀態之副本
  1375.     case equipment
  1376.     when RPG::Weapon
  1377.       element_set = equipment.element_set.clone
  1378.       plus_state_set = equipment.plus_state_set.clone
  1379.       minus_state_set = equipment.minus_state_set.clone
  1380.       #----------------------#
  1381.       # 過濾不顯示的狀態描述 #
  1382.       #----------------------#
  1383.       plus_state_set -= @unshow_states
  1384.       minus_state_set -= @unshow_states
  1385.     when RPG::Armor
  1386.       element_set = equipment.guard_element_set.clone
  1387.       guard_state_set = equipment.guard_state_set.clone
  1388.       #----------------------#
  1389.       # 過濾不顯示的狀態描述 #
  1390.       #----------------------#
  1391.       auto_state_id = equipment.auto_state_id
  1392.       guard_state_set -= @unshow_states
  1393.     end
  1394.     #----------------------#
  1395.     # 過濾不顯示的屬性描述 #
  1396.     #----------------------#
  1397.     element_set -= @unshow_elements
  1398.     #--------------#
  1399.     # 取得說明文字 #
  1400.     #--------------#
  1401.     description = equipment.description.clone
  1402.     # 初始化數據設定
  1403.     x = 0
  1404.     y = 0
  1405.     h = 0
  1406.     phrase = {}
  1407.  
  1408.     # 基本文字設定
  1409.     phrase["price"] = "价格:"
  1410.     phrase["elements"] = "属性:"
  1411.     phrase["minus_states"] = "解除状态:"
  1412.     phrase["plus_states"] = "附加状态:"
  1413.     phrase["guard_elements"] = "防御属性"
  1414.     phrase["guard_states"] = "防御状态"
  1415.     phrase["auto_state"] = "自动状态"
  1416.  
  1417.     # 基本數據設定
  1418. =begin
  1419.     name_size = 名字文字大小
  1420.     size = 描述文字大小
  1421.     word = 每行的描述文字數
  1422.     move = 全體描述偏移幅度
  1423. =end
  1424.     name_size = 18
  1425.     size = 14
  1426.     word = 12
  1427.     move = 80
  1428.     #------------------------------------------------------------------------
  1429.     # ● 確定背景圖片的高度
  1430.     #------------------------------------------------------------------------
  1431.     h += (description.size/3/word)
  1432.     h += 1 if (description.size/3%word) > 0
  1433.     h += 1 if equipment.is_a?(RPG::Weapon)
  1434.     now_h = h
  1435.     h += 1
  1436.     h += 1 unless equipment.pdef.zero?
  1437.     h += 1 unless equipment.mdef.zero?
  1438.     h += 1 if element_set.size > 0
  1439.     h += 1 if element_set.size >= 5
  1440.     case equipment
  1441.     when RPG::Weapon
  1442.       h += 1 unless minus_state_set.empty?
  1443.       h += minus_state_set.size
  1444.       h += 1 unless plus_state_set.empty?
  1445.       h += plus_state_set.size
  1446.     when RPG::Armor
  1447.       h += 1 unless guard_state_set.empty?
  1448.       h += guard_state_set.size
  1449.       h += 1 unless auto_state_id.zero?
  1450.     end
  1451.     h += 1
  1452.     h += 1 unless equipment.str_plus.zero?
  1453.     h += 1 unless equipment.dex_plus.zero?
  1454.     h += 1 unless equipment.agi_plus.zero?
  1455.     h += 1 unless equipment.int_plus.zero?
  1456.     h += materia_height_plus(equipment) unless self.materia.nil?
  1457.     #------------------------------------------------------------------------
  1458.     # ● 圖片顯示保證高度
  1459.     #------------------------------------------------------------------------
  1460.     h = 6 + now_h if (h - now_h) < 6
  1461.     #------------------------------------------------------------------------
  1462.     # ● 換算高度
  1463.     #------------------------------------------------------------------------
  1464.     self.height = h * size + name_size + 32
  1465.     #------------------------------------------------------------------------
  1466.     # ● 生成背景
  1467.     #------------------------------------------------------------------------
  1468.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1469.     self.contents.clear
  1470.     #------------------------------------------------------------------------
  1471.     # ● 名字描繪
  1472.     #------------------------------------------------------------------------
  1473.     text = equipment.name
  1474.     self.contents.font.color = Color.new(0, 6, 252)
  1475.     self.contents.font.size = name_size
  1476.     if text.nil?
  1477.       self.visible = false
  1478.     else
  1479.       self.visible = true
  1480.       self.contents.draw_text(0, 0, text.size*7, name_size, text, 0)
  1481.     end
  1482.     #------------------------------------------------------------------------
  1483.     # ● 說明描繪
  1484.     #------------------------------------------------------------------------
  1485.     x = 0
  1486.     y += 1
  1487.     while ((text = description.slice!(/./m)) != nil)
  1488.       self.contents.font.color = Color.new(255, 255, 255)
  1489.       self.contents.font.size = size
  1490.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  1491.       x+=1
  1492.       if x == word
  1493.         x=0
  1494.         y+=1   
  1495.       end
  1496.     end
  1497.     #------------------------------------------------------------------------
  1498.     # ● 圖標描繪
  1499.     #------------------------------------------------------------------------
  1500.     bitmap = RPG::Cache.icon(equipment.icon_name)
  1501.     opacity = self.contents.font.color == normal_color ? 255 : 128
  1502.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  1503.  
  1504.     #------------------------------------------------------------------------
  1505.     # ● 攻擊力描繪(武器)
  1506.     #------------------------------------------------------------------------
  1507.     if equipment.is_a?(RPG::Weapon)
  1508.       x = 0
  1509.       y += 1
  1510.       text = $data_system.words.atk+":"+equipment.atk.to_s
  1511.       self.contents.font.color = Color.new(6, 252, 0)
  1512.       self.contents.font.size = size
  1513.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1514.     end
  1515.     #------------------------------------------------------------------------
  1516.     # ● 價格描繪
  1517.     #------------------------------------------------------------------------
  1518.     x = 0
  1519.     y += 1
  1520.     text = phrase["price"] + equipment.price.to_s
  1521.     self.contents.font.color = Color.new(255, 19, 119)
  1522.     self.contents.font.size = size
  1523.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1524.     #------------------------------------------------------------------------
  1525.     # ● 物理防禦
  1526.     #------------------------------------------------------------------------
  1527.     unless equipment.pdef.zero?
  1528.       x = 0
  1529.       y += 1
  1530.       text = $data_system.words.pdef+":"+equipment.pdef.to_s
  1531.       self.contents.font.color = Color.new(6, 252, 0)
  1532.       self.contents.font.size = size
  1533.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1534.     end
  1535.     #------------------------------------------------------------------------
  1536.     # ● 魔法防禦
  1537.     #------------------------------------------------------------------------
  1538.     unless equipment.mdef.zero?
  1539.       x = 0
  1540.       y += 1
  1541.       text=$data_system.words.mdef+":"+equipment.mdef.to_s
  1542.       self.contents.font.color = Color.new(6, 252, 0)
  1543.       self.contents.font.size = size
  1544.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1545.     end
  1546.     #------------------------------------------------------------------------
  1547.     # ● 屬性
  1548.     #------------------------------------------------------------------------
  1549.     if element_set.size > 0
  1550.       x = 0
  1551.       y += 1
  1552.       text = phrase["elements"]
  1553.       for i in 0...element_set.size
  1554.         break if i > 0
  1555.         text += $data_system.elements[element_set[i]]
  1556.       end
  1557.       self.contents.font.color = Color.new(255, 0, 255)
  1558.       self.contents.font.size = size
  1559.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1560.     end
  1561.     if element_set.size >= 0
  1562.       x = (phrase["elements"].size)*0
  1563.       y += 1
  1564.       text = ""
  1565.       for i in 0...element_set.size
  1566.         text += $data_system.elements[element_set[i]]
  1567.       end
  1568.       self.contents.font.color = Color.new(71, 243, 229)
  1569.       self.contents.font.size = size
  1570.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1571.     end
  1572.     #------------------------------------------------------------------------
  1573.     # ● 描述分流 武器/防具
  1574.     #------------------------------------------------------------------------
  1575.     case equipment
  1576.     when RPG::Weapon
  1577.       #------------------------------------------------------------------------
  1578.       # ● 解除狀態(武器)
  1579.       #------------------------------------------------------------------------
  1580.       unless minus_state_set.empty?
  1581.         x = 0
  1582.         y += 1
  1583.         text=phrase["minus_states"]
  1584.         text=phrase["guard_states"]
  1585.         self.contents.font.color = normal_color
  1586.         self.contents.font.size = size
  1587.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1588.         for i in 0...minus_state_set.size
  1589.           y += 1
  1590.           text = $data_states[minus_state_set[i]].name        
  1591.           self.contents.font.color = normal_color
  1592.           self.contents.font.size = size
  1593.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  1594.         end
  1595.       end
  1596.       #------------------------------------------------------------------------
  1597.       # ● 附加狀態(武器)
  1598.       #------------------------------------------------------------------------
  1599.       unless plus_state_set.empty?
  1600.         x = 0
  1601.         y += 1
  1602.         text = phrase["plus_states"]
  1603.         self.contents.font.color = Color.new(255, 0, 255)
  1604.         self.contents.font.size = size
  1605.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1606.         for i in 0...plus_state_set.size
  1607.           y += 1
  1608.           text=$data_states[plus_state_set[i]].name        
  1609.           self.contents.font.color = Color.new(255, 240, 74)
  1610.           self.contents.font.size = size
  1611.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  1612.         end  
  1613.       end
  1614.     when RPG::Armor
  1615.       #------------------------------------------------------------------------
  1616.       # ● 防禦狀態(防具)
  1617.       #------------------------------------------------------------------------
  1618.       unless guard_state_set.empty?
  1619.         x = 0
  1620.         y += 1
  1621.         text=phrase["guard_states"]
  1622.         self.contents.font.color = normal_color
  1623.         self.contents.font.size = size
  1624.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1625.         for i in 0...guard_state_set.size
  1626.           y += 1
  1627.           text = $data_states[guard_state_set[i]].name        
  1628.           self.contents.font.color = normal_color
  1629.           self.contents.font.size = size
  1630.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  1631.         end
  1632.       end
  1633.       #------------------------------------------------------------------------
  1634.       # ● 自動狀態(防具)
  1635.       #------------------------------------------------------------------------
  1636.       unless auto_state_id.zero?
  1637.         x = 0
  1638.         y += 1
  1639.         text = phrase["auto_state"] + $data_states[auto_state_id].name
  1640.         self.contents.font.color = normal_color
  1641.         self.contents.font.size = size
  1642.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1643.       end
  1644.     end
  1645.     #------------------------------------------------------------------------
  1646.     # ● 空行
  1647.     #------------------------------------------------------------------------
  1648.     y+=1
  1649.     #------------------------------------------------------------------------
  1650.     # ● 力量
  1651.     #------------------------------------------------------------------------
  1652.     unless equipment.str_plus.zero?
  1653.       x = 0
  1654.       y += 1
  1655.       h += 1
  1656.       if equipment.str_plus > 0
  1657.         text=$data_system.words.str+" +"+ equipment.str_plus.to_s
  1658.       else
  1659.         text=$data_system.words.str+" -"+ (-equipment.str_plus).to_s
  1660.       end
  1661.       self.contents.font.color = Color.new(255, 0, 0)
  1662.       self.contents.font.size = size
  1663.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)  
  1664.     end
  1665.     #------------------------------------------------------------------------
  1666.     # ● 靈巧
  1667.     #------------------------------------------------------------------------
  1668.     unless equipment.dex_plus.zero?
  1669.       x = 0
  1670.       y += 1
  1671.       h += 1
  1672.       if equipment.dex_plus > 0
  1673.         text=$data_system.words.dex+" +"+ equipment.dex_plus.to_s
  1674.       else
  1675.         text=$data_system.words.dex+" -"+ (-equipment.dex_plus).to_s
  1676.       end
  1677.       self.contents.font.color = Color.new(255, 0, 0)
  1678.       self.contents.font.size = size
  1679.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1680.     end
  1681.     #------------------------------------------------------------------------
  1682.     # ● 速度
  1683.     #------------------------------------------------------------------------
  1684.     unless equipment.agi_plus.zero?
  1685.       x = 0
  1686.       y += 1
  1687.       h += 1
  1688.       if equipment.agi_plus > 0
  1689.         text=$data_system.words.agi+" +"+ equipment.agi_plus.to_s
  1690.       else
  1691.         text=$data_system.words.agi+" -"+ (-equipment.agi_plus).to_s
  1692.       end
  1693.       self.contents.font.color = Color.new(255, 0, 0)
  1694.       self.contents.font.size = size
  1695.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1696.     end
  1697.     #------------------------------------------------------------------------
  1698.     # ● 智力
  1699.     #------------------------------------------------------------------------
  1700.     unless equipment.int_plus.zero?
  1701.       x = 0
  1702.       y += 1
  1703.       h += 1
  1704.       if equipment.int_plus > 0
  1705.         text=$data_system.words.int+" +"+ equipment.int_plus.to_s
  1706.       else
  1707.         text=$data_system.words.int+" -"+ (-equipment.int_plus).to_s
  1708.       end
  1709.       self.contents.font.color = Color.new(255, 0, 0)
  1710.       self.contents.font.size = size
  1711.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1712.     end
  1713.     #------------------------------------------------------------------------
  1714.     # ● 魔力石描繪
  1715.     #------------------------------------------------------------------------
  1716.     y += draw_materia(equipment, move, y, size) unless self.materia.nil?
  1717.   end
  1718.   #--------------------------------------------------------------------------
  1719.   # ● 物品幫助窗口
  1720.   #--------------------------------------------------------------------------
  1721.   def set_item_text(item)
  1722.     # 取得描述
  1723.     description = item.description.clone
  1724.     # 取得屬性、附加狀態、解除狀態之副本
  1725.     element_set = item.element_set.clone
  1726.     plus_state_set = item.plus_state_set.clone
  1727.     minus_state_set = item.minus_state_set.clone
  1728.     # 過濾不顯示的描述
  1729.     element_set -= @unshow_elements
  1730.     plus_state_set -= @unshow_states
  1731.     minus_state_set -= @unshow_states
  1732.     # 初始化數據設定
  1733.     x = 0
  1734.     y = 0
  1735.     h = 0
  1736.     phrase = {}
  1737.     scope ={}
  1738.     parameter_type = {}
  1739.  
  1740.     # 基本數據設定
  1741. =begin
  1742.     name_size = 名字文字大小
  1743.     size = 描述文字大小
  1744.     word = 每行的描述文字數
  1745.     move = 全體描述偏移幅度
  1746. =end
  1747.     name_size = 18
  1748.     size = 14
  1749.     word = 12
  1750.     move = 80
  1751.  
  1752.     # 基本文字設定
  1753.     phrase["scope"] = "范围:"
  1754.     phrase["price"] = "价格:"
  1755.     phrase["recover_hp_rate"] = "HP 回复率:"
  1756.     phrase["recover_hp"] = "HP 回复量:"
  1757.     phrase["recover_sp_rate"] = "SP 回复率:"
  1758.     phrase["recover_sp"] = "SP 回复量:"
  1759.     phrase["elements"] = "属性:"
  1760.     phrase["plus"] = "附加"
  1761.     phrase["minus"] = "解除"
  1762.     phrase["states"] = "状态"
  1763.     scope[0] = "特殊物品"
  1764.     scope[1] = "特殊物品"
  1765.     scope[2] = "敌单体"
  1766.     scope[3] = "敌全体"
  1767.     scope[4] = "己方单体"
  1768.     scope[5] = "己方全体"
  1769.     scope[6] = "己方昏死单体"
  1770.     scope[7] = "己方昏死全体"
  1771.     scope[8] = "使用者"
  1772.  
  1773.     parameter_type[1] = "MaxHP"
  1774.     parameter_type[2] = "MaxSP"
  1775.     parameter_type[3] = $data_system.words.str
  1776.     parameter_type[4] = $data_system.words.dex
  1777.     parameter_type[5] = $data_system.words.agi
  1778.     parameter_type[6] = $data_system.words.int
  1779.  
  1780.     #依顯示内容確定自身高
  1781.     h = (description.size/3/word)
  1782.     h +=1 if (description.size/3%word)> 0
  1783.     now_h = h
  1784.     h +=3  # 空行,效果範圍,價格
  1785.     h += 1 unless item.recover_hp_rate.zero?
  1786.     h += 1 unless item.recover_hp.zero?
  1787.     h += 1 unless item.recover_sp_rate.zero?
  1788.     h += 1 unless item.recover_sp.zero?
  1789.     h += 1 unless item.parameter_type.zero?
  1790.     h += 1 unless element_set[0].nil?
  1791.     h += 1 unless element_set[4].nil?
  1792.     h += (1+plus_state_set.size) unless plus_state_set.empty?
  1793.     h += (1+minus_state_set.size) unless minus_state_set.empty?
  1794.     #------------------------------------------------------------------------
  1795.     # ● 圖片顯示保證高度
  1796.     #------------------------------------------------------------------------
  1797.     h = 6 + now_h if (h - now_h) < 6
  1798.     #------------------------------------------------------------------------
  1799.     # ● 換算高度
  1800.     #------------------------------------------------------------------------
  1801.     self.height = h * size + name_size + 32
  1802.     #------------------------------------------------------------------------
  1803.     # ● 生成背景
  1804.     #------------------------------------------------------------------------
  1805.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1806.     self.contents.clear
  1807.     #------------------------------------------------------------------------
  1808.     # ● 名字描繪
  1809.     #------------------------------------------------------------------------
  1810.     text = item.name
  1811.     self.contents.font.color = normal_color#顔色腳本
  1812.     self.contents.font.size = name_size
  1813.     if text.nil?
  1814.       self.visible = false
  1815.     else
  1816.       self.visible = true
  1817.       self.contents.draw_text(0,0, text.size*7, 20, text, 0)
  1818.     end
  1819.     #------------------------------------------------------------------------
  1820.     # ● 說明描繪
  1821.     #------------------------------------------------------------------------
  1822.     x = 0
  1823.     y += 1
  1824.     while ((text = description.slice!(/./m)) != nil)
  1825.       self.contents.font.color = normal_color
  1826.       self.contents.font.size = size
  1827.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  1828.       x+=1
  1829.       if x == word
  1830.         x = 0
  1831.         y += 1
  1832.       end
  1833.     end
  1834.     #------------------------------------------------------------------------
  1835.     # ● 圖標描繪
  1836.     #------------------------------------------------------------------------
  1837.     bitmap = RPG::Cache.icon(item.icon_name) unless item.icon_name.nil?
  1838.     opacity = self.contents.font.color == normal_color ? 255 : 128
  1839.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  1840.     #------------------------------------------------------------------------
  1841.     # ● 魔力石接口
  1842.     #------------------------------------------------------------------------
  1843.     unless self.materia.nil?
  1844.       return if is_materia?(item)
  1845.     end
  1846.     #------------------------------------------------------------------------
  1847.     # ● 效果範圍
  1848.     #------------------------------------------------------------------------
  1849.     text= phrase["scope"] + scope[item.scope]
  1850.     x = 0
  1851.     y += 1
  1852.     self.contents.font.color = normal_color
  1853.     self.contents.font.size = size
  1854.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1855.     #------------------------------------------------------------------------
  1856.     # ● 價格
  1857.     #------------------------------------------------------------------------
  1858.     x = 0
  1859.     y += 1      
  1860.     text = phrase["price"] + item.price.to_s
  1861.     self.contents.font.color = normal_color
  1862.     self.contents.font.size = size
  1863.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1864.  
  1865.     #------------------------------------------------------------------------
  1866.     # ● HP回復率
  1867.     #------------------------------------------------------------------------
  1868.     unless item.recover_hp_rate.zero?  
  1869.       x = 0
  1870.       y += 1
  1871.       text = phrase["recover_hp_rate"] + item.recover_hp_rate.to_s+"%"
  1872.       self.contents.font.color = normal_color
  1873.       self.contents.font.size = size
  1874.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  1875.     end
  1876.     #------------------------------------------------------------------------
  1877.     # ● HP回復量
  1878.     #------------------------------------------------------------------------
  1879.     unless item.recover_hp.zero?  
  1880.       x = 0
  1881.       y += 1      
  1882.       text = phrase["recover_hp"] + item.recover_hp.to_s
  1883.       self.contents.font.color = normal_color
  1884.       self.contents.font.size = size
  1885.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1886.     end
  1887.     #------------------------------------------------------------------------
  1888.     # ● SP回復率
  1889.     #------------------------------------------------------------------------
  1890.     unless item.recover_sp_rate.zero?
  1891.       x = 0
  1892.       y += 1      
  1893.       text = phrase["recover_sp_rate"] + item.recover_sp_rate.to_s+"%"
  1894.       self.contents.font.color = normal_color
  1895.       self.contents.font.size = size
  1896.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1897.     end
  1898.     #------------------------------------------------------------------------
  1899.     # ● SP回復量
  1900.     #------------------------------------------------------------------------
  1901.     unless item.recover_sp.zero?  
  1902.       x = 0
  1903.       y += 1      
  1904.       text = phrase["elements"] + item.recover_sp.to_s
  1905.       self.contents.font.color = normal_color
  1906.       self.contents.font.size = size
  1907.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1908.     end
  1909.     #------------------------------------------------------------------------
  1910.     # ● 能力值增加
  1911.     #------------------------------------------------------------------------
  1912.     unless item.parameter_type.zero?
  1913.       x = 0
  1914.       y += 1      
  1915.       text= parameter_type[item.parameter_type]+" +"+item.parameter_points.to_s
  1916.  
  1917.       self.contents.font.color = normal_color
  1918.       self.contents.font.size = size
  1919.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1920.     end
  1921.     #------------------------------------------------------------------------
  1922.     # ● 屬性
  1923.     #------------------------------------------------------------------------
  1924.     if element_set.size > 0
  1925.       x = 0
  1926.       y += 1
  1927.       text = phrase["elements"]
  1928.       for i in 0...element_set.size
  1929.         break if i > 4
  1930.         text += $data_system.elements[element_set[i]]
  1931.       end
  1932.       self.contents.font.color = normal_color
  1933.       self.contents.font.size = size
  1934.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1935.     end
  1936.     if element_set.size >= 5
  1937.       x = (phrase["elements"].size)*5-4
  1938.       y += 1
  1939.       text = ""
  1940.       for i in 4...element_set.size
  1941.         text += $data_system.elements[element_set[i]]
  1942.       end
  1943.       self.contents.font.color = normal_color
  1944.       self.contents.font.size = size
  1945.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1946.     end
  1947.     #------------------------------------------------------------------------
  1948.     # ● 狀態添加
  1949.     #------------------------------------------------------------------------
  1950.     unless plus_state_set.empty?
  1951.       text = phrase["plus"]
  1952.       x = 0
  1953.       y += 1
  1954.       self.contents.font.color = normal_color
  1955.       self.contents.font.size = size
  1956.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1957.       plus_state_set.each do |plus_state|
  1958.         y += 1
  1959.         text = $data_states[plus_state].name        
  1960.         self.contents.font.color = normal_color
  1961.         self.contents.font.size = size
  1962.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)      
  1963.       end  
  1964.     end
  1965.     #------------------------------------------------------------------------
  1966.     # ● 狀態解除
  1967.     #------------------------------------------------------------------------
  1968.     unless minus_state_set.empty?
  1969.       text = phrase["minus"]
  1970.       x = 0
  1971.       y += 1
  1972.       self.contents.font.color = normal_color
  1973.       self.contents.font.size = size
  1974.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1975.       minus_state_set.each do |minus_state|
  1976.         y += 1
  1977.         text = $data_states[minus_state].name
  1978.         self.contents.font.color = normal_color
  1979.         self.contents.font.size = size
  1980.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  1981.       end
  1982.     end
  1983.   end
  1984.   #--------------------------------------------------------------------------
  1985.   # ● 技能帮助窗口
  1986.   #--------------------------------------------------------------------------
  1987.   def set_skill_text(skill)
  1988.     # 取得描述
  1989.     description = skill.description.clone
  1990.     # 取得屬性、附加狀態、解除狀態之副本
  1991.     element_set = skill.element_set.clone
  1992.     plus_state_set = skill.plus_state_set.clone
  1993.     minus_state_set = skill.minus_state_set.clone
  1994.     # 過濾不顯示的描述
  1995.     element_set -= @unshow_elements
  1996.     plus_state_set -= @unshow_states
  1997.     minus_state_set -= @unshow_states
  1998.     # 初始化設定
  1999.     x = 0
  2000.     y = 0
  2001.     h = 0
  2002.     phrase = {}
  2003.     scope = {}
  2004.  
  2005.     # 基本數據設定
  2006. =begin
  2007.     name_size = 名字文字大小
  2008.     size = 描述文字大小
  2009.     word = 每行的描述文字數
  2010.     move = 全體描述偏移幅度
  2011. =end
  2012.     name_size = 18
  2013.     size = 14
  2014.     word = 12
  2015.     move = 80
  2016.  
  2017.     # 基本文字設定
  2018.     phrase["scope"] = "范围:"
  2019.     #
  2020.     phrase["power"] = "威力:"
  2021.     phrase["cost_sp"] = "消耗SP:"
  2022.     phrase["hit_rate"] = "命中率:"
  2023.     phrase["elements"] = "攻击属性"
  2024.     #
  2025.     phrase["plus"] = "附加"
  2026.     phrase["minus"] = "解除"
  2027.     phrase["states"] = "状态"
  2028.     scope[0] = "特殊技能"
  2029.     scope[1] = "敌单体"
  2030.     scope[2] = "敌全体"
  2031.     scope[3] = "我方单体"
  2032.     scope[4] = "我方全体"
  2033.     scope[5] = "我方昏死(单体)"
  2034.     scope[6] = "我方昏死(全体)"
  2035.     scope[7] = "自身"
  2036.  
  2037.  
  2038.     #由描叙确定高
  2039.     h =description.size/3/word
  2040.     h += 1 if (description.size%3/word) > 0
  2041.     h += 4  #空行,效果范围,消费SP,命中率
  2042.     h += 1 unless skill.power.zero?
  2043.     h += 1 unless element_set.empty?
  2044.     h += 1 unless element_set[4].nil?
  2045.     h += plus_state_set.size
  2046.     h += minus_state_set.size
  2047.     #------------------------------------------------------------------------
  2048.     # ● 換算高度
  2049.     #------------------------------------------------------------------------
  2050.     self.height=h * size + name_size + 32  
  2051.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  2052.     self.contents.clear
  2053.  
  2054.     #------------------------------------------------------------------------
  2055.     # ● 名字描述
  2056.     #------------------------------------------------------------------------
  2057.     text = skill.name
  2058.     self.contents.font.color = normal_color
  2059.     self.contents.font.size = name_size
  2060.     if text!=nil
  2061.       self.visible = true
  2062.       self.contents.draw_text(0,0, text.size*7, name_size, text, 0)
  2063.     else
  2064.       self.visible = false
  2065.     end
  2066.  
  2067.     #------------------------------------------------------------------------
  2068.     # ● 說明描述
  2069.     #------------------------------------------------------------------------
  2070.     x = 0
  2071.     y += 1
  2072.     text = description
  2073.     while ((text = description.slice!(/./m)) != nil)
  2074.       self.contents.font.color = normal_color
  2075.       self.contents.font.size = size
  2076.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  2077.       x+=1
  2078.       if x==word#每行10个字
  2079.         x = 0
  2080.         y += 1      
  2081.       end
  2082.     end
  2083.  
  2084.     #------------------------------------------------------------------------
  2085.     # ● 攻擊範圍
  2086.     #------------------------------------------------------------------------
  2087.     text = phrase["scope"] + scope[skill.scope]
  2088.     x = 0
  2089.     y += 1
  2090.     self.contents.font.color = normal_color
  2091.     self.contents.font.size = size
  2092.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2093.     #------------------------------------------------------------------------
  2094.     # ● 空一行
  2095.     #------------------------------------------------------------------------
  2096.     y += 1
  2097.     #------------------------------------------------------------------------
  2098.     # ● 威力描述
  2099.     #------------------------------------------------------------------------
  2100.     unless skill.power.zero?
  2101.       power = skill.power > 0 ? skill.power : -1 * skill.power
  2102.       text = phrase["power"] + power.to_s
  2103.       x = 0
  2104.       y += 1
  2105.       self.contents.font.color = normal_color
  2106.       self.contents.font.size = size  
  2107.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2108.     end  
  2109.     #------------------------------------------------------------------------
  2110.     # ● 消費SP描述
  2111.     #------------------------------------------------------------------------
  2112.     text = phrase["cost_sp"] + skill.sp_cost.to_s
  2113.     x = 0
  2114.     y += 1
  2115.     self.contents.font.color = normal_color
  2116.     self.contents.font.size = size   
  2117.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2118.     #------------------------------------------------------------------------
  2119.     # ● 命中率描述
  2120.     #------------------------------------------------------------------------
  2121.     text = phrase["hit_rate"] + skill.hit.to_s + "%"
  2122.     x = 0
  2123.     y += 1
  2124.     self.contents.font.color = normal_color
  2125.     self.contents.font.size = size
  2126.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2127.     #------------------------------------------------------------------------
  2128.     # ● 攻擊屬性
  2129.     #------------------------------------------------------------------------
  2130.     if element_set.size > 0
  2131.       text=phrase["elements"]
  2132.       for i in 0...element_set.size
  2133.         if i < 4
  2134.           text+=$data_system.elements[element_set[i]]
  2135.         else
  2136.           break
  2137.         end        
  2138.       end
  2139.       x = 0
  2140.       y += 1
  2141.       self.contents.font.color = normal_color
  2142.       self.contents.font.size = size
  2143.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2144.     end
  2145.     if element_set.size >= 5
  2146.       text=""
  2147.       for i in 4...element_set.size
  2148.         text+=$data_system.elements[element_set[i]]
  2149.       end
  2150.       x= (phrase["elements"].size)*3
  2151.       y += 1
  2152.       self.contents.font.color = normal_color
  2153.       self.contents.font.size = size
  2154.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2155.     end
  2156.     #------------------------------------------------------------------------
  2157.     # ● 狀態附加
  2158.     #------------------------------------------------------------------------
  2159.     unless plus_state_set.empty?
  2160.       text= phrase["plus"]
  2161.       x = 0
  2162.       y += 1
  2163.       self.contents.font.color = normal_color
  2164.       self.contents.font.size = size
  2165.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2166.       plus_state_set.each do |plus_state|
  2167.         y += 1
  2168.         text=$data_states[plus_state].name        
  2169.         self.contents.font.color = normal_color
  2170.         self.contents.font.size = size
  2171.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  2172.       end  
  2173.     end
  2174.     #------------------------------------------------------------------------
  2175.     # ●狀態解除
  2176.     #------------------------------------------------------------------------
  2177.     unless minus_state_set.empty?
  2178.       text = phrase["minus"]
  2179.       x = 0
  2180.       y += 1
  2181.       self.contents.font.color = normal_color
  2182.       self.contents.font.size=size
  2183.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2184.       minus_state_set.each do |minus_state|
  2185.         y += 1
  2186.         text=$data_states[minus_state].name        
  2187.         self.contents.font.color = normal_color
  2188.         self.contents.font.size=size
  2189.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  2190.       end  
  2191.     end     
  2192.   end
  2193.   #--------------------------------------------------------------------------
  2194.   # ● 设置角色
  2195.   #     actor : 要显示状态的角色
  2196.   #--------------------------------------------------------------------------
  2197.   def set_actor(actor)
  2198.     if actor != @actor
  2199.       self.contents.clear
  2200.       draw_actor_name(actor, 4, 0)
  2201.       draw_actor_state(actor, 140, 0)
  2202.       draw_actor_hp(actor, 284, 0)
  2203.       draw_actor_sp(actor, 460, 0)
  2204.       @actor = actor
  2205.       @text = nil
  2206.       self.visible = true
  2207.     end
  2208.   end
  2209.   #--------------------------------------------------------------------------
  2210.   # ● 設置角色
  2211.   #     actor : 要顯示狀態之角色
  2212.   #--------------------------------------------------------------------------
  2213.   def set_actor(actor)
  2214.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  2215.     if actor != @actor
  2216.       self.contents.clear
  2217.       draw_actor_name(actor, 4, 0)
  2218.       draw_actor_state(actor, 140, 0)
  2219.       draw_actor_hp(actor, 284, 0)
  2220.       draw_actor_sp(actor, 460, 0)
  2221.       @actor = actor
  2222.       @text = nil
  2223.       self.visible = true
  2224.     end
  2225.   end
  2226.   #--------------------------------------------------------------------------
  2227.   # ● 設置敵人
  2228.   #     enemy : 要顯示名字與狀態之敵人
  2229.   #--------------------------------------------------------------------------
  2230.   def set_enemy(enemy)
  2231.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  2232.     text = enemy.name.sub(/\\[Ff]\[([0-9]+)\]/) {""}
  2233.     state_text = make_battler_state_text(enemy, 112, false)
  2234.     if state_text != ""
  2235.       text += "  " + state_text
  2236.     end
  2237.     set_text(text, 1)
  2238.     self.visible = true
  2239.   end
  2240.   #--------------------------------------------------------------------------
  2241.   # ● 校正帮助窗口位置
  2242.   #--------------------------------------------------------------------------
  2243.   def set_pos(x,y,width,oy,index,column_max)
  2244.     #光标坐标
  2245.     cursor_width = width / column_max - 32
  2246.     xx = index % column_max * (cursor_width + 32)
  2247.     yy = index / column_max * 32 - oy
  2248.     self.x=xx+x+150
  2249.     self.y=yy+y+30
  2250.     if self.x+self.width>640
  2251.       self.x=640-self.width
  2252.     end
  2253.     if self.y+self.height>480
  2254.       self.y=480-self.height
  2255.     end  
  2256.   end
  2257.   #------------------------------------------------------------------------
  2258.   # ● 裝備名字顔色變化 接口
  2259.   #------------------------------------------------------------------------
  2260.   def draw_name_color(equipment)
  2261.     return normal_color
  2262.   end
  2263.   #------------------------------------------------------------------------
  2264.   # ● 自身身份確認
  2265.   #------------------------------------------------------------------------
  2266.   def original_help?
  2267.     return false
  2268.   end
  2269. end
  2270.  
  2271. #------------------------------------------------------------------------------
  2272.  
  2273.  
  2274.  
  2275. #------------------------------------------------------------------------------
  2276. #==============================================================================
  2277. # ■ Window_Item
  2278. #------------------------------------------------------------------------------
  2279. #  物品画面、战斗画面、显示浏览物品的窗口。
  2280. #==============================================================================
  2281.  
  2282. class Window_Item < Window_Selectable
  2283.   #--------------------------------------------------------------------------
  2284.   # ● 初始化对像
  2285.   #--------------------------------------------------------------------------
  2286.   def initialize
  2287.     super(0, 64-64, 640, 416+64)
  2288.     @column_max = 2
  2289.     refresh
  2290.     self.index = 0
  2291.     # 战斗中的情况下将窗口移至中央并将其半透明化
  2292.     if $game_temp.in_battle
  2293.       self.y = 64
  2294.       self.height = 256
  2295.       self.back_opacity = 160
  2296.     end
  2297.   end
  2298.   #--------------------------------------------------------------------------
  2299.   # ● 刷新帮助文本
  2300.   #--------------------------------------------------------------------------
  2301.   def update_help
  2302.     @help_window.set_text(item)
  2303.     #校正帮助窗口位置
  2304.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2305.   end
  2306. end
  2307. #------------------------------------------------------------------------------
  2308.  
  2309.  
  2310.  
  2311. #------------------------------------------------------------------------------
  2312. #==============================================================================
  2313. # ■ Window_Skill
  2314.  
  2315.  
  2316.  
  2317.  
  2318.  
  2319.  
  2320.  
  2321.  
  2322. #------------------------------------------------------------------------------
  2323. #==============================================================================
  2324. # ■ Window_EquipLeft
  2325. #------------------------------------------------------------------------------
  2326. #  装备画面的、显示角色能力值变化的窗口。
  2327. #==============================================================================
  2328. class Window_EquipLeft < Window_Base
  2329.   #--------------------------------------------------------------------------
  2330.   # ● 初始化对像
  2331.   #     actor : 角色
  2332.   #--------------------------------------------------------------------------
  2333.   def initialize(actor)
  2334. # -------------------
  2335. # 修改開始
  2336.     super(0, 64-64, 272, 416+64)#★★★★★★★★★★★★★★★★★★★★
  2337. # 修改終了
  2338. # -------------------
  2339.     self.contents = Bitmap.new(width - 32, height - 32)
  2340.     @actor = actor
  2341.     refresh
  2342.   end
  2343. end
  2344. #------------------------------------------------------------------------------
  2345.  
  2346.  
  2347.  
  2348. #------------------------------------------------------------------------------
  2349. #==============================================================================
  2350. # ■ Window_EquipRight
  2351. #------------------------------------------------------------------------------
  2352. #  装备画面、显示角色现在装备的物品的窗口。
  2353. #==============================================================================
  2354.  
  2355. class Window_EquipRight < Window_Selectable
  2356.   #--------------------------------------------------------------------------
  2357.   # ● 初始化对像
  2358.   #     actor : 角色
  2359.   #--------------------------------------------------------------------------
  2360.   def initialize(actor)
  2361. # -------------------
  2362. # 修改開始
  2363.     super(240, 24, 368, 256+64)#★★★★★★★★★★★★★★★★★★★★
  2364. # 修改終了
  2365. # -------------------
  2366.     self.contents = Bitmap.new(width - 32, height - 32)
  2367.        self.opacity = 0
  2368.     @actor = actor
  2369.     refresh
  2370.     self.index = 0
  2371.   end
  2372.   #--------------------------------------------------------------------------
  2373.   # ● 刷新帮助文本
  2374.   #--------------------------------------------------------------------------
  2375.  
  2376.   def update_help
  2377.     @help_window.set_text(item)
  2378.     #校正帮助窗口位置
  2379.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2380.   end
  2381. end
  2382. #------------------------------------------------------------------------------
  2383.  
  2384.  
  2385.  
  2386. #------------------------------------------------------------------------------
  2387. #==============================================================================
  2388. # ■ Window_EquipItem
  2389. #------------------------------------------------------------------------------
  2390. #  装备画面、显示浏览变更装备的候补物品的窗口。
  2391. #==============================================================================
  2392.  
  2393. class Window_EquipItem < Window_Selectable
  2394.   #--------------------------------------------------------------------------
  2395.   # ● 初始化对像
  2396.   #     actor      : 角色
  2397.   #     equip_type : 装备部位 (0~3)
  2398.   #--------------------------------------------------------------------------
  2399.   def initialize(actor, equip_type)
  2400. # -------------------
  2401. # 修改開始
  2402.     super(224, 254, 368, 160)#★★★★★★★★★★★★★★★★★★★★
  2403. # 修改終了
  2404. # -------------------
  2405.     @actor = actor
  2406.     @equip_type = equip_type
  2407.     @column_max = 1
  2408.  
  2409.     refresh
  2410.     self.active = false
  2411.     self.index = -1
  2412.   end
  2413.   def update_help
  2414.     @help_window.set_text(item)
  2415.     #校正帮助窗口位置
  2416.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2417.   end
  2418. end
  2419. #------------------------------------------------------------------------------
  2420.  
  2421. #------------------------------------------------------------------------------
  2422. #==============================================================================
  2423. # ■ Scene_Equip
  2424. #------------------------------------------------------------------------------
  2425. #  处理装备画面的类。
  2426. #==============================================================================
  2427.  
  2428. class Scene_Equip
  2429.   #--------------------------------------------------------------------------
  2430.   # ● 刷新画面 (右侧窗口被激活的情况下)
  2431.   #--------------------------------------------------------------------------
  2432.   def update_right
  2433. # -------------------
  2434. # 修改開始
  2435.     if @right_window.item==nil
  2436.         @help_window.visible=false
  2437.     else
  2438.         @help_window.visible=true
  2439.     end
  2440. # 修改終了
  2441. # -------------------
  2442.     # 按下 B 键的情况下
  2443.     if Input.trigger?(Input::B)
  2444.       # 演奏取消 SE
  2445.       $game_system.se_play($data_system.cancel_se)
  2446.       # 切换到菜单画面
  2447.       $scene = Scene_Map.new
  2448.       return
  2449.     end
  2450.     # 按下 C 键的情况下
  2451.     if Input.trigger?(Input::C)
  2452.       # 固定装备的情况下
  2453.       if @actor.equip_fix?(@right_window.index)
  2454.         # 演奏冻结 SE
  2455.         $game_system.se_play($data_system.buzzer_se)
  2456.         return
  2457.       end
  2458.       # 演奏确定 SE
  2459.       $game_system.se_play($data_system.decision_se)
  2460.       # 激活物品窗口
  2461.       @right_window.active = false
  2462.       @item_window.active = true
  2463.       @item_window.index = 0
  2464.       return
  2465.     end
  2466.     # 按下 R 键的情况下
  2467.     if Input.trigger?(Input::R)
  2468.       # 演奏光标 SE
  2469.       $game_system.se_play($data_system.cursor_se)
  2470.       # 移至下一位角色
  2471.       @actor_index += 1
  2472.       @actor_index %= $game_party.actors.size
  2473.       # 切换到别的装备画面
  2474.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  2475.       return
  2476.     end
  2477.     # 按下 L 键的情况下
  2478.     if Input.trigger?(Input::L)
  2479.       # 演奏光标 SE
  2480.       $game_system.se_play($data_system.cursor_se)
  2481.       # 移至上一位角色
  2482.       @actor_index += $game_party.actors.size - 1
  2483.       @actor_index %= $game_party.actors.size
  2484.       # 切换到别的装备画面
  2485.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  2486.       return
  2487.     end
  2488.   end
  2489.   #--------------------------------------------------------------------------
  2490.   # ● 刷新画面 (物品窗口被激活的情况下)
  2491.   #--------------------------------------------------------------------------
  2492.   def update_item
  2493. # -------------------
  2494. # 修改開始
  2495.     if @item_window.item==nil
  2496.         @help_window.visible=false
  2497.     else
  2498.         @help_window.visible=true
  2499.     end
  2500. # 修改終了
  2501. # -------------------
  2502.     # 按下 B 键的情况下
  2503.     if Input.trigger?(Input::B)
  2504.       # 演奏取消 SE
  2505.       $game_system.se_play($data_system.cancel_se)
  2506.       # 激活右侧窗口
  2507.       @right_window.active = true
  2508.       @item_window.active = false
  2509.       @item_window.index = -1
  2510.       return
  2511.     end
  2512.     # 按下 C 键的情况下
  2513.     if Input.trigger?(Input::C)
  2514.       # 演奏装备 SE
  2515.       $game_system.se_play($data_system.equip_se)
  2516.       # 获取物品窗口现在选择的装备数据
  2517.       item = @item_window.item
  2518.       # 变更装备
  2519.       @actor.equip(@right_window.index, item == nil ? 0 : item.id)
  2520.       # 激活右侧窗口
  2521.       @right_window.active = true
  2522.       @item_window.active = false
  2523.       @item_window.index = -1
  2524.       # 再生成右侧窗口、物品窗口的内容
  2525.       @right_window.refresh
  2526.       @item_window.refresh
  2527.       return
  2528.     end
  2529.   end
  2530. end
  2531. #------------------------------------------------------------------------------
  2532.  
  2533.  
  2534.  
  2535. #------------------------------------------------------------------------------
  2536. #========================================================================================================================
  2537. # ■ Scene_Battle (分割定义 3)
  2538. #------------------------------------------------------------------------------
  2539. #  处理战斗画面的类。
  2540. #========================================================================================================================
  2541.  
  2542. class Scene_Battle
  2543.   #--------------------------------------------------------------------------
  2544.   # ● 刷新画面 (角色命令回合 : 选择特技)
  2545.   #--------------------------------------------------------------------------
  2546.   alias first_reupdate_phase3_skill_select update_phase3_skill_select
  2547.   def update_phase3_skill_select
  2548. # -------------------
  2549. # 修改開始
  2550.     @skill_window.help_window.visible = false#★★★★★★★★★★★★★
  2551. # 修改終了
  2552. # -------------------
  2553.     first_reupdate_phase3_skill_select
  2554.   end
  2555.   #--------------------------------------------------------------------------
  2556.   # ● 刷新画面 (角色命令回合 : 选择物品)
  2557.   #--------------------------------------------------------------------------
  2558.   alias first_reupdate_phase3_item_select update_phase3_item_select  
  2559.   def update_phase3_item_select
  2560. # -------------------
  2561. # 修改開始
  2562.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  2563. # 修改終了
  2564. # -------------------
  2565.     first_reupdate_phase3_item_select
  2566.   end
  2567.   #--------------------------------------------------------------------------
  2568.   # ● 开始选择特技
  2569.   #--------------------------------------------------------------------------
  2570.   def start_skill_select
  2571.     @skill_window = Window_Skill.new(@active_battler)
  2572.     @skill_window.help_window = Window_Help.new
  2573.     @actor_command_window.active = false
  2574.     @actor_command_window.visible = false
  2575.   end
  2576.   #--------------------------------------------------------------------------
  2577.   # ● 选择特技结束
  2578.   #--------------------------------------------------------------------------
  2579.   alias first_update_end_skill_select end_skill_select  
  2580.   def end_skill_select
  2581. # -------------------
  2582. # 修改開始
  2583.     @skill_window.help_window.visible = false#★★★★★★★★★★★★
  2584. # 修改終了
  2585. # -------------------
  2586.     first_update_end_skill_select
  2587.   end
  2588.   #--------------------------------------------------------------------------
  2589.   # ● 开始选择物品
  2590.   #--------------------------------------------------------------------------
  2591.   def start_item_select
  2592.     # 生成物品窗口
  2593.     @item_window = Window_Item.new
  2594.     # 关联帮助窗口
  2595. # -------------------
  2596. # 修改開始
  2597.     @item_window.help_window =  Window_Help.new#★★★★★★★★★★★★
  2598. # 修改終了
  2599. # -------------------
  2600.     # 无效化角色指令窗口
  2601.     @actor_command_window.active = false
  2602.     @actor_command_window.visible = false
  2603.   end
  2604.   #--------------------------------------------------------------------------
  2605.   # ● 结束选择物品
  2606.   #--------------------------------------------------------------------------
  2607.   alias first_update_end_item_select end_item_select
  2608.   def end_item_select
  2609. # -------------------
  2610. # 修改開始
  2611.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  2612. # 修改終了
  2613. # -------------------
  2614.     first_update_end_item_select
  2615.   end
  2616. end
  2617. #------------------------------------------------------------------------------


装备栏可以显示属性,技能也可以 就是商店和物品栏不显示 求助!!! 求高手帮忙弄下

无咯.png (49.17 KB, 下载次数: 4)

无咯.png

Lv1.梦旅人

梦石
0
星屑
50
在线时间
114 小时
注册时间
2012-4-25
帖子
163
2
 楼主| 发表于 2013-2-10 18:14:24 | 只看该作者
顺便再说个东西就是这个脚本,武器不能颜色描绘,也帮我看看
回复 支持 反对

使用道具 举报

Lv5.捕梦者 (版主)

梦石
20
星屑
1840
在线时间
6925 小时
注册时间
2012-12-14
帖子
11485

短篇十战斗者组别冠军开拓者贵宾短篇九勇士组亚军

3
发表于 2013-2-10 18:25:43 | 只看该作者
Scene_Shop、Scene_Item被更改了吗?
大家好,这里是晨露的说。请多多指教。
刚入门RM软件制作,请大家多多帮助我哦。
落雪君的欢乐像素教程,欢迎查阅。

回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-11-23 10:06

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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