Project1

标题: 如何显示一个装备所有属性?像网游那样 [打印本页]

作者: [email protected]    时间: 2012-7-14 09:52
标题: 如何显示一个装备所有属性?像网游那样
就是把鼠标放在一个装备或者物品上面就显示  武器的名字 和属性 还有附加属性 还有有颜色的  各位大神 求助 dsu_plus_rewardpost_czw
作者: Wind2010    时间: 2012-7-14 12:00
鼠标脚本+帮助窗口脚本
一个一个搜,不要连加号一起搜索
作者: chd674    时间: 2012-7-14 16:37
我记得有个脚本可以做到但是有副作用就是存读档会有空白LZ你还敢要吗?
作者: [email protected]    时间: 2012-7-14 16:55
你发我试试啊

作者: jklpgh    时间: 2012-7-14 22:44
http://rpg.blue/forum.php?mod=viewthread&tid=239210
作者: 小学生    时间: 2012-7-20 10:39
上主站查OZ大乱斗,对你很有帮助。(V2.00D )
作者: eu国猪    时间: 2012-7-21 12:22
本帖最后由 hcm 于 2012-8-11 13:46 编辑
  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.         @actor = 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. =begin
  140.     name_size = 名字文字大小
  141.     size = 描述文字大小
  142.     word = 每行的描述文字數
  143.     move = 全體描述偏移幅度
  144. =end
  145.     name_size = 18
  146.     size = 14
  147.     word = 12
  148.     move = 80
  149.     #------------------------------------------------------------------------
  150.     # ● 確定背景圖片的高度
  151.     #------------------------------------------------------------------------
  152.     h += (description.size/3/word)
  153.     h += 1 if (description.size/3%word) > 0
  154.     h += 1 if equipment.is_a?(RPG::Weapon)
  155.     now_h = h
  156.     h += 1
  157.     h += 1 unless equipment.pdef.zero?
  158.     h += 1 unless equipment.mdef.zero?
  159.     h += 1 if element_set.size > 0
  160.     h += 1 if element_set.size >= 5
  161.     case equipment
  162.     when RPG::Weapon
  163.       h += 1 unless minus_state_set.empty?
  164.       h += minus_state_set.size
  165.       h += 1 unless plus_state_set.empty?
  166.       h += plus_state_set.size
  167.     when RPG::Armor
  168.       h += 1 unless guard_state_set.empty?
  169.       h += guard_state_set.size
  170.       h += 1 unless auto_state_id.zero?
  171.     end
  172.     h += 1
  173.     h += 1 unless equipment.str_plus.zero?
  174.     h += 1 unless equipment.dex_plus.zero?
  175.     h += 1 unless equipment.agi_plus.zero?
  176.     h += 1 unless equipment.int_plus.zero?
  177.     h += materia_height_plus(equipment) unless self.materia.nil?
  178.     #------------------------------------------------------------------------
  179.     # ● 圖片顯示保證高度
  180.     #------------------------------------------------------------------------
  181.     h = 6 + now_h if (h - now_h) < 6
  182.     #------------------------------------------------------------------------
  183.     # ● 換算高度
  184.     #------------------------------------------------------------------------
  185.     self.height = h * size + name_size + 32
  186.     #------------------------------------------------------------------------
  187.     # ● 生成背景
  188.     #------------------------------------------------------------------------
  189.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  190.     self.contents.clear
  191.     #------------------------------------------------------------------------
  192.     # ● 名字描繪
  193.     #------------------------------------------------------------------------
  194.     text = equipment.name
  195.     self.contents.font.color = draw_name_color(equipment)
  196.     self.contents.font.size = name_size
  197.     if text.nil?
  198.       self.visible = false
  199.     else
  200.       self.visible = true
  201.       self.contents.draw_text(0, 0, text.size*7, name_size, text, 0)
  202.     end
  203.     #------------------------------------------------------------------------
  204.     # ● 說明描繪
  205.     #------------------------------------------------------------------------
  206.     x = 0
  207.     y += 1
  208.     while ((text = description.slice!(/./m)) != nil)
  209.       self.contents.font.color = normal_color
  210.       self.contents.font.size = size
  211.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  212.       x+=1
  213.       if x == word
  214.         x=0
  215.         y+=1   
  216.       end
  217.     end
  218.     #------------------------------------------------------------------------
  219.     # ● 圖標描繪
  220.     #------------------------------------------------------------------------
  221.     bitmap = RPG::Cache.icon(equipment.icon_name)
  222.     opacity = self.contents.font.color == normal_color ? 255 : 128
  223.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  224.   
  225.     #------------------------------------------------------------------------
  226.     # ● 攻擊力描繪(武器)
  227.     #------------------------------------------------------------------------
  228.     if equipment.is_a?(RPG::Weapon)
  229.       x = 0
  230.       y += 1
  231.       text = $data_system.words.atk+":"+equipment.atk.to_s
  232.       self.contents.font.color = normal_color
  233.       self.contents.font.size = size
  234.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  235.     end
  236.     #------------------------------------------------------------------------
  237.     # ● 價格描繪
  238.     #------------------------------------------------------------------------
  239.     x = 0
  240.     y += 1
  241.     text = phrase["price"] + equipment.price.to_s
  242.     self.contents.font.color = normal_color
  243.     self.contents.font.size = size
  244.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  245.     #------------------------------------------------------------------------
  246.     # ● 物理防禦
  247.     #------------------------------------------------------------------------
  248.     unless equipment.pdef.zero?
  249.       x = 0
  250.       y += 1
  251.       text = $data_system.words.pdef+":"+equipment.pdef.to_s
  252.       self.contents.font.color = normal_color
  253.       self.contents.font.size = size
  254.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  255.     end
  256.     #------------------------------------------------------------------------
  257.     # ● 魔法防禦
  258.     #------------------------------------------------------------------------
  259.     unless equipment.mdef.zero?
  260.       x = 0
  261.       y += 1
  262.       text=$data_system.words.mdef+":"+equipment.mdef.to_s
  263.       self.contents.font.color = normal_color
  264.       self.contents.font.size = size
  265.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  266.     end
  267.     #------------------------------------------------------------------------
  268.     # ● 屬性
  269.     #------------------------------------------------------------------------
  270.     if element_set.size > 0
  271.       x = 0
  272.       y += 1
  273.       text = phrase["elements"]
  274.       for i in 0...element_set.size
  275.         break if i > 4
  276.         text += $data_system.elements[element_set[i]]
  277.       end
  278.       self.contents.font.color = normal_color
  279.       self.contents.font.size = size
  280.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  281.     end
  282.     if element_set.size >= 5
  283.       x = (phrase["elements"].size)*5-4
  284.       y += 1
  285.       text = ""
  286.       for i in 4...element_set.size
  287.         text += $data_system.elements[element_set[i]]
  288.       end
  289.       self.contents.font.color = normal_color
  290.       self.contents.font.size = size
  291.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  292.     end
  293.     #------------------------------------------------------------------------
  294.     # ● 描述分流 武器/防具
  295.     #------------------------------------------------------------------------
  296.     case equipment
  297.     when RPG::Weapon
  298.       #------------------------------------------------------------------------
  299.       # ● 解除狀態(武器)
  300.       #------------------------------------------------------------------------
  301.       unless minus_state_set.empty?
  302.         x = 0
  303.         y += 1
  304.         text=phrase["minus_states"]
  305.         text=phrase["guard_states"]
  306.         self.contents.font.color = normal_color
  307.         self.contents.font.size = size
  308.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  309.         for i in 0...minus_state_set.size
  310.           y += 1
  311.           text = $data_states[minus_state_set[i]].name        
  312.           self.contents.font.color = normal_color
  313.           self.contents.font.size = size
  314.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  315.         end
  316.       end
  317.       #------------------------------------------------------------------------
  318.       # ● 附加狀態(武器)
  319.       #------------------------------------------------------------------------
  320.       unless plus_state_set.empty?
  321.         x = 0
  322.         y += 1
  323.         text = phrase["plus_states"]
  324.         self.contents.font.color = normal_color
  325.         self.contents.font.size = size
  326.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  327.         for i in 0...plus_state_set.size
  328.           y += 1
  329.           text=$data_states[plus_state_set[i]].name        
  330.           self.contents.font.color = normal_color
  331.           self.contents.font.size = size
  332.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  333.         end  
  334.       end
  335.     when RPG::Armor
  336.       #------------------------------------------------------------------------
  337.       # ● 防禦狀態(防具)
  338.       #------------------------------------------------------------------------
  339.       unless guard_state_set.empty?
  340.         x = 0
  341.         y += 1
  342.         text=phrase["guard_states"]
  343.         self.contents.font.color = normal_color
  344.         self.contents.font.size = size
  345.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  346.         for i in 0...guard_state_set.size
  347.           y += 1
  348.           text = $data_states[guard_state_set[i]].name        
  349.           self.contents.font.color = normal_color
  350.           self.contents.font.size = size
  351.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  352.         end
  353.       end
  354.       #------------------------------------------------------------------------
  355.       # ● 自動狀態(防具)
  356.       #------------------------------------------------------------------------
  357.       unless auto_state_id.zero?
  358.         x = 0
  359.         y += 1
  360.         text = phrase["auto_state"] + $data_states[auto_state_id].name
  361.         self.contents.font.color = normal_color
  362.         self.contents.font.size = size
  363.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  364.       end
  365.     end
  366.     #------------------------------------------------------------------------
  367.     # ● 空行
  368.     #------------------------------------------------------------------------
  369.     y+=1
  370.     #------------------------------------------------------------------------
  371.     # ● 力量
  372.     #------------------------------------------------------------------------
  373.     unless equipment.str_plus.zero?
  374.       x = 0
  375.       y += 1
  376.       h += 1
  377.       if equipment.str_plus > 0
  378.         text=$data_system.words.str+" +"+ equipment.str_plus.to_s
  379.       else
  380.         text=$data_system.words.str+" -"+ (-equipment.str_plus).to_s
  381.       end
  382.       self.contents.font.color = normal_color
  383.       self.contents.font.size = size
  384.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)  
  385.     end
  386.     #------------------------------------------------------------------------
  387.     # ● 靈巧
  388.     #------------------------------------------------------------------------
  389.     unless equipment.dex_plus.zero?
  390.       x = 0
  391.       y += 1
  392.       h += 1
  393.       if equipment.dex_plus > 0
  394.         text=$data_system.words.dex+" +"+ equipment.dex_plus.to_s
  395.       else
  396.         text=$data_system.words.dex+" -"+ (-equipment.dex_plus).to_s
  397.       end
  398.       self.contents.font.color = normal_color
  399.       self.contents.font.size = size
  400.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  401.     end
  402.     #------------------------------------------------------------------------
  403.     # ● 速度
  404.     #------------------------------------------------------------------------
  405.     unless equipment.agi_plus.zero?
  406.       x = 0
  407.       y += 1
  408.       h += 1
  409.       if equipment.agi_plus > 0
  410.         text=$data_system.words.agi+" +"+ equipment.agi_plus.to_s
  411.       else
  412.         text=$data_system.words.agi+" -"+ (-equipment.agi_plus).to_s
  413.       end
  414.       self.contents.font.color = normal_color
  415.       self.contents.font.size = size
  416.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  417.     end
  418.     #------------------------------------------------------------------------
  419.     # ● 智力
  420.     #------------------------------------------------------------------------
  421.     unless equipment.int_plus.zero?
  422.       x = 0
  423.       y += 1
  424.       h += 1
  425.       if equipment.int_plus > 0
  426.         text=$data_system.words.int+" +"+ equipment.int_plus.to_s
  427.       else
  428.         text=$data_system.words.int+" -"+ (-equipment.int_plus).to_s
  429.       end
  430.       self.contents.font.color = normal_color
  431.       self.contents.font.size = size
  432.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  433.     end
  434.     #------------------------------------------------------------------------
  435.     # ● 魔力石描繪
  436.     #------------------------------------------------------------------------
  437.     y += draw_materia(equipment, move, y, size) unless self.materia.nil?
  438.   end
  439.   #--------------------------------------------------------------------------
  440.   # ● 物品幫助窗口
  441.   #--------------------------------------------------------------------------
  442.   def set_item_text(item)
  443.     # 取得描述
  444.     description = item.description.clone
  445.     # 取得屬性、附加狀態、解除狀態之副本
  446.     element_set = item.element_set.clone
  447.     plus_state_set = item.plus_state_set.clone
  448.     minus_state_set = item.minus_state_set.clone
  449.     # 過濾不顯示的描述
  450.     element_set -= @unshow_elements
  451.     plus_state_set -= @unshow_states
  452.     minus_state_set -= @unshow_states
  453.     # 初始化數據設定
  454.     x = 0
  455.     y = 0
  456.     h = 0
  457.     phrase = {}
  458.     scope ={}
  459.     parameter_type = {}
  460.    
  461.     # 基本數據設定
  462. =begin
  463.     name_size = 名字文字大小
  464.     size = 描述文字大小
  465.     word = 每行的描述文字數
  466.     move = 全體描述偏移幅度
  467. =end
  468.     name_size = 18
  469.     size = 14
  470.     word = 12
  471.     move = 80
  472.    
  473.     # 基本文字設定
  474.     phrase["scope"] = "范围:"
  475.     phrase["price"] = "价格:"
  476.     phrase["recover_hp_rate"] = "HP 回复率:"
  477.     phrase["recover_hp"] = "HP 回复量:"
  478.     phrase["recover_sp_rate"] = "SP 回复率:"
  479.     phrase["recover_sp"] = "SP 回复量:"
  480.     phrase["elements"] = "属性:"
  481.     phrase["plus"] = "附加"
  482.     phrase["minus"] = "解除"
  483.     phrase["states"] = "状态"
  484.     scope[0] = "特殊物品"
  485.     scope[1] = "特殊物品"
  486.     scope[2] = "敌单体"
  487.     scope[3] = "敌全体"
  488.     scope[4] = "己方单体"
  489.     scope[5] = "己方全体"
  490.     scope[6] = "己方昏死单体"
  491.     scope[7] = "己方昏死全体"
  492.     scope[8] = "使用者"

  493.     parameter_type[1] = "MaxHP"
  494.     parameter_type[2] = "MaxSP"
  495.     parameter_type[3] = $data_system.words.str
  496.     parameter_type[4] = $data_system.words.dex
  497.     parameter_type[5] = $data_system.words.agi
  498.     parameter_type[6] = $data_system.words.int
  499.    
  500.     #依顯示内容確定自身高
  501.     h = (description.size/3/word)
  502.     h +=1 if (description.size/3%word)> 0
  503.     now_h = h
  504.     h +=3  # 空行,效果範圍,價格
  505.     h += 1 unless item.recover_hp_rate.zero?
  506.     h += 1 unless item.recover_hp.zero?
  507.     h += 1 unless item.recover_sp_rate.zero?
  508.     h += 1 unless item.recover_sp.zero?
  509.     h += 1 unless item.parameter_type.zero?
  510.     h += 1 unless element_set[0].nil?
  511.     h += 1 unless element_set[4].nil?
  512.     h += (1+plus_state_set.size) unless plus_state_set.empty?
  513.     h += (1+minus_state_set.size) unless minus_state_set.empty?
  514.     #------------------------------------------------------------------------
  515.     # ● 圖片顯示保證高度
  516.     #------------------------------------------------------------------------
  517.     h = 6 + now_h if (h - now_h) < 6
  518.     #------------------------------------------------------------------------
  519.     # ● 換算高度
  520.     #------------------------------------------------------------------------
  521.     self.height = h * size + name_size + 32
  522.     #------------------------------------------------------------------------
  523.     # ● 生成背景
  524.     #------------------------------------------------------------------------
  525.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  526.     self.contents.clear
  527.     #------------------------------------------------------------------------
  528.     # ● 名字描繪
  529.     #------------------------------------------------------------------------
  530.     text = item.name
  531.     self.contents.font.color = normal_color#顔色腳本
  532.     self.contents.font.size = name_size
  533.     if text.nil?
  534.       self.visible = false
  535.     else
  536.       self.visible = true
  537.       self.contents.draw_text(0,0, text.size*7, 20, text, 0)
  538.     end
  539.     #------------------------------------------------------------------------
  540.     # ● 說明描繪
  541.     #------------------------------------------------------------------------
  542.     x = 0
  543.     y += 1
  544.     while ((text = description.slice!(/./m)) != nil)
  545.       self.contents.font.color = normal_color
  546.       self.contents.font.size = size
  547.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  548.       x+=1
  549.       if x == word
  550.         x = 0
  551.         y += 1
  552.       end
  553.     end
  554.     #------------------------------------------------------------------------
  555.     # ● 圖標描繪
  556.     #------------------------------------------------------------------------
  557.     bitmap = RPG::Cache.icon(item.icon_name) unless item.icon_name.nil?
  558.     opacity = self.contents.font.color == normal_color ? 255 : 128
  559.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  560.     #------------------------------------------------------------------------
  561.     # ● 魔力石接口
  562.     #------------------------------------------------------------------------
  563.     unless self.materia.nil?
  564.       return if is_materia?(item)
  565.     end
  566.     #------------------------------------------------------------------------
  567.     # ● 效果範圍
  568.     #------------------------------------------------------------------------
  569.     text= phrase["scope"] + scope[item.scope]
  570.     x = 0
  571.     y += 1
  572.     self.contents.font.color = normal_color
  573.     self.contents.font.size = size
  574.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  575.     #------------------------------------------------------------------------
  576.     # ● 價格
  577.     #------------------------------------------------------------------------
  578.     x = 0
  579.     y += 1      
  580.     text = phrase["price"] + item.price.to_s
  581.     self.contents.font.color = normal_color
  582.     self.contents.font.size = size
  583.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  584.    
  585.     #------------------------------------------------------------------------
  586.     # ● HP回復率
  587.     #------------------------------------------------------------------------
  588.     unless item.recover_hp_rate.zero?  
  589.       x = 0
  590.       y += 1
  591.       text = phrase["recover_hp_rate"] + item.recover_hp_rate.to_s+"%"
  592.       self.contents.font.color = normal_color
  593.       self.contents.font.size = size
  594.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  595.     end
  596.     #------------------------------------------------------------------------
  597.     # ● HP回復量
  598.     #------------------------------------------------------------------------
  599.     unless item.recover_hp.zero?  
  600.       x = 0
  601.       y += 1      
  602.       text = phrase["recover_hp"] + item.recover_hp.to_s
  603.       self.contents.font.color = normal_color
  604.       self.contents.font.size = size
  605.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  606.     end
  607.     #------------------------------------------------------------------------
  608.     # ● SP回復率
  609.     #------------------------------------------------------------------------
  610.     unless item.recover_sp_rate.zero?
  611.       x = 0
  612.       y += 1      
  613.       text = phrase["recover_sp_rate"] + item.recover_sp_rate.to_s+"%"
  614.       self.contents.font.color = normal_color
  615.       self.contents.font.size = size
  616.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  617.     end
  618.     #------------------------------------------------------------------------
  619.     # ● SP回復量
  620.     #------------------------------------------------------------------------
  621.     unless item.recover_sp.zero?  
  622.       x = 0
  623.       y += 1      
  624.       text = phrase["elements"] + item.recover_sp.to_s
  625.       self.contents.font.color = normal_color
  626.       self.contents.font.size = size
  627.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  628.     end
  629.     #------------------------------------------------------------------------
  630.     # ● 能力值增加
  631.     #------------------------------------------------------------------------
  632.     unless item.parameter_type.zero?
  633.       x = 0
  634.       y += 1      
  635.       text= parameter_type[item.parameter_type]+" +"+item.parameter_points.to_s

  636.       self.contents.font.color = normal_color
  637.       self.contents.font.size = size
  638.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  639.     end
  640.     #------------------------------------------------------------------------
  641.     # ● 屬性
  642.     #------------------------------------------------------------------------
  643.     if element_set.size > 0
  644.       x = 0
  645.       y += 1
  646.       text = phrase["elements"]
  647.       for i in 0...element_set.size
  648.         break if i > 4
  649.         text += $data_system.elements[element_set[i]]
  650.       end
  651.       self.contents.font.color = normal_color
  652.       self.contents.font.size = size
  653.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  654.     end
  655.     if element_set.size >= 5
  656.       x = (phrase["elements"].size)*5-4
  657.       y += 1
  658.       text = ""
  659.       for i in 4...element_set.size
  660.         text += $data_system.elements[element_set[i]]
  661.       end
  662.       self.contents.font.color = normal_color
  663.       self.contents.font.size = size
  664.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  665.     end
  666.     #------------------------------------------------------------------------
  667.     # ● 狀態添加
  668.     #------------------------------------------------------------------------
  669.     unless plus_state_set.empty?
  670.       text = phrase["plus"]
  671.       x = 0
  672.       y += 1
  673.       self.contents.font.color = normal_color
  674.       self.contents.font.size = size
  675.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  676.       plus_state_set.each do |plus_state|
  677.         y += 1
  678.         text = $data_states[plus_state].name        
  679.         self.contents.font.color = normal_color
  680.         self.contents.font.size = size
  681.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)      
  682.       end  
  683.     end
  684.     #------------------------------------------------------------------------
  685.     # ● 狀態解除
  686.     #------------------------------------------------------------------------
  687.     unless minus_state_set.empty?
  688.       text = phrase["minus"]
  689.       x = 0
  690.       y += 1
  691.       self.contents.font.color = normal_color
  692.       self.contents.font.size = size
  693.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  694.       minus_state_set.each do |minus_state|
  695.         y += 1
  696.         text = $data_states[minus_state].name
  697.         self.contents.font.color = normal_color
  698.         self.contents.font.size = size
  699.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  700.       end
  701.     end
  702.   end
  703.   #--------------------------------------------------------------------------
  704.   # ● 技能帮助窗口
  705.   #--------------------------------------------------------------------------
  706.   def set_skill_text(skill)
  707.     # 取得描述
  708.     description = skill.description.clone
  709.     # 取得屬性、附加狀態、解除狀態之副本
  710.     element_set = skill.element_set.clone
  711.     plus_state_set = skill.plus_state_set.clone
  712.     minus_state_set = skill.minus_state_set.clone
  713.     # 過濾不顯示的描述
  714.     element_set -= @unshow_elements
  715.     plus_state_set -= @unshow_states
  716.     minus_state_set -= @unshow_states
  717.     # 初始化設定
  718.     x = 0
  719.     y = 0
  720.     h = 0
  721.     phrase = {}
  722.     scope = {}
  723.    
  724.     # 基本數據設定
  725. =begin
  726.     name_size = 名字文字大小
  727.     size = 描述文字大小
  728.     word = 每行的描述文字數
  729.     move = 全體描述偏移幅度
  730. =end
  731.     name_size = 18
  732.     size = 14
  733.     word = 12
  734.     move = 80
  735.    
  736.     # 基本文字設定
  737.     phrase["scope"] = "范围:"
  738.     #
  739.     phrase["power"] = "威力:"
  740.     phrase["cost_sp"] = "消耗SP:"
  741.     phrase["hit_rate"] = "命中率:"
  742.     phrase["elements"] = "攻击属性"
  743.     #
  744.     phrase["plus"] = "附加"
  745.     phrase["minus"] = "解除"
  746.     phrase["states"] = "状态"
  747.     scope[0] = "特殊技能"
  748.     scope[1] = "敌单体"
  749.     scope[2] = "敌全体"
  750.     scope[3] = "我方单体"
  751.     scope[4] = "我方全体"
  752.     scope[5] = "我方昏死(单体)"
  753.     scope[6] = "我方昏死(全体)"
  754.     scope[7] = "自身"

  755.    
  756.     #由描叙确定高
  757.     h =description.size/3/word
  758.     h += 1 if (description.size%3/word) > 0
  759.     h += 4  #空行,效果范围,消费SP,命中率
  760.     h += 1 unless skill.power.zero?
  761.     h += 1 unless element_set.empty?
  762.     h += 1 unless element_set[4].nil?
  763.     h += plus_state_set.size
  764.     h += minus_state_set.size
  765.     #------------------------------------------------------------------------
  766.     # ● 換算高度
  767.     #------------------------------------------------------------------------
  768.     self.height=h * size + name_size + 32  
  769.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  770.     self.contents.clear
  771.    
  772.     #------------------------------------------------------------------------
  773.     # ● 名字描述
  774.     #------------------------------------------------------------------------
  775.     text = skill.name
  776.     self.contents.font.color = Color.new(255, 255, 128, 255)
  777.     self.contents.font.size = name_size
  778.     if text!=nil
  779.       self.visible = true
  780.       self.contents.draw_text(0,0, text.size*7, name_size, text, 0)
  781.     else
  782.       self.visible = false
  783.     end
  784.    
  785.     #------------------------------------------------------------------------
  786.     # ● 說明描述
  787.     #------------------------------------------------------------------------
  788.     x = 0
  789.     y += 1
  790.     text = description
  791.     while ((text = description.slice!(/./m)) != nil)
  792.       self.contents.font.color = normal_color
  793.       self.contents.font.size = size
  794.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  795.       x+=1
  796.       if x==word#每行10个字
  797.         x = 0
  798.         y += 1      
  799.       end
  800.     end
  801.    
  802.     #------------------------------------------------------------------------
  803.     # ● 攻擊範圍
  804.     #------------------------------------------------------------------------
  805.     text = phrase["scope"] + scope[skill.scope]
  806.     x = 0
  807.     y += 1
  808.     self.contents.font.color = normal_color
  809.     self.contents.font.size = size
  810.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  811.     #------------------------------------------------------------------------
  812.     # ● 空一行
  813.     #------------------------------------------------------------------------
  814.     y += 1
  815.     #------------------------------------------------------------------------
  816.     # ● 威力描述
  817.     #------------------------------------------------------------------------
  818.     unless skill.power.zero?
  819.       power = skill.power > 0 ? skill.power : -1 * skill.power
  820.       text = phrase["power"] + power.to_s
  821.       x = 0
  822.       y += 1
  823.       self.contents.font.color = normal_color
  824.       self.contents.font.size = size  
  825.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  826.     end  
  827.     #------------------------------------------------------------------------
  828.     # ● 消費SP描述
  829.     #------------------------------------------------------------------------
  830.     text = phrase["cost_sp"] + skill.sp_cost.to_s
  831.     x = 0
  832.     y += 1
  833.     self.contents.font.color = normal_color
  834.     self.contents.font.size = size   
  835.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  836.     #------------------------------------------------------------------------
  837.     # ● 命中率描述
  838.     #------------------------------------------------------------------------
  839.     text = phrase["hit_rate"] + skill.hit.to_s + "%"
  840.     x = 0
  841.     y += 1
  842.     self.contents.font.color = normal_color
  843.     self.contents.font.size = size
  844.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  845.     #------------------------------------------------------------------------
  846.     # ● 攻擊屬性
  847.     #------------------------------------------------------------------------
  848.     if element_set.size > 0
  849.       text=phrase["elements"]
  850.       for i in 0...element_set.size
  851.         if i < 4
  852.           text+=$data_system.elements[element_set[i]]
  853.         else
  854.           break
  855.         end        
  856.       end
  857.       x = 0
  858.       y += 1
  859.       self.contents.font.color = normal_color
  860.       self.contents.font.size = size
  861.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  862.     end
  863.     if element_set.size >= 5
  864.       text=""
  865.       for i in 4...element_set.size
  866.         text+=$data_system.elements[element_set[i]]
  867.       end
  868.       x= (phrase["elements"].size)*3
  869.       y += 1
  870.       self.contents.font.color = normal_color
  871.       self.contents.font.size = size
  872.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  873.     end
  874.     #------------------------------------------------------------------------
  875.     # ● 狀態附加
  876.     #------------------------------------------------------------------------
  877.     unless plus_state_set.empty?
  878.       text= phrase["plus"]
  879.       x = 0
  880.       y += 1
  881.       self.contents.font.color = normal_color
  882.       self.contents.font.size = size
  883.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  884.       plus_state_set.each do |plus_state|
  885.         y += 1
  886.         text=$data_states[plus_state].name        
  887.         self.contents.font.color = normal_color
  888.         self.contents.font.size = size
  889.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  890.       end  
  891.     end
  892.     #------------------------------------------------------------------------
  893.     # ●狀態解除
  894.     #------------------------------------------------------------------------
  895.     unless minus_state_set.empty?
  896.       text = phrase["minus"]
  897.       x = 0
  898.       y += 1
  899.       self.contents.font.color = normal_color
  900.       self.contents.font.size=size
  901.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  902.       minus_state_set.each do |minus_state|
  903.         y += 1
  904.         text=$data_states[minus_state].name        
  905.         self.contents.font.color = normal_color
  906.         self.contents.font.size=size
  907.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  908.       end  
  909.     end     
  910.   end
  911.   #--------------------------------------------------------------------------
  912.   # ● 设置角色
  913.   #     actor : 要显示状态的角色
  914.   #--------------------------------------------------------------------------
  915.   def set_actor(actor)
  916.     if actor != @actor
  917.       self.contents.clear
  918.       draw_actor_name(actor, 4, 0)
  919.       draw_actor_state(actor, 140, 0)
  920.       draw_actor_hp(actor, 284, 0)
  921.       draw_actor_sp(actor, 460, 0)
  922.       @actor = actor
  923.       @text = nil
  924.       self.visible = true
  925.     end
  926.   end
  927.   #--------------------------------------------------------------------------
  928.   # ● 設置角色
  929.   #     actor : 要顯示狀態之角色
  930.   #--------------------------------------------------------------------------
  931.   def set_actor(actor)
  932.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  933.     if actor != @actor
  934.       self.contents.clear
  935.       draw_actor_name(actor, 4, 0)
  936.       draw_actor_state(actor, 140, 0)
  937.       draw_actor_hp(actor, 284, 0)
  938.       draw_actor_sp(actor, 460, 0)
  939.       @actor = actor
  940.       @text = nil
  941.       self.visible = true
  942.     end
  943.   end
  944.   #--------------------------------------------------------------------------
  945.   # ● 設置敵人
  946.   #     enemy : 要顯示名字與狀態之敵人
  947.   #--------------------------------------------------------------------------
  948.   def set_enemy(enemy)
  949.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  950.     text = enemy.name.sub(/\[Ff][([0-9]+)]/) {""}
  951.     state_text = make_battler_state_text(enemy, 112, false)
  952.     if state_text != ""
  953.       text += "  " + state_text
  954.     end
  955.     set_text(text, 1)
  956.     self.visible = true
  957.   end
  958.   #--------------------------------------------------------------------------
  959.   # ● 校正帮助窗口位置
  960.   #--------------------------------------------------------------------------
  961.   def set_pos(x,y,width,oy,index,column_max)
  962.     #光标坐标
  963.     cursor_width = width / column_max - 32
  964.     xx = index % column_max * (cursor_width + 32)
  965.     yy = index / column_max * 32 - oy
  966.     self.x=xx+x+150
  967.     self.y=yy+y+30
  968.     if self.x+self.width>640
  969.       self.x=640-self.width
  970.     end
  971.     if self.y+self.height>480
  972.       self.y=480-self.height
  973.     end  
  974.   end
  975.   #------------------------------------------------------------------------
  976.   # ● 裝備名字顔色變化 接口
  977.   #------------------------------------------------------------------------
  978.   def draw_name_color(equipment)
  979.     return normal_color
  980.   end
  981.   #------------------------------------------------------------------------
  982.   # ● 自身身份確認
  983.   #------------------------------------------------------------------------
  984.   def original_help?
  985.     return false
  986.   end
  987. end

  988. #------------------------------------------------------------------------------



  989. #------------------------------------------------------------------------------
  990. #==============================================================================
  991. # ■ Window_Item
  992. #------------------------------------------------------------------------------
  993. #  物品画面、战斗画面、显示浏览物品的窗口。
  994. #==============================================================================

  995. class Window_Item < Window_Selectable
  996.   #--------------------------------------------------------------------------
  997.   # ● 初始化对像
  998.   #--------------------------------------------------------------------------
  999.   def initialize
  1000.     super(0, 64-64, 640, 416+64)
  1001.     @column_max = 2
  1002.     refresh
  1003.     self.index = 0
  1004.     # 战斗中的情况下将窗口移至中央并将其半透明化
  1005.     if $game_temp.in_battle
  1006.       self.y = 64
  1007.       self.height = 256
  1008.       self.back_opacity = 160
  1009.     end
  1010.   end
  1011.   #--------------------------------------------------------------------------
  1012.   # ● 刷新帮助文本
  1013.   #--------------------------------------------------------------------------
  1014.   def update_help
  1015.     @help_window.set_text(item)
  1016.     #校正帮助窗口位置
  1017.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1018.   end
  1019. end
  1020. #------------------------------------------------------------------------------



  1021. #------------------------------------------------------------------------------
  1022. #==============================================================================
  1023. # ■ Window_Skill
  1024. #------------------------------------------------------------------------------
  1025. #  特技画面、战斗画面、显示可以使用的特技浏览的窗口。
  1026. #==============================================================================

  1027. class Window_Skill < Window_Selectable
  1028.   #--------------------------------------------------------------------------
  1029.   # ● 初始化对像
  1030.   #     actor : 角色
  1031.   #--------------------------------------------------------------------------
  1032.   def initialize(actor)
  1033.     super(0, 128, 640, 352)
  1034.     @actor = actor
  1035.     @column_max = 2
  1036.    
  1037.     refresh
  1038.     self.index = 0
  1039.     # 战斗中的情况下将窗口移至中央并将其半透明化
  1040.     if $game_temp.in_battle
  1041.       self.y = 64
  1042.       self.height = 256
  1043.       self.back_opacity = 160
  1044.     end
  1045.   end
  1046.   #--------------------------------------------------------------------------
  1047.   # ● 刷新帮助文本
  1048.   #--------------------------------------------------------------------------

  1049.   def update_help
  1050.     @help_window.set_text(skill)
  1051.     #校正帮助窗口位置
  1052.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1053.   end
  1054. end
  1055. #------------------------------------------------------------------------------



  1056. #------------------------------------------------------------------------------
  1057. #==============================================================================
  1058. # ■ Window_SkillStatus
  1059. #------------------------------------------------------------------------------
  1060. #  显示特技画面、特技使用者的窗口。
  1061. #==============================================================================

  1062. class Window_SkillStatus < Window_Base
  1063.   #--------------------------------------------------------------------------
  1064.   # ● 初始化对像
  1065.   #     actor : 角色
  1066.   #--------------------------------------------------------------------------
  1067.   def initialize(actor)
  1068. # -------------------
  1069. # 修改開始
  1070.     super(0, 64-64, 640, 64+64)#★★★★★★★★★★★★★★★★★★★★
  1071. # 修改終了
  1072. # -------------------
  1073.     self.contents = Bitmap.new(width - 32, height - 32)
  1074.     @actor = actor
  1075.     refresh
  1076.   end
  1077. end
  1078. #------------------------------------------------------------------------------



  1079. #------------------------------------------------------------------------------
  1080. #==============================================================================
  1081. # ■ Window_EquipLeft
  1082. #------------------------------------------------------------------------------
  1083. #  装备画面的、显示角色能力值变化的窗口。
  1084. #==============================================================================
  1085. class Window_EquipLeft < Window_Base
  1086.   #--------------------------------------------------------------------------
  1087.   # ● 初始化对像
  1088.   #     actor : 角色
  1089.   #--------------------------------------------------------------------------
  1090.   def initialize(actor)
  1091. # -------------------
  1092. # 修改開始
  1093.     super(0, 64-64, 272, 416+64)#★★★★★★★★★★★★★★★★★★★★
  1094. # 修改終了
  1095. # -------------------
  1096.     self.contents = Bitmap.new(width - 32, height - 32)
  1097.     @actor = actor
  1098.     refresh
  1099.   end
  1100. end
  1101. #------------------------------------------------------------------------------



  1102. #------------------------------------------------------------------------------
  1103. #==============================================================================
  1104. # ■ Window_EquipRight
  1105. #------------------------------------------------------------------------------
  1106. #  装备画面、显示角色现在装备的物品的窗口。
  1107. #==============================================================================

  1108. class Window_EquipRight < Window_Selectable
  1109.   #--------------------------------------------------------------------------
  1110.   # ● 初始化对像
  1111.   #     actor : 角色
  1112.   #--------------------------------------------------------------------------
  1113.   def initialize(actor)
  1114. # -------------------
  1115. # 修改開始
  1116.     super(272, 64-64, 368, 256+64)#★★★★★★★★★★★★★★★★★★★★
  1117. # 修改終了
  1118. # -------------------
  1119.     self.contents = Bitmap.new(width - 32, height - 32)
  1120.     @actor = actor
  1121.     refresh
  1122.     self.index = 0
  1123.   end
  1124.   #--------------------------------------------------------------------------
  1125.   # ● 刷新帮助文本
  1126.   #--------------------------------------------------------------------------

  1127.   def update_help
  1128.     @help_window.set_text(item)
  1129.     #校正帮助窗口位置
  1130.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1131.   end
  1132. end
  1133. #------------------------------------------------------------------------------



  1134. #------------------------------------------------------------------------------
  1135. #==============================================================================
  1136. # ■ Window_EquipItem
  1137. #------------------------------------------------------------------------------
  1138. #  装备画面、显示浏览变更装备的候补物品的窗口。
  1139. #==============================================================================

  1140. class Window_EquipItem < Window_Selectable
  1141.   #--------------------------------------------------------------------------
  1142.   # ● 初始化对像
  1143.   #     actor      : 角色
  1144.   #     equip_type : 装备部位 (0~3)
  1145.   #--------------------------------------------------------------------------
  1146.   def initialize(actor, equip_type)
  1147. # -------------------
  1148. # 修改開始
  1149.     super(272, 320, 368, 160)#★★★★★★★★★★★★★★★★★★★★
  1150. # 修改終了
  1151. # -------------------
  1152.     @actor = actor
  1153.     @equip_type = equip_type
  1154.     @column_max = 1
  1155.    
  1156.     refresh
  1157.     self.active = false
  1158.     self.index = -1
  1159.   end
  1160.   def update_help
  1161.     @help_window.set_text(item)
  1162.     #校正帮助窗口位置
  1163.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1164.   end
  1165. end
  1166. #------------------------------------------------------------------------------



  1167. #------------------------------------------------------------------------------
  1168. #==============================================================================
  1169. # ■ Window_ShopCommand
  1170. #------------------------------------------------------------------------------
  1171. #  商店画面、选择要做的事的窗口
  1172. #==============================================================================

  1173. class Window_ShopCommand < Window_Selectable
  1174.   #--------------------------------------------------------------------------
  1175.   # ● 初始化对像
  1176.   #--------------------------------------------------------------------------
  1177.   def initialize
  1178. # -------------------
  1179. # 修改開始
  1180.     super(0, 64-64, 480, 64)#★★★★★★★★★★★★★★★★★
  1181. # 修改終了
  1182. # -------------------
  1183.     self.contents = Bitmap.new(width - 32, height - 32)
  1184.     @item_max = 3
  1185.     @column_max = 3
  1186.     @commands = ["买", "卖", "取消"]
  1187.     refresh
  1188.     self.index = 0
  1189.   end
  1190. end
  1191. #------------------------------------------------------------------------------



  1192. #------------------------------------------------------------------------------
  1193. #========================================================================================================================
  1194. # ■ Window_ShopBuy
  1195. #------------------------------------------------------------------------------
  1196. #  商店画面、浏览显示可以购买的商品的窗口。
  1197. #==============================================================================

  1198. class Window_ShopBuy < Window_Selectable
  1199.   #--------------------------------------------------------------------------
  1200.   # ● 初始化对像
  1201.   #     shop_goods : 商品
  1202.   #--------------------------------------------------------------------------
  1203.   def initialize(shop_goods)
  1204. # -------------------
  1205. # 修改開始
  1206.     super(0, 128-64, 368, 352+64)#★★★★★★★★★★★★★★★★
  1207. # 修改終了
  1208. # -------------------
  1209.     @shop_goods = shop_goods
  1210.    
  1211.     refresh
  1212.     self.index = 0
  1213.   end
  1214.   #--------------------------------------------------------------------------
  1215.   # ● 刷新帮助文本
  1216.   #--------------------------------------------------------------------------

  1217.   def update_help
  1218.     @help_window.set_text(item)
  1219.     #校正帮助窗口位置
  1220.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1221.   end
  1222. end
  1223. #------------------------------------------------------------------------------



  1224. #------------------------------------------------------------------------------
  1225. #==============================================================================
  1226. # ■ Window_ShopSell
  1227. #------------------------------------------------------------------------------
  1228. #  商店画面、浏览显示可以卖掉的商品的窗口。
  1229. #==============================================================================

  1230. class Window_ShopSell < Window_Selectable
  1231.   #--------------------------------------------------------------------------
  1232.   # ● 初始化对像
  1233.   #--------------------------------------------------------------------------
  1234.   def initialize
  1235. # -------------------
  1236. # 修改開始
  1237.     super(0, 128-64, 640, 352+64)#★★★★★★★★★★★★★★★★
  1238. # 修改終了
  1239. # -------------------
  1240.     @column_max = 2
  1241.    
  1242.     refresh
  1243.     self.index = 0
  1244.   end
  1245.   #--------------------------------------------------------------------------
  1246.   # ● 刷新帮助文本
  1247.   #--------------------------------------------------------------------------

  1248.   def update_help
  1249.     @help_window.set_text(item)
  1250.     #校正帮助窗口位置
  1251.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1252.   end
  1253. end
  1254. #------------------------------------------------------------------------------



  1255. #------------------------------------------------------------------------------
  1256. #==============================================================================
  1257. # ■ Window_ShopNumber
  1258. #------------------------------------------------------------------------------
  1259. #  商店画面、输入买卖数量的窗口。
  1260. #==============================================================================
  1261. class Window_ShopNumber < Window_Base
  1262.   #--------------------------------------------------------------------------
  1263.   # ● 初始化对像
  1264.   #--------------------------------------------------------------------------
  1265.   def initialize
  1266. # -------------------
  1267. # 修改開始
  1268.     super(0, 128-64, 368, 352+64)#★★★★★★★★★★★★★★★★
  1269. # 修改終了
  1270. # -------------------
  1271.     self.contents = Bitmap.new(width - 32, height - 32)
  1272.     @item = nil
  1273.     @max = 1
  1274.     @price = 0
  1275.     @number = 1
  1276.   end
  1277. end
  1278. #------------------------------------------------------------------------------



  1279. #------------------------------------------------------------------------------
  1280. #==============================================================================
  1281. # ■ Window_ShopStatus
  1282. #------------------------------------------------------------------------------
  1283. #  商店画面、显示物品所持数与角色装备的窗口。
  1284. #==============================================================================

  1285. class Window_ShopStatus < Window_Base
  1286.   #--------------------------------------------------------------------------
  1287.   # ● 初始化对像
  1288.   #--------------------------------------------------------------------------
  1289.   def initialize
  1290. # -------------------
  1291. # 修改開始
  1292.     super(368, 128-64, 272, 352+64)#★★★★★★★★★★★★
  1293. # 修改終了
  1294. # -------------------
  1295.     self.contents = Bitmap.new(width - 32, height - 32)
  1296.     @item = nil
  1297.     refresh
  1298.   end
  1299. end
  1300. #------------------------------------------------------------------------------



  1301. #------------------------------------------------------------------------------
  1302. #==============================================================================
  1303. # ■ Scene_Equip
  1304. #------------------------------------------------------------------------------
  1305. #  处理装备画面的类。
  1306. #==============================================================================

  1307. class Scene_Equip
  1308.   #--------------------------------------------------------------------------
  1309.   # ● 刷新画面 (右侧窗口被激活的情况下)
  1310.   #--------------------------------------------------------------------------
  1311.   def update_right
  1312. # -------------------
  1313. # 修改開始
  1314.     if @right_window.item==nil
  1315.         @help_window.visible=false
  1316.     else
  1317.         @help_window.visible=true
  1318.     end
  1319. # 修改終了
  1320. # -------------------
  1321.     # 按下 B 键的情况下
  1322.     if Input.trigger?(Input::B)
  1323.       # 演奏取消 SE
  1324.       $game_system.se_play($data_system.cancel_se)
  1325.       # 切换到菜单画面
  1326.       $scene = Scene_Menu.new(2)
  1327.       return
  1328.     end
  1329.     # 按下 C 键的情况下
  1330.     if Input.trigger?(Input::C)
  1331.       # 固定装备的情况下
  1332.       if @actor.equip_fix?(@right_window.index)
  1333.         # 演奏冻结 SE
  1334.         $game_system.se_play($data_system.buzzer_se)
  1335.         return
  1336.       end
  1337.       # 演奏确定 SE
  1338.       $game_system.se_play($data_system.decision_se)
  1339.       # 激活物品窗口
  1340.       @right_window.active = false
  1341.       @item_window.active = true
  1342.       @item_window.index = 0
  1343.       return
  1344.     end
  1345.     # 按下 R 键的情况下
  1346.     if Input.trigger?(Input::R)
  1347.       # 演奏光标 SE
  1348.       $game_system.se_play($data_system.cursor_se)
  1349.       # 移至下一位角色
  1350.       @actor_index += 1
  1351.       @actor_index %= $game_party.actors.size
  1352.       # 切换到别的装备画面
  1353.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  1354.       return
  1355.     end
  1356.     # 按下 L 键的情况下
  1357.     if Input.trigger?(Input::L)
  1358.       # 演奏光标 SE
  1359.       $game_system.se_play($data_system.cursor_se)
  1360.       # 移至上一位角色
  1361.       @actor_index += $game_party.actors.size - 1
  1362.       @actor_index %= $game_party.actors.size
  1363.       # 切换到别的装备画面
  1364.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  1365.       return
  1366.     end
  1367.   end
  1368.   #--------------------------------------------------------------------------
  1369.   # ● 刷新画面 (物品窗口被激活的情况下)
  1370.   #--------------------------------------------------------------------------
  1371.   def update_item
  1372. # -------------------
  1373. # 修改開始
  1374.     if @item_window.item==nil
  1375.         @help_window.visible=false
  1376.     else
  1377.         @help_window.visible=true
  1378.     end
  1379. # 修改終了
  1380. # -------------------
  1381.     # 按下 B 键的情况下
  1382.     if Input.trigger?(Input::B)
  1383.       # 演奏取消 SE
  1384.       $game_system.se_play($data_system.cancel_se)
  1385.       # 激活右侧窗口
  1386.       @right_window.active = true
  1387.       @item_window.active = false
  1388.       @item_window.index = -1
  1389.       return
  1390.     end
  1391.     # 按下 C 键的情况下
  1392.     if Input.trigger?(Input::C)
  1393.       # 演奏装备 SE
  1394.       $game_system.se_play($data_system.equip_se)
  1395.       # 获取物品窗口现在选择的装备数据
  1396.       item = @item_window.item
  1397.       # 变更装备
  1398.       @actor.equip(@right_window.index, item == nil ? 0 : item.id)
  1399.       # 激活右侧窗口
  1400.       @right_window.active = true
  1401.       @item_window.active = false
  1402.       @item_window.index = -1
  1403.       # 再生成右侧窗口、物品窗口的内容
  1404.       @right_window.refresh
  1405.       @item_window.refresh
  1406.       return
  1407.     end
  1408.   end
  1409. end
  1410. #------------------------------------------------------------------------------



  1411. #------------------------------------------------------------------------------
  1412. #========================================================================================================================
  1413. # ■ Scene_Battle (分割定义 3)
  1414. #------------------------------------------------------------------------------
  1415. #  处理战斗画面的类。
  1416. #========================================================================================================================

  1417. class Scene_Battle
  1418.   #--------------------------------------------------------------------------
  1419.   # ● 刷新画面 (角色命令回合 : 选择特技)
  1420.   #--------------------------------------------------------------------------
  1421.   alias first_reupdate_phase3_skill_select update_phase3_skill_select
  1422.   def update_phase3_skill_select
  1423. # -------------------
  1424. # 修改開始
  1425.     @skill_window.help_window.visible = false#★★★★★★★★★★★★★
  1426. # 修改終了
  1427. # -------------------
  1428.     first_reupdate_phase3_skill_select
  1429.   end
  1430.   #--------------------------------------------------------------------------
  1431.   # ● 刷新画面 (角色命令回合 : 选择物品)
  1432.   #--------------------------------------------------------------------------
  1433.   alias first_reupdate_phase3_item_select update_phase3_item_select  
  1434.   def update_phase3_item_select
  1435. # -------------------
  1436. # 修改開始
  1437.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  1438. # 修改終了
  1439. # -------------------
  1440.     first_reupdate_phase3_item_select
  1441.   end
  1442.   #--------------------------------------------------------------------------
  1443.   # ● 开始选择特技
  1444.   #--------------------------------------------------------------------------
  1445.   def start_skill_select
  1446.     @skill_window = Window_Skill.new(@active_battler)
  1447.     @skill_window.help_window = Window_Help.new
  1448.     @actor_command_window.active = false
  1449.     @actor_command_window.visible = false
  1450.   end
  1451.   #--------------------------------------------------------------------------
  1452.   # ● 选择特技结束
  1453.   #--------------------------------------------------------------------------
  1454.   alias first_update_end_skill_select end_skill_select  
  1455.   def end_skill_select
  1456. # -------------------
  1457. # 修改開始
  1458.     @skill_window.help_window.visible = false#★★★★★★★★★★★★
  1459. # 修改終了
  1460. # -------------------
  1461.     first_update_end_skill_select
  1462.   end
  1463.   #--------------------------------------------------------------------------
  1464.   # ● 开始选择物品
  1465.   #--------------------------------------------------------------------------
  1466.   def start_item_select
  1467.     # 生成物品窗口
  1468.     @item_window = Window_Item.new
  1469.     # 关联帮助窗口
  1470. # -------------------
  1471. # 修改開始
  1472.     @item_window.help_window =  Window_Help.new#★★★★★★★★★★★★
  1473. # 修改終了
  1474. # -------------------
  1475.     # 无效化角色指令窗口
  1476.     @actor_command_window.active = false
  1477.     @actor_command_window.visible = false
  1478.   end
  1479.   #--------------------------------------------------------------------------
  1480.   # ● 结束选择物品
  1481.   #--------------------------------------------------------------------------
  1482.   alias first_update_end_item_select end_item_select
  1483.   def end_item_select
  1484. # -------------------
  1485. # 修改開始
  1486.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  1487. # 修改終了
  1488. # -------------------
  1489.     first_update_end_item_select
  1490.   end
  1491. end
  1492. #------------------------------------------------------------------------------



  1493. #------------------------------------------------------------------------------
  1494. #==============================================================================
  1495. # ■ Scene_Shop
  1496. #------------------------------------------------------------------------------
  1497. #  处理商店画面的类。
  1498. #==============================================================================

  1499. class Scene_Shop
  1500.   #--------------------------------------------------------------------------
  1501.   # ● 主处理
  1502.   #--------------------------------------------------------------------------
  1503. # --------------------
  1504. # 衝突可能
  1505.   def main
  1506.     # 生成帮助窗口
  1507. # -------------------
  1508. # 修改開始
  1509.     @help_window = Window_Help.new#★★★★★★★★★★★★★★★★
  1510. # 修改終了
  1511. # -------------------
  1512.     # 生成指令窗口
  1513.     @command_window = Window_ShopCommand.new
  1514.     # 生成金钱窗口
  1515.     @gold_window = Window_Gold.new
  1516.     @gold_window.x = 480
  1517. # -------------------
  1518. # 修改開始
  1519.     @gold_window.y = 64-64#★★★★★★★★★★★★★
  1520. # 修改終了
  1521. # -------------------
  1522.     # 生成时间窗口
  1523. # -------------------
  1524. # 修改開始
  1525.     @dummy_window = Window_Base.new(0, 128-64, 640, 352+64)#★★★★★★★★★★★★★
  1526. # 修改終了
  1527. # -------------------
  1528.     # 生成购买窗口
  1529.     @buy_window = Window_ShopBuy.new($game_temp.shop_goods)
  1530.     @buy_window.active = false
  1531.     @buy_window.visible = false
  1532.     @buy_window.help_window = @help_window
  1533.     # 生成卖出窗口
  1534.     @sell_window = Window_ShopSell.new
  1535.     @sell_window.active = false
  1536.     @sell_window.visible = false
  1537.     @sell_window.help_window = @help_window
  1538.     # 生成数量输入窗口
  1539.     @number_window = Window_ShopNumber.new
  1540.     @number_window.active = false
  1541.     @number_window.visible = false
  1542.     # 生成状态窗口
  1543.     @status_window = Window_ShopStatus.new
  1544.     @status_window.visible = false
  1545.     # 执行过渡
  1546.     Graphics.transition
  1547.     # 主循环
  1548.     loop do
  1549.       # 刷新游戏画面
  1550.       Graphics.update
  1551.       # 刷新输入信息
  1552.       Input.update
  1553.       # 刷新画面
  1554.       update
  1555.       # 如果画面切换的话就中断循环
  1556.       if $scene != self
  1557.         break
  1558.       end
  1559.     end
  1560.     # 准备过渡
  1561.     Graphics.freeze
  1562.     # 释放窗口
  1563.     @help_window.dispose
  1564.     @command_window.dispose
  1565.     @gold_window.dispose
  1566.     @dummy_window.dispose
  1567.     @buy_window.dispose
  1568.     @sell_window.dispose
  1569.     @number_window.dispose
  1570.     @status_window.dispose
  1571.   end
  1572.   #--------------------------------------------------------------------------
  1573.   # ● 刷新画面
  1574.   #--------------------------------------------------------------------------
  1575. # --------------------
  1576. # 衝突可能
  1577.   def update
  1578.     # 刷新窗口
  1579.     @help_window.update
  1580.     @command_window.update
  1581.     @gold_window.update
  1582.     @dummy_window.update
  1583.     @buy_window.update
  1584.     @sell_window.update
  1585.     @number_window.update
  1586.     @status_window.update
  1587.     # 指令窗口激活的情况下: 调用 update_command
  1588.     if @command_window.active
  1589. # -------------------
  1590. # 修改開始
  1591.       @help_window.visible=false#★★★★★★★★★★★★★★★★
  1592. # 修改終了
  1593. # -------------------
  1594.       update_command
  1595.       return
  1596.     end
  1597.     # 购买窗口激活的情况下: 调用 update_buy
  1598.     if @buy_window.active
  1599. # -------------------
  1600. # 修改開始
  1601.       @help_window.visible=true#★★★★★★★★★★★★★★★★
  1602.       if @buy_window.item==nil#★★★★★★★★★★★★★★★★
  1603.         @help_window.visible=false#★★★★★★★★★★★★★★★★
  1604.       end #★★★★★★★★★★★★★★★★     
  1605. # 修改終了
  1606. # -------------------
  1607.       update_buy
  1608.       return
  1609.     end
  1610.     # 卖出窗口激活的情况下: 调用 update_sell
  1611.     if @sell_window.active
  1612. # -------------------
  1613. # 修改開始
  1614.       @help_window.visible=true#★★★★★★★★★★★★★★★★
  1615.       if @sell_window.item==nil#★★★★★★★★★★★★★★★★
  1616.         @help_window.visible=false#★★★★★★★★★★★★★★★★
  1617.       end #★★★★★★★★★★★★★★★★
  1618. # 修改終了
  1619. # -------------------      
  1620.       update_sell
  1621.       return
  1622.     end
  1623.     # 个数输入窗口激活的情况下: 调用 update_number
  1624.     if @number_window.active
  1625. # -------------------
  1626. # 修改開始
  1627.       @help_window.visible=false#★★★★★★★★★★★★★★★★
  1628. # 修改終了
  1629. # -------------------
  1630.       update_number
  1631.       return
  1632.     end
  1633.   end
  1634. end


  1635. ‘‘──eu国猪于2012-7-21 12:22补充以下内容:

  1636. #==============================================================================
  1637. # 禾西製作 / Created by Quarcy
  1638. #==============================================================================
  1639. class Window_Help < Window_Base
  1640.   attr_reader :materia
  1641.   #--------------------------------------------------------------------------
  1642.   # ● 定義不顯示的屬性與狀態
  1643.   #--------------------------------------------------------------------------
  1644.   def unshown
  1645.     @unshow_elements = [17, 18]
  1646.     @unshow_states = []
  1647.   end
  1648.   #--------------------------------------------------------------------------
  1649.   # ● 初始化對象
  1650.   #--------------------------------------------------------------------------
  1651.   def initialize
  1652.     super(0, 0, 640, 64)
  1653.     self.opacity = 150
  1654.     self.z=150
  1655.     self.visible = false
  1656.   end
  1657.   #--------------------------------------------------------------------------
  1658.   # ● 設置文本
  1659.   #     data  : 窗口顯示的字符串/物品資料
  1660.   #     align : 對齊方式 (0..左對齊、1..中間對齊、2..右對齊)
  1661.   #--------------------------------------------------------------------------
  1662.   def set_text(data, align=0)
  1663.     #------------------------------------------------------------------------
  1664.     # ● 當資料爲文字時候
  1665.     #------------------------------------------------------------------------
  1666.     # 如果文本或對齊方式至少一方与上次的不同
  1667.     if data != @text or align != @align
  1668.       if data.is_a?(String)
  1669.         # 再描繪文本
  1670.         self.width = 640
  1671.         self.height = 64
  1672.         self.x=0
  1673.         self.y=0
  1674.         self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  1675.         self.contents.clear
  1676.         self.contents.font.color = normal_color
  1677.         self.contents.font.size = 20
  1678.         self.contents.draw_text(4, 0, self.width - 40, 32, data, align)
  1679.         @text = data
  1680.         @align = align
  1681.         @actor = nil
  1682.         self.visible = true
  1683.       end
  1684.     end
  1685.     return if data.is_a?(String)
  1686.     #------------------------------------------------------------------------
  1687.     # ● 當沒有資料時候
  1688.     #------------------------------------------------------------------------
  1689.     if data.nil?
  1690.       self.visible=false
  1691.     else
  1692.       self.visible=true
  1693.     end
  1694.     #------------------------------------------------------------------------
  1695.     # ● 當資料爲物品/技能時候
  1696.     #------------------------------------------------------------------------
  1697.     if data != nil && @data != data
  1698.       self.width = 210
  1699.       self.height = 430
  1700.       self.x=0
  1701.       self.y=200
  1702.       unshown
  1703.       non_auto_update(data)
  1704.     else
  1705.       return
  1706.     end
  1707.   end
  1708.   #--------------------------------------------------------------------------
  1709.   # ● 更新帮助窗口
  1710.   #--------------------------------------------------------------------------
  1711.   def non_auto_update(data=@data)
  1712.     @data = data
  1713.     case @data
  1714.     when RPG::Item
  1715.       set_item_text(@data)
  1716.     when RPG::Weapon
  1717.       set_equipment_text(@data)
  1718.     when RPG::Armor
  1719.       set_equipment_text(@data)
  1720.     when RPG::Skill
  1721.       set_skill_text(@data)
  1722.     end
  1723.   end
  1724.   #--------------------------------------------------------------------------
  1725.   # ● 裝備帮助窗口
  1726.   #--------------------------------------------------------------------------
  1727.   def set_equipment_text(equipment)
  1728.     #------------------------------------------------------------------------
  1729.     # ● 取得基本質料
  1730.     #------------------------------------------------------------------------
  1731.     # 取得屬性、附加狀態、解除狀態之副本
  1732.     case equipment
  1733.     when RPG::Weapon
  1734.       element_set = equipment.element_set.clone
  1735.       plus_state_set = equipment.plus_state_set.clone
  1736.       minus_state_set = equipment.minus_state_set.clone
  1737.       #----------------------#
  1738.       # 過濾不顯示的狀態描述 #
  1739.       #----------------------#
  1740.       plus_state_set -= @unshow_states
  1741.       minus_state_set -= @unshow_states
  1742.     when RPG::Armor
  1743.       element_set = equipment.guard_element_set.clone
  1744.       guard_state_set = equipment.guard_state_set.clone
  1745.       #----------------------#
  1746.       # 過濾不顯示的狀態描述 #
  1747.       #----------------------#
  1748.       auto_state_id = equipment.auto_state_id
  1749.       guard_state_set -= @unshow_states
  1750.     end
  1751.     #----------------------#
  1752.     # 過濾不顯示的屬性描述 #
  1753.     #----------------------#
  1754.     element_set -= @unshow_elements
  1755.     #--------------#
  1756.     # 取得說明文字 #
  1757.     #--------------#
  1758.     description = equipment.description.clone
  1759.     # 初始化數據設定
  1760.     x = 0
  1761.     y = 0
  1762.     h = 0
  1763.     phrase = {}
  1764.    
  1765.     # 基本文字設定
  1766.     phrase["price"] = "价格:"
  1767.     phrase["elements"] = "属性:"
  1768.     phrase["minus_states"] = "解除状态:"
  1769.     phrase["plus_states"] = "附加状态:"
  1770.     phrase["guard_elements"] = "防御属性"
  1771.     phrase["guard_states"] = "防御状态"
  1772.     phrase["auto_state"] = "自动状态"

  1773.     # 基本數據設定
  1774. =begin
  1775.     name_size = 名字文字大小
  1776.     size = 描述文字大小
  1777.     word = 每行的描述文字數
  1778.     move = 全體描述偏移幅度
  1779. =end
  1780.     name_size = 18
  1781.     size = 14
  1782.     word = 12
  1783.     move = 80
  1784.     #------------------------------------------------------------------------
  1785.     # ● 確定背景圖片的高度
  1786.     #------------------------------------------------------------------------
  1787.     h += (description.size/3/word)
  1788.     h += 1 if (description.size/3%word) > 0
  1789.     h += 1 if equipment.is_a?(RPG::Weapon)
  1790.     now_h = h
  1791.     h += 1
  1792.     h += 1 unless equipment.pdef.zero?
  1793.     h += 1 unless equipment.mdef.zero?
  1794.     h += 1 if element_set.size > 0
  1795.     h += 1 if element_set.size >= 5
  1796.     case equipment
  1797.     when RPG::Weapon
  1798.       h += 1 unless minus_state_set.empty?
  1799.       h += minus_state_set.size
  1800.       h += 1 unless plus_state_set.empty?
  1801.       h += plus_state_set.size
  1802.     when RPG::Armor
  1803.       h += 1 unless guard_state_set.empty?
  1804.       h += guard_state_set.size
  1805.       h += 1 unless auto_state_id.zero?
  1806.     end
  1807.     h += 1
  1808.     h += 1 unless equipment.str_plus.zero?
  1809.     h += 1 unless equipment.dex_plus.zero?
  1810.     h += 1 unless equipment.agi_plus.zero?
  1811.     h += 1 unless equipment.int_plus.zero?
  1812.     h += materia_height_plus(equipment) unless self.materia.nil?
  1813.     #------------------------------------------------------------------------
  1814.     # ● 圖片顯示保證高度
  1815.     #------------------------------------------------------------------------
  1816.     h = 6 + now_h if (h - now_h) < 6
  1817.     #------------------------------------------------------------------------
  1818.     # ● 換算高度
  1819.     #------------------------------------------------------------------------
  1820.     self.height = h * size + name_size + 32
  1821.     #------------------------------------------------------------------------
  1822.     # ● 生成背景
  1823.     #------------------------------------------------------------------------
  1824.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  1825.     self.contents.clear
  1826.     #------------------------------------------------------------------------
  1827.     # ● 名字描繪
  1828.     #------------------------------------------------------------------------
  1829.     text = equipment.name
  1830.     self.contents.font.color = draw_name_color(equipment)
  1831.     self.contents.font.size = name_size
  1832.     if text.nil?
  1833.       self.visible = false
  1834.     else
  1835.       self.visible = true
  1836.       self.contents.draw_text(0, 0, text.size*7, name_size, text, 0)
  1837.     end
  1838.     #------------------------------------------------------------------------
  1839.     # ● 說明描繪
  1840.     #------------------------------------------------------------------------
  1841.     x = 0
  1842.     y += 1
  1843.     while ((text = description.slice!(/./m)) != nil)
  1844.       self.contents.font.color = normal_color
  1845.       self.contents.font.size = size
  1846.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  1847.       x+=1
  1848.       if x == word
  1849.         x=0
  1850.         y+=1   
  1851.       end
  1852.     end
  1853.     #------------------------------------------------------------------------
  1854.     # ● 圖標描繪
  1855.     #------------------------------------------------------------------------
  1856.     bitmap = RPG::Cache.icon(equipment.icon_name)
  1857.     opacity = self.contents.font.color == normal_color ? 255 : 128
  1858.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  1859.   
  1860.     #------------------------------------------------------------------------
  1861.     # ● 攻擊力描繪(武器)
  1862.     #------------------------------------------------------------------------
  1863.     if equipment.is_a?(RPG::Weapon)
  1864.       x = 0
  1865.       y += 1
  1866.       text = $data_system.words.atk+":"+equipment.atk.to_s
  1867.       self.contents.font.color = normal_color
  1868.       self.contents.font.size = size
  1869.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1870.     end
  1871.     #------------------------------------------------------------------------
  1872.     # ● 價格描繪
  1873.     #------------------------------------------------------------------------
  1874.     x = 0
  1875.     y += 1
  1876.     text = phrase["price"] + equipment.price.to_s
  1877.     self.contents.font.color = normal_color
  1878.     self.contents.font.size = size
  1879.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1880.     #------------------------------------------------------------------------
  1881.     # ● 物理防禦
  1882.     #------------------------------------------------------------------------
  1883.     unless equipment.pdef.zero?
  1884.       x = 0
  1885.       y += 1
  1886.       text = $data_system.words.pdef+":"+equipment.pdef.to_s
  1887.       self.contents.font.color = normal_color
  1888.       self.contents.font.size = size
  1889.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1890.     end
  1891.     #------------------------------------------------------------------------
  1892.     # ● 魔法防禦
  1893.     #------------------------------------------------------------------------
  1894.     unless equipment.mdef.zero?
  1895.       x = 0
  1896.       y += 1
  1897.       text=$data_system.words.mdef+":"+equipment.mdef.to_s
  1898.       self.contents.font.color = normal_color
  1899.       self.contents.font.size = size
  1900.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1901.     end
  1902.     #------------------------------------------------------------------------
  1903.     # ● 屬性
  1904.     #------------------------------------------------------------------------
  1905.     if element_set.size > 0
  1906.       x = 0
  1907.       y += 1
  1908.       text = phrase["elements"]
  1909.       for i in 0...element_set.size
  1910.         break if i > 4
  1911.         text += $data_system.elements[element_set[i]]
  1912.       end
  1913.       self.contents.font.color = normal_color
  1914.       self.contents.font.size = size
  1915.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1916.     end
  1917.     if element_set.size >= 5
  1918.       x = (phrase["elements"].size)*5-4
  1919.       y += 1
  1920.       text = ""
  1921.       for i in 4...element_set.size
  1922.         text += $data_system.elements[element_set[i]]
  1923.       end
  1924.       self.contents.font.color = normal_color
  1925.       self.contents.font.size = size
  1926.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1927.     end
  1928.     #------------------------------------------------------------------------
  1929.     # ● 描述分流 武器/防具
  1930.     #------------------------------------------------------------------------
  1931.     case equipment
  1932.     when RPG::Weapon
  1933.       #------------------------------------------------------------------------
  1934.       # ● 解除狀態(武器)
  1935.       #------------------------------------------------------------------------
  1936.       unless minus_state_set.empty?
  1937.         x = 0
  1938.         y += 1
  1939.         text=phrase["minus_states"]
  1940.         text=phrase["guard_states"]
  1941.         self.contents.font.color = normal_color
  1942.         self.contents.font.size = size
  1943.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1944.         for i in 0...minus_state_set.size
  1945.           y += 1
  1946.           text = $data_states[minus_state_set[i]].name        
  1947.           self.contents.font.color = normal_color
  1948.           self.contents.font.size = size
  1949.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  1950.         end
  1951.       end
  1952.       #------------------------------------------------------------------------
  1953.       # ● 附加狀態(武器)
  1954.       #------------------------------------------------------------------------
  1955.       unless plus_state_set.empty?
  1956.         x = 0
  1957.         y += 1
  1958.         text = phrase["plus_states"]
  1959.         self.contents.font.color = normal_color
  1960.         self.contents.font.size = size
  1961.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1962.         for i in 0...plus_state_set.size
  1963.           y += 1
  1964.           text=$data_states[plus_state_set[i]].name        
  1965.           self.contents.font.color = normal_color
  1966.           self.contents.font.size = size
  1967.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  1968.         end  
  1969.       end
  1970.     when RPG::Armor
  1971.       #------------------------------------------------------------------------
  1972.       # ● 防禦狀態(防具)
  1973.       #------------------------------------------------------------------------
  1974.       unless guard_state_set.empty?
  1975.         x = 0
  1976.         y += 1
  1977.         text=phrase["guard_states"]
  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.         for i in 0...guard_state_set.size
  1982.           y += 1
  1983.           text = $data_states[guard_state_set[i]].name        
  1984.           self.contents.font.color = normal_color
  1985.           self.contents.font.size = size
  1986.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  1987.         end
  1988.       end
  1989.       #------------------------------------------------------------------------
  1990.       # ● 自動狀態(防具)
  1991.       #------------------------------------------------------------------------
  1992.       unless auto_state_id.zero?
  1993.         x = 0
  1994.         y += 1
  1995.         text = phrase["auto_state"] + $data_states[auto_state_id].name
  1996.         self.contents.font.color = normal_color
  1997.         self.contents.font.size = size
  1998.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  1999.       end
  2000.     end
  2001.     #------------------------------------------------------------------------
  2002.     # ● 空行
  2003.     #------------------------------------------------------------------------
  2004.     y+=1
  2005.     #------------------------------------------------------------------------
  2006.     # ● 力量
  2007.     #------------------------------------------------------------------------
  2008.     unless equipment.str_plus.zero?
  2009.       x = 0
  2010.       y += 1
  2011.       h += 1
  2012.       if equipment.str_plus > 0
  2013.         text=$data_system.words.str+" +"+ equipment.str_plus.to_s
  2014.       else
  2015.         text=$data_system.words.str+" -"+ (-equipment.str_plus).to_s
  2016.       end
  2017.       self.contents.font.color = normal_color
  2018.       self.contents.font.size = size
  2019.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)  
  2020.     end
  2021.     #------------------------------------------------------------------------
  2022.     # ● 靈巧
  2023.     #------------------------------------------------------------------------
  2024.     unless equipment.dex_plus.zero?
  2025.       x = 0
  2026.       y += 1
  2027.       h += 1
  2028.       if equipment.dex_plus > 0
  2029.         text=$data_system.words.dex+" +"+ equipment.dex_plus.to_s
  2030.       else
  2031.         text=$data_system.words.dex+" -"+ (-equipment.dex_plus).to_s
  2032.       end
  2033.       self.contents.font.color = normal_color
  2034.       self.contents.font.size = size
  2035.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2036.     end
  2037.     #------------------------------------------------------------------------
  2038.     # ● 速度
  2039.     #------------------------------------------------------------------------
  2040.     unless equipment.agi_plus.zero?
  2041.       x = 0
  2042.       y += 1
  2043.       h += 1
  2044.       if equipment.agi_plus > 0
  2045.         text=$data_system.words.agi+" +"+ equipment.agi_plus.to_s
  2046.       else
  2047.         text=$data_system.words.agi+" -"+ (-equipment.agi_plus).to_s
  2048.       end
  2049.       self.contents.font.color = normal_color
  2050.       self.contents.font.size = size
  2051.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2052.     end
  2053.     #------------------------------------------------------------------------
  2054.     # ● 智力
  2055.     #------------------------------------------------------------------------
  2056.     unless equipment.int_plus.zero?
  2057.       x = 0
  2058.       y += 1
  2059.       h += 1
  2060.       if equipment.int_plus > 0
  2061.         text=$data_system.words.int+" +"+ equipment.int_plus.to_s
  2062.       else
  2063.         text=$data_system.words.int+" -"+ (-equipment.int_plus).to_s
  2064.       end
  2065.       self.contents.font.color = normal_color
  2066.       self.contents.font.size = size
  2067.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2068.     end
  2069.     #------------------------------------------------------------------------
  2070.     # ● 魔力石描繪
  2071.     #------------------------------------------------------------------------
  2072.     y += draw_materia(equipment, move, y, size) unless self.materia.nil?
  2073.   end
  2074.   #--------------------------------------------------------------------------
  2075.   # ● 物品幫助窗口
  2076.   #--------------------------------------------------------------------------
  2077.   def set_item_text(item)
  2078.     # 取得描述
  2079.     description = item.description.clone
  2080.     # 取得屬性、附加狀態、解除狀態之副本
  2081.     element_set = item.element_set.clone
  2082.     plus_state_set = item.plus_state_set.clone
  2083.     minus_state_set = item.minus_state_set.clone
  2084.     # 過濾不顯示的描述
  2085.     element_set -= @unshow_elements
  2086.     plus_state_set -= @unshow_states
  2087.     minus_state_set -= @unshow_states
  2088.     # 初始化數據設定
  2089.     x = 0
  2090.     y = 0
  2091.     h = 0
  2092.     phrase = {}
  2093.     scope ={}
  2094.     parameter_type = {}
  2095.    
  2096.     # 基本數據設定
  2097. =begin
  2098.     name_size = 名字文字大小
  2099.     size = 描述文字大小
  2100.     word = 每行的描述文字數
  2101.     move = 全體描述偏移幅度
  2102. =end
  2103.     name_size = 18
  2104.     size = 14
  2105.     word = 12
  2106.     move = 80
  2107.    
  2108.     # 基本文字設定
  2109.     phrase["scope"] = "范围:"
  2110.     phrase["price"] = "价格:"
  2111.     phrase["recover_hp_rate"] = "HP 回复率:"
  2112.     phrase["recover_hp"] = "HP 回复量:"
  2113.     phrase["recover_sp_rate"] = "SP 回复率:"
  2114.     phrase["recover_sp"] = "SP 回复量:"
  2115.     phrase["elements"] = "属性:"
  2116.     phrase["plus"] = "附加"
  2117.     phrase["minus"] = "解除"
  2118.     phrase["states"] = "状态"
  2119.     scope[0] = "特殊物品"
  2120.     scope[1] = "特殊物品"
  2121.     scope[2] = "敌单体"
  2122.     scope[3] = "敌全体"
  2123.     scope[4] = "己方单体"
  2124.     scope[5] = "己方全体"
  2125.     scope[6] = "己方昏死单体"
  2126.     scope[7] = "己方昏死全体"
  2127.     scope[8] = "使用者"

  2128.     parameter_type[1] = "MaxHP"
  2129.     parameter_type[2] = "MaxSP"
  2130.     parameter_type[3] = $data_system.words.str
  2131.     parameter_type[4] = $data_system.words.dex
  2132.     parameter_type[5] = $data_system.words.agi
  2133.     parameter_type[6] = $data_system.words.int
  2134.    
  2135.     #依顯示内容確定自身高
  2136.     h = (description.size/3/word)
  2137.     h +=1 if (description.size/3%word)> 0
  2138.     now_h = h
  2139.     h +=3  # 空行,效果範圍,價格
  2140.     h += 1 unless item.recover_hp_rate.zero?
  2141.     h += 1 unless item.recover_hp.zero?
  2142.     h += 1 unless item.recover_sp_rate.zero?
  2143.     h += 1 unless item.recover_sp.zero?
  2144.     h += 1 unless item.parameter_type.zero?
  2145.     h += 1 unless element_set[0].nil?
  2146.     h += 1 unless element_set[4].nil?
  2147.     h += (1+plus_state_set.size) unless plus_state_set.empty?
  2148.     h += (1+minus_state_set.size) unless minus_state_set.empty?
  2149.     #------------------------------------------------------------------------
  2150.     # ● 圖片顯示保證高度
  2151.     #------------------------------------------------------------------------
  2152.     h = 6 + now_h if (h - now_h) < 6
  2153.     #------------------------------------------------------------------------
  2154.     # ● 換算高度
  2155.     #------------------------------------------------------------------------
  2156.     self.height = h * size + name_size + 32
  2157.     #------------------------------------------------------------------------
  2158.     # ● 生成背景
  2159.     #------------------------------------------------------------------------
  2160.     self.contents = Bitmap.new(self.width - 32, self.height - 32)
  2161.     self.contents.clear
  2162.     #------------------------------------------------------------------------
  2163.     # ● 名字描繪
  2164.     #------------------------------------------------------------------------
  2165.     text = item.name
  2166.     self.contents.font.color = normal_color#顔色腳本
  2167.     self.contents.font.size = name_size
  2168.     if text.nil?
  2169.       self.visible = false
  2170.     else
  2171.       self.visible = true
  2172.       self.contents.draw_text(0,0, text.size*7, 20, text, 0)
  2173.     end
  2174.     #------------------------------------------------------------------------
  2175.     # ● 說明描繪
  2176.     #------------------------------------------------------------------------
  2177.     x = 0
  2178.     y += 1
  2179.     while ((text = description.slice!(/./m)) != nil)
  2180.       self.contents.font.color = normal_color
  2181.       self.contents.font.size = size
  2182.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  2183.       x+=1
  2184.       if x == word
  2185.         x = 0
  2186.         y += 1
  2187.       end
  2188.     end
  2189.     #------------------------------------------------------------------------
  2190.     # ● 圖標描繪
  2191.     #------------------------------------------------------------------------
  2192.     bitmap = RPG::Cache.icon(item.icon_name) unless item.icon_name.nil?
  2193.     opacity = self.contents.font.color == normal_color ? 255 : 128
  2194.     self.contents.blt(0 ,y*size + 20, bitmap, Rect.new(0, 0, 95, 100), 225)
  2195.     #------------------------------------------------------------------------
  2196.     # ● 魔力石接口
  2197.     #------------------------------------------------------------------------
  2198.     unless self.materia.nil?
  2199.       return if is_materia?(item)
  2200.     end
  2201.     #------------------------------------------------------------------------
  2202.     # ● 效果範圍
  2203.     #------------------------------------------------------------------------
  2204.     text= phrase["scope"] + scope[item.scope]
  2205.     x = 0
  2206.     y += 1
  2207.     self.contents.font.color = normal_color
  2208.     self.contents.font.size = size
  2209.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2210.     #------------------------------------------------------------------------
  2211.     # ● 價格
  2212.     #------------------------------------------------------------------------
  2213.     x = 0
  2214.     y += 1      
  2215.     text = phrase["price"] + item.price.to_s
  2216.     self.contents.font.color = normal_color
  2217.     self.contents.font.size = size
  2218.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2219.    
  2220.     #------------------------------------------------------------------------
  2221.     # ● HP回復率
  2222.     #------------------------------------------------------------------------
  2223.     unless item.recover_hp_rate.zero?  
  2224.       x = 0
  2225.       y += 1
  2226.       text = phrase["recover_hp_rate"] + item.recover_hp_rate.to_s+"%"
  2227.       self.contents.font.color = normal_color
  2228.       self.contents.font.size = size
  2229.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  2230.     end
  2231.     #------------------------------------------------------------------------
  2232.     # ● HP回復量
  2233.     #------------------------------------------------------------------------
  2234.     unless item.recover_hp.zero?  
  2235.       x = 0
  2236.       y += 1      
  2237.       text = phrase["recover_hp"] + item.recover_hp.to_s
  2238.       self.contents.font.color = normal_color
  2239.       self.contents.font.size = size
  2240.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2241.     end
  2242.     #------------------------------------------------------------------------
  2243.     # ● SP回復率
  2244.     #------------------------------------------------------------------------
  2245.     unless item.recover_sp_rate.zero?
  2246.       x = 0
  2247.       y += 1      
  2248.       text = phrase["recover_sp_rate"] + item.recover_sp_rate.to_s+"%"
  2249.       self.contents.font.color = normal_color
  2250.       self.contents.font.size = size
  2251.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2252.     end
  2253.     #------------------------------------------------------------------------
  2254.     # ● SP回復量
  2255.     #------------------------------------------------------------------------
  2256.     unless item.recover_sp.zero?  
  2257.       x = 0
  2258.       y += 1      
  2259.       text = phrase["elements"] + item.recover_sp.to_s
  2260.       self.contents.font.color = normal_color
  2261.       self.contents.font.size = size
  2262.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2263.     end
  2264.     #------------------------------------------------------------------------
  2265.     # ● 能力值增加
  2266.     #------------------------------------------------------------------------
  2267.     unless item.parameter_type.zero?
  2268.       x = 0
  2269.       y += 1      
  2270.       text= parameter_type[item.parameter_type]+" +"+item.parameter_points.to_s

  2271.       self.contents.font.color = normal_color
  2272.       self.contents.font.size = size
  2273.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2274.     end
  2275.     #------------------------------------------------------------------------
  2276.     # ● 屬性
  2277.     #------------------------------------------------------------------------
  2278.     if element_set.size > 0
  2279.       x = 0
  2280.       y += 1
  2281.       text = phrase["elements"]
  2282.       for i in 0...element_set.size
  2283.         break if i > 4
  2284.         text += $data_system.elements[element_set[i]]
  2285.       end
  2286.       self.contents.font.color = normal_color
  2287.       self.contents.font.size = size
  2288.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2289.     end
  2290.     if element_set.size >= 5
  2291.       x = (phrase["elements"].size)*5-4
  2292.       y += 1
  2293.       text = ""
  2294.       for i in 4...element_set.size
  2295.         text += $data_system.elements[element_set[i]]
  2296.       end
  2297.       self.contents.font.color = normal_color
  2298.       self.contents.font.size = size
  2299.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2300.     end
  2301.     #------------------------------------------------------------------------
  2302.     # ● 狀態添加
  2303.     #------------------------------------------------------------------------
  2304.     unless plus_state_set.empty?
  2305.       text = phrase["plus"]
  2306.       x = 0
  2307.       y += 1
  2308.       self.contents.font.color = normal_color
  2309.       self.contents.font.size = size
  2310.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2311.       plus_state_set.each do |plus_state|
  2312.         y += 1
  2313.         text = $data_states[plus_state].name        
  2314.         self.contents.font.color = normal_color
  2315.         self.contents.font.size = size
  2316.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)      
  2317.       end  
  2318.     end
  2319.     #------------------------------------------------------------------------
  2320.     # ● 狀態解除
  2321.     #------------------------------------------------------------------------
  2322.     unless minus_state_set.empty?
  2323.       text = phrase["minus"]
  2324.       x = 0
  2325.       y += 1
  2326.       self.contents.font.color = normal_color
  2327.       self.contents.font.size = size
  2328.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  2329.       minus_state_set.each do |minus_state|
  2330.         y += 1
  2331.         text = $data_states[minus_state].name
  2332.         self.contents.font.color = normal_color
  2333.         self.contents.font.size = size
  2334.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)   
  2335.       end
  2336.     end
  2337.   end
  2338.   #--------------------------------------------------------------------------
  2339.   # ● 技能帮助窗口
  2340.   #--------------------------------------------------------------------------
  2341.   def set_skill_text(skill)
  2342.     # 取得描述
  2343.     description = skill.description.clone
  2344.     # 取得屬性、附加狀態、解除狀態之副本
  2345.     element_set = skill.element_set.clone
  2346.     plus_state_set = skill.plus_state_set.clone
  2347.     minus_state_set = skill.minus_state_set.clone
  2348.     # 過濾不顯示的描述
  2349.     element_set -= @unshow_elements
  2350.     plus_state_set -= @unshow_states
  2351.     minus_state_set -= @unshow_states
  2352.     # 初始化設定
  2353.     x = 0
  2354.     y = 0
  2355.     h = 0
  2356.     phrase = {}
  2357.     scope = {}
  2358.    
  2359.     # 基本數據設定
  2360. =begin
  2361.     name_size = 名字文字大小
  2362.     size = 描述文字大小
  2363.     word = 每行的描述文字數
  2364.     move = 全體描述偏移幅度
  2365. =end
  2366.     name_size = 18
  2367.     size = 14
  2368.     word = 12
  2369.     move = 80
  2370.    
  2371.     # 基本文字設定
  2372.     phrase["scope"] = "范围:"
  2373.     #
  2374.     phrase["power"] = "威力:"
  2375.     phrase["cost_sp"] = "消耗SP:"
  2376.     phrase["hit_rate"] = "命中率:"
  2377.     phrase["elements"] = "攻击属性"
  2378.     #
  2379.     phrase["plus"] = "附加"
  2380.     phrase["minus"] = "解除"
  2381.     phrase["states"] = "状态"
  2382.     scope[0] = "特殊技能"
  2383.     scope[1] = "敌单体"
  2384.     scope[2] = "敌全体"
  2385.     scope[3] = "我方单体"
  2386.     scope[4] = "我方全体"
  2387.     scope[5] = "我方昏死(单体)"
  2388.     scope[6] = "我方昏死(全体)"
  2389.     scope[7] = "自身"

  2390.    
  2391.     #由描叙确定高
  2392.     h =description.size/3/word
  2393.     h += 1 if (description.size%3/word) > 0
  2394.     h += 4  #空行,效果范围,消费SP,命中率
  2395.     h += 1 unless skill.power.zero?
  2396.     h += 1 unless element_set.empty?
  2397.     h += 1 unless element_set[4].nil?
  2398.     h += plus_state_set.size
  2399.     h += minus_state_set.size
  2400.     #------------------------------------------------------------------------
  2401.     # ● 換算高度
  2402.     #------------------------------------------------------------------------
  2403.     self.height=h * size + name_size + 32  
  2404.     self.contents = Bitmap.new(self.width - 32,self.height - 32)
  2405.     self.contents.clear
  2406.    
  2407.     #------------------------------------------------------------------------
  2408.     # ● 名字描述
  2409.     #------------------------------------------------------------------------
  2410.     text = skill.name
  2411.     self.contents.font.color = Color.new(255, 255, 128, 255)
  2412.     self.contents.font.size = name_size
  2413.     if text!=nil
  2414.       self.visible = true
  2415.       self.contents.draw_text(0,0, text.size*7, name_size, text, 0)
  2416.     else
  2417.       self.visible = false
  2418.     end
  2419.    
  2420.     #------------------------------------------------------------------------
  2421.     # ● 說明描述
  2422.     #------------------------------------------------------------------------
  2423.     x = 0
  2424.     y += 1
  2425.     text = description
  2426.     while ((text = description.slice!(/./m)) != nil)
  2427.       self.contents.font.color = normal_color
  2428.       self.contents.font.size = size
  2429.       self.contents.draw_text(x*size, y*size+5, size, size, text, 0)
  2430.       x+=1
  2431.       if x==word#每行10个字
  2432.         x = 0
  2433.         y += 1      
  2434.       end
  2435.     end
  2436.    
  2437.     #------------------------------------------------------------------------
  2438.     # ● 攻擊範圍
  2439.     #------------------------------------------------------------------------
  2440.     text = phrase["scope"] + scope[skill.scope]
  2441.     x = 0
  2442.     y += 1
  2443.     self.contents.font.color = normal_color
  2444.     self.contents.font.size = size
  2445.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2446.     #------------------------------------------------------------------------
  2447.     # ● 空一行
  2448.     #------------------------------------------------------------------------
  2449.     y += 1
  2450.     #------------------------------------------------------------------------
  2451.     # ● 威力描述
  2452.     #------------------------------------------------------------------------
  2453.     unless skill.power.zero?
  2454.       power = skill.power > 0 ? skill.power : -1 * skill.power
  2455.       text = phrase["power"] + power.to_s
  2456.       x = 0
  2457.       y += 1
  2458.       self.contents.font.color = normal_color
  2459.       self.contents.font.size = size  
  2460.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2461.     end  
  2462.     #------------------------------------------------------------------------
  2463.     # ● 消費SP描述
  2464.     #------------------------------------------------------------------------
  2465.     text = phrase["cost_sp"] + skill.sp_cost.to_s
  2466.     x = 0
  2467.     y += 1
  2468.     self.contents.font.color = normal_color
  2469.     self.contents.font.size = size   
  2470.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2471.     #------------------------------------------------------------------------
  2472.     # ● 命中率描述
  2473.     #------------------------------------------------------------------------
  2474.     text = phrase["hit_rate"] + skill.hit.to_s + "%"
  2475.     x = 0
  2476.     y += 1
  2477.     self.contents.font.color = normal_color
  2478.     self.contents.font.size = size
  2479.     self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2480.     #------------------------------------------------------------------------
  2481.     # ● 攻擊屬性
  2482.     #------------------------------------------------------------------------
  2483.     if element_set.size > 0
  2484.       text=phrase["elements"]
  2485.       for i in 0...element_set.size
  2486.         if i < 4
  2487.           text+=$data_system.elements[element_set[i]]
  2488.         else
  2489.           break
  2490.         end        
  2491.       end
  2492.       x = 0
  2493.       y += 1
  2494.       self.contents.font.color = normal_color
  2495.       self.contents.font.size = size
  2496.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2497.     end
  2498.     if element_set.size >= 5
  2499.       text=""
  2500.       for i in 4...element_set.size
  2501.         text+=$data_system.elements[element_set[i]]
  2502.       end
  2503.       x= (phrase["elements"].size)*3
  2504.       y += 1
  2505.       self.contents.font.color = normal_color
  2506.       self.contents.font.size = size
  2507.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2508.     end
  2509.     #------------------------------------------------------------------------
  2510.     # ● 狀態附加
  2511.     #------------------------------------------------------------------------
  2512.     unless plus_state_set.empty?
  2513.       text= phrase["plus"]
  2514.       x = 0
  2515.       y += 1
  2516.       self.contents.font.color = normal_color
  2517.       self.contents.font.size = size
  2518.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2519.       plus_state_set.each do |plus_state|
  2520.         y += 1
  2521.         text=$data_states[plus_state].name        
  2522.         self.contents.font.color = normal_color
  2523.         self.contents.font.size = size
  2524.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  2525.       end  
  2526.     end
  2527.     #------------------------------------------------------------------------
  2528.     # ●狀態解除
  2529.     #------------------------------------------------------------------------
  2530.     unless minus_state_set.empty?
  2531.       text = phrase["minus"]
  2532.       x = 0
  2533.       y += 1
  2534.       self.contents.font.color = normal_color
  2535.       self.contents.font.size=size
  2536.       self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
  2537.       minus_state_set.each do |minus_state|
  2538.         y += 1
  2539.         text=$data_states[minus_state].name        
  2540.         self.contents.font.color = normal_color
  2541.         self.contents.font.size=size
  2542.         self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)        
  2543.       end  
  2544.     end     
  2545.   end
  2546.   #--------------------------------------------------------------------------
  2547.   # ● 设置角色
  2548.   #     actor : 要显示状态的角色
  2549.   #--------------------------------------------------------------------------
  2550.   def set_actor(actor)
  2551.     if actor != @actor
  2552.       self.contents.clear
  2553.       draw_actor_name(actor, 4, 0)
  2554.       draw_actor_state(actor, 140, 0)
  2555.       draw_actor_hp(actor, 284, 0)
  2556.       draw_actor_sp(actor, 460, 0)
  2557.       @actor = actor
  2558.       @text = nil
  2559.       self.visible = true
  2560.     end
  2561.   end
  2562.   #--------------------------------------------------------------------------
  2563.   # ● 設置角色
  2564.   #     actor : 要顯示狀態之角色
  2565.   #--------------------------------------------------------------------------
  2566.   def set_actor(actor)
  2567.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  2568.     if actor != @actor
  2569.       self.contents.clear
  2570.       draw_actor_name(actor, 4, 0)
  2571.       draw_actor_state(actor, 140, 0)
  2572.       draw_actor_hp(actor, 284, 0)
  2573.       draw_actor_sp(actor, 460, 0)
  2574.       @actor = actor
  2575.       @text = nil
  2576.       self.visible = true
  2577.     end
  2578.   end
  2579.   #--------------------------------------------------------------------------
  2580.   # ● 設置敵人
  2581.   #     enemy : 要顯示名字與狀態之敵人
  2582.   #--------------------------------------------------------------------------
  2583.   def set_enemy(enemy)
  2584.     self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  2585.     text = enemy.name.sub(/\\[Ff]\[([0-9]+)\]/) {""}
  2586.     state_text = make_battler_state_text(enemy, 112, false)
  2587.     if state_text != ""
  2588.       text += "  " + state_text
  2589.     end
  2590.     set_text(text, 1)
  2591.     self.visible = true
  2592.   end
  2593.   #--------------------------------------------------------------------------
  2594.   # ● 校正帮助窗口位置
  2595.   #--------------------------------------------------------------------------
  2596.   def set_pos(x,y,width,oy,index,column_max)
  2597.     #光标坐标
  2598.     cursor_width = width / column_max - 32
  2599.     xx = index % column_max * (cursor_width + 32)
  2600.     yy = index / column_max * 32 - oy
  2601.     self.x=xx+x+150
  2602.     self.y=yy+y+30
  2603.     if self.x+self.width>640
  2604.       self.x=640-self.width
  2605.     end
  2606.     if self.y+self.height>480
  2607.       self.y=480-self.height
  2608.     end  
  2609.   end
  2610.   #------------------------------------------------------------------------
  2611.   # ● 裝備名字顔色變化 接口
  2612.   #------------------------------------------------------------------------
  2613.   def draw_name_color(equipment)
  2614.     return normal_color
  2615.   end
  2616.   #------------------------------------------------------------------------
  2617.   # ● 自身身份確認
  2618.   #------------------------------------------------------------------------
  2619.   def original_help?
  2620.     return false
  2621.   end
  2622. end

  2623. #------------------------------------------------------------------------------



  2624. #------------------------------------------------------------------------------
  2625. #==============================================================================
  2626. # ■ Window_Item
  2627. #------------------------------------------------------------------------------
  2628. #  物品画面、战斗画面、显示浏览物品的窗口。
  2629. #==============================================================================

  2630. class Window_Item < Window_Selectable
  2631.   #--------------------------------------------------------------------------
  2632.   # ● 初始化对像
  2633.   #--------------------------------------------------------------------------
  2634.   def initialize
  2635.     super(0, 64-64, 640, 416+64)
  2636.     @column_max = 2
  2637.     refresh
  2638.     self.index = 0
  2639.     # 战斗中的情况下将窗口移至中央并将其半透明化
  2640.     if $game_temp.in_battle
  2641.       self.y = 64
  2642.       self.height = 256
  2643.       self.back_opacity = 160
  2644.     end
  2645.   end
  2646.   #--------------------------------------------------------------------------
  2647.   # ● 刷新帮助文本
  2648.   #--------------------------------------------------------------------------
  2649.   def update_help
  2650.     @help_window.set_text(item)
  2651.     #校正帮助窗口位置
  2652.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2653.   end
  2654. end
  2655. #------------------------------------------------------------------------------



  2656. #------------------------------------------------------------------------------
  2657. #==============================================================================
  2658. # ■ Window_Skill
  2659. #------------------------------------------------------------------------------
  2660. #  特技画面、战斗画面、显示可以使用的特技浏览的窗口。
  2661. #==============================================================================

  2662. class Window_Skill < Window_Selectable
  2663.   #--------------------------------------------------------------------------
  2664.   # ● 初始化对像
  2665.   #     actor : 角色
  2666.   #--------------------------------------------------------------------------
  2667.   def initialize(actor)
  2668.     super(0, 128, 640, 352)
  2669.     @actor = actor
  2670.     @column_max = 2
  2671.    
  2672.     refresh
  2673.     self.index = 0
  2674.     # 战斗中的情况下将窗口移至中央并将其半透明化
  2675.     if $game_temp.in_battle
  2676.       self.y = 64
  2677.       self.height = 256
  2678.       self.back_opacity = 160
  2679.     end
  2680.   end
  2681.   #--------------------------------------------------------------------------
  2682.   # ● 刷新帮助文本
  2683.   #--------------------------------------------------------------------------

  2684.   def update_help
  2685.     @help_window.set_text(skill)
  2686.     #校正帮助窗口位置
  2687.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2688.   end
  2689. end
  2690. #------------------------------------------------------------------------------



  2691. #------------------------------------------------------------------------------
  2692. #==============================================================================
  2693. # ■ Window_SkillStatus
  2694. #------------------------------------------------------------------------------
  2695. #  显示特技画面、特技使用者的窗口。
  2696. #==============================================================================

  2697. class Window_SkillStatus < Window_Base
  2698.   #--------------------------------------------------------------------------
  2699.   # ● 初始化对像
  2700.   #     actor : 角色
  2701.   #--------------------------------------------------------------------------
  2702.   def initialize(actor)
  2703. # -------------------
  2704. # 修改開始
  2705.     super(0, 64-64, 640, 64+64)#★★★★★★★★★★★★★★★★★★★★
  2706. # 修改終了
  2707. # -------------------
  2708.     self.contents = Bitmap.new(width - 32, height - 32)
  2709.     @actor = actor
  2710.     refresh
  2711.   end
  2712. end
  2713. #------------------------------------------------------------------------------



  2714. #------------------------------------------------------------------------------
  2715. #==============================================================================
  2716. # ■ Window_EquipLeft
  2717. #------------------------------------------------------------------------------
  2718. #  装备画面的、显示角色能力值变化的窗口。
  2719. #==============================================================================
  2720. class Window_EquipLeft < Window_Base
  2721.   #--------------------------------------------------------------------------
  2722.   # ● 初始化对像
  2723.   #     actor : 角色
  2724.   #--------------------------------------------------------------------------
  2725.   def initialize(actor)
  2726. # -------------------
  2727. # 修改開始
  2728.     super(0, 64-64, 272, 416+64)#★★★★★★★★★★★★★★★★★★★★
  2729. # 修改終了
  2730. # -------------------
  2731.     self.contents = Bitmap.new(width - 32, height - 32)
  2732.     @actor = actor
  2733.     refresh
  2734.   end
  2735. end
  2736. #------------------------------------------------------------------------------



  2737. #------------------------------------------------------------------------------
  2738. #==============================================================================
  2739. # ■ Window_EquipRight
  2740. #------------------------------------------------------------------------------
  2741. #  装备画面、显示角色现在装备的物品的窗口。
  2742. #==============================================================================

  2743. class Window_EquipRight < Window_Selectable
  2744.   #--------------------------------------------------------------------------
  2745.   # ● 初始化对像
  2746.   #     actor : 角色
  2747.   #--------------------------------------------------------------------------
  2748.   def initialize(actor)
  2749. # -------------------
  2750. # 修改開始
  2751.     super(272, 64-64, 368, 256+64)#★★★★★★★★★★★★★★★★★★★★
  2752. # 修改終了
  2753. # -------------------
  2754.     self.contents = Bitmap.new(width - 32, height - 32)
  2755.     @actor = actor
  2756.     refresh
  2757.     self.index = 0
  2758.   end
  2759.   #--------------------------------------------------------------------------
  2760.   # ● 刷新帮助文本
  2761.   #--------------------------------------------------------------------------

  2762.   def update_help
  2763.     @help_window.set_text(item)
  2764.     #校正帮助窗口位置
  2765.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2766.   end
  2767. end
  2768. #------------------------------------------------------------------------------



  2769. #------------------------------------------------------------------------------
  2770. #==============================================================================
  2771. # ■ Window_EquipItem
  2772. #------------------------------------------------------------------------------
  2773. #  装备画面、显示浏览变更装备的候补物品的窗口。
  2774. #==============================================================================

  2775. class Window_EquipItem < Window_Selectable
  2776.   #--------------------------------------------------------------------------
  2777.   # ● 初始化对像
  2778.   #     actor      : 角色
  2779.   #     equip_type : 装备部位 (0~3)
  2780.   #--------------------------------------------------------------------------
  2781.   def initialize(actor, equip_type)
  2782. # -------------------
  2783. # 修改開始
  2784.     super(272, 320, 368, 160)#★★★★★★★★★★★★★★★★★★★★
  2785. # 修改終了
  2786. # -------------------
  2787.     @actor = actor
  2788.     @equip_type = equip_type
  2789.     @column_max = 1
  2790.    
  2791.     refresh
  2792.     self.active = false
  2793.     self.index = -1
  2794.   end
  2795.   def update_help
  2796.     @help_window.set_text(item)
  2797.     #校正帮助窗口位置
  2798.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2799.   end
  2800. end
  2801. #------------------------------------------------------------------------------



  2802. #------------------------------------------------------------------------------
  2803. #==============================================================================
  2804. # ■ Window_ShopCommand
  2805. #------------------------------------------------------------------------------
  2806. #  商店画面、选择要做的事的窗口
  2807. #==============================================================================

  2808. class Window_ShopCommand < Window_Selectable
  2809.   #--------------------------------------------------------------------------
  2810.   # ● 初始化对像
  2811.   #--------------------------------------------------------------------------
  2812.   def initialize
  2813. # -------------------
  2814. # 修改開始
  2815.     super(0, 64-64, 480, 64)#★★★★★★★★★★★★★★★★★
  2816. # 修改終了
  2817. # -------------------
  2818.     self.contents = Bitmap.new(width - 32, height - 32)
  2819.     @item_max = 3
  2820.     @column_max = 3
  2821.     @commands = ["买", "卖", "取消"]
  2822.     refresh
  2823.     self.index = 0
  2824.   end
  2825. end
  2826. #------------------------------------------------------------------------------



  2827. #------------------------------------------------------------------------------
  2828. #========================================================================================================================
  2829. # ■ Window_ShopBuy
  2830. #------------------------------------------------------------------------------
  2831. #  商店画面、浏览显示可以购买的商品的窗口。
  2832. #==============================================================================

  2833. class Window_ShopBuy < Window_Selectable
  2834.   #--------------------------------------------------------------------------
  2835.   # ● 初始化对像
  2836.   #     shop_goods : 商品
  2837.   #--------------------------------------------------------------------------
  2838.   def initialize(shop_goods)
  2839. # -------------------
  2840. # 修改開始
  2841.     super(0, 128-64, 368, 352+64)#★★★★★★★★★★★★★★★★
  2842. # 修改終了
  2843. # -------------------
  2844.     @shop_goods = shop_goods
  2845.    
  2846.     refresh
  2847.     self.index = 0
  2848.   end
  2849.   #--------------------------------------------------------------------------
  2850.   # ● 刷新帮助文本
  2851.   #--------------------------------------------------------------------------

  2852.   def update_help
  2853.     @help_window.set_text(item)
  2854.     #校正帮助窗口位置
  2855.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2856.   end
  2857. end
  2858. #------------------------------------------------------------------------------



  2859. #------------------------------------------------------------------------------
  2860. #==============================================================================
  2861. # ■ Window_ShopSell
  2862. #------------------------------------------------------------------------------
  2863. #  商店画面、浏览显示可以卖掉的商品的窗口。
  2864. #==============================================================================

  2865. class Window_ShopSell < Window_Selectable
  2866.   #--------------------------------------------------------------------------
  2867.   # ● 初始化对像
  2868.   #--------------------------------------------------------------------------
  2869.   def initialize
  2870. # -------------------
  2871. # 修改開始
  2872.     super(0, 128-64, 640, 352+64)#★★★★★★★★★★★★★★★★
  2873. # 修改終了
  2874. # -------------------
  2875.     @column_max = 2
  2876.    
  2877.     refresh
  2878.     self.index = 0
  2879.   end
  2880.   #--------------------------------------------------------------------------
  2881.   # ● 刷新帮助文本
  2882.   #--------------------------------------------------------------------------

  2883.   def update_help
  2884.     @help_window.set_text(item)
  2885.     #校正帮助窗口位置
  2886.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  2887.   end
  2888. end
  2889. #------------------------------------------------------------------------------



  2890. #------------------------------------------------------------------------------
  2891. #==============================================================================
  2892. # ■ Window_ShopNumber
  2893. #------------------------------------------------------------------------------
  2894. #  商店画面、输入买卖数量的窗口。
  2895. #==============================================================================
  2896. class Window_ShopNumber < Window_Base
  2897.   #--------------------------------------------------------------------------
  2898.   # ● 初始化对像
  2899.   #--------------------------------------------------------------------------
  2900.   def initialize
  2901. # -------------------
  2902. # 修改開始
  2903.     super(0, 128-64, 368, 352+64)#★★★★★★★★★★★★★★★★
  2904. # 修改終了
  2905. # -------------------
  2906.     self.contents = Bitmap.new(width - 32, height - 32)
  2907.     @item = nil
  2908.     @max = 1
  2909.     @price = 0
  2910.     @number = 1
  2911.   end
  2912. end
  2913. #------------------------------------------------------------------------------



  2914. #------------------------------------------------------------------------------
  2915. #==============================================================================
  2916. # ■ Window_ShopStatus
  2917. #------------------------------------------------------------------------------
  2918. #  商店画面、显示物品所持数与角色装备的窗口。
  2919. #==============================================================================

  2920. class Window_ShopStatus < Window_Base
  2921.   #--------------------------------------------------------------------------
  2922.   # ● 初始化对像
  2923.   #--------------------------------------------------------------------------
  2924.   def initialize
  2925. # -------------------
  2926. # 修改開始
  2927.     super(368, 128-64, 272, 352+64)#★★★★★★★★★★★★
  2928. # 修改終了
  2929. # -------------------
  2930.     self.contents = Bitmap.new(width - 32, height - 32)
  2931.     @item = nil
  2932.     refresh
  2933.   end
  2934. end
  2935. #------------------------------------------------------------------------------



  2936. #------------------------------------------------------------------------------
  2937. #==============================================================================
  2938. # ■ Scene_Equip
  2939. #------------------------------------------------------------------------------
  2940. #  处理装备画面的类。
  2941. #==============================================================================

  2942. class Scene_Equip
  2943.   #--------------------------------------------------------------------------
  2944.   # ● 刷新画面 (右侧窗口被激活的情况下)
  2945.   #--------------------------------------------------------------------------
  2946.   def update_right
  2947. # -------------------
  2948. # 修改開始
  2949.     if @right_window.item==nil
  2950.         @help_window.visible=false
  2951.     else
  2952.         @help_window.visible=true
  2953.     end
  2954. # 修改終了
  2955. # -------------------
  2956.     # 按下 B 键的情况下
  2957.     if Input.trigger?(Input::B)
  2958.       # 演奏取消 SE
  2959.       $game_system.se_play($data_system.cancel_se)
  2960.       # 切换到菜单画面
  2961.       $scene = Scene_Menu.new(2)
  2962.       return
  2963.     end
  2964.     # 按下 C 键的情况下
  2965.     if Input.trigger?(Input::C)
  2966.       # 固定装备的情况下
  2967.       if @actor.equip_fix?(@right_window.index)
  2968.         # 演奏冻结 SE
  2969.         $game_system.se_play($data_system.buzzer_se)
  2970.         return
  2971.       end
  2972.       # 演奏确定 SE
  2973.       $game_system.se_play($data_system.decision_se)
  2974.       # 激活物品窗口
  2975.       @right_window.active = false
  2976.       @item_window.active = true
  2977.       @item_window.index = 0
  2978.       return
  2979.     end
  2980.     # 按下 R 键的情况下
  2981.     if Input.trigger?(Input::R)
  2982.       # 演奏光标 SE
  2983.       $game_system.se_play($data_system.cursor_se)
  2984.       # 移至下一位角色
  2985.       @actor_index += 1
  2986.       @actor_index %= $game_party.actors.size
  2987.       # 切换到别的装备画面
  2988.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  2989.       return
  2990.     end
  2991.     # 按下 L 键的情况下
  2992.     if Input.trigger?(Input::L)
  2993.       # 演奏光标 SE
  2994.       $game_system.se_play($data_system.cursor_se)
  2995.       # 移至上一位角色
  2996.       @actor_index += $game_party.actors.size - 1
  2997.       @actor_index %= $game_party.actors.size
  2998.       # 切换到别的装备画面
  2999.       $scene = Scene_Equip.new(@actor_index, @right_window.index)
  3000.       return
  3001.     end
  3002.   end
  3003.   #--------------------------------------------------------------------------
  3004.   # ● 刷新画面 (物品窗口被激活的情况下)
  3005.   #--------------------------------------------------------------------------
  3006.   def update_item
  3007. # -------------------
  3008. # 修改開始
  3009.     if @item_window.item==nil
  3010.         @help_window.visible=false
  3011.     else
  3012.         @help_window.visible=true
  3013.     end
  3014. # 修改終了
  3015. # -------------------
  3016.     # 按下 B 键的情况下
  3017.     if Input.trigger?(Input::B)
  3018.       # 演奏取消 SE
  3019.       $game_system.se_play($data_system.cancel_se)
  3020.       # 激活右侧窗口
  3021.       @right_window.active = true
  3022.       @item_window.active = false
  3023.       @item_window.index = -1
  3024.       return
  3025.     end
  3026.     # 按下 C 键的情况下
  3027.     if Input.trigger?(Input::C)
  3028.       # 演奏装备 SE
  3029.       $game_system.se_play($data_system.equip_se)
  3030.       # 获取物品窗口现在选择的装备数据
  3031.       item = @item_window.item
  3032.       # 变更装备
  3033.       @actor.equip(@right_window.index, item == nil ? 0 : item.id)
  3034.       # 激活右侧窗口
  3035.       @right_window.active = true
  3036.       @item_window.active = false
  3037.       @item_window.index = -1
  3038.       # 再生成右侧窗口、物品窗口的内容
  3039.       @right_window.refresh
  3040.       @item_window.refresh
  3041.       return
  3042.     end
  3043.   end
  3044. end
  3045. #------------------------------------------------------------------------------



  3046. #------------------------------------------------------------------------------
  3047. #========================================================================================================================
  3048. # ■ Scene_Battle (分割定义 3)
  3049. #------------------------------------------------------------------------------
  3050. #  处理战斗画面的类。
  3051. #========================================================================================================================

  3052. class Scene_Battle
  3053.   #--------------------------------------------------------------------------
  3054.   # ● 刷新画面 (角色命令回合 : 选择特技)
  3055.   #--------------------------------------------------------------------------
  3056.   alias first_reupdate_phase3_skill_select update_phase3_skill_select
  3057.   def update_phase3_skill_select
  3058. # -------------------
  3059. # 修改開始
  3060.     @skill_window.help_window.visible = false#★★★★★★★★★★★★★
  3061. # 修改終了
  3062. # -------------------
  3063.     first_reupdate_phase3_skill_select
  3064.   end
  3065.   #--------------------------------------------------------------------------
  3066.   # ● 刷新画面 (角色命令回合 : 选择物品)
  3067.   #--------------------------------------------------------------------------
  3068.   alias first_reupdate_phase3_item_select update_phase3_item_select  
  3069.   def update_phase3_item_select
  3070. # -------------------
  3071. # 修改開始
  3072.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  3073. # 修改終了
  3074. # -------------------
  3075.     first_reupdate_phase3_item_select
  3076.   end
  3077.   #--------------------------------------------------------------------------
  3078.   # ● 开始选择特技
  3079.   #--------------------------------------------------------------------------
  3080.   def start_skill_select
  3081.     @skill_window = Window_Skill.new(@active_battler)
  3082.     @skill_window.help_window = Window_Help.new
  3083.     @actor_command_window.active = false
  3084.     @actor_command_window.visible = false
  3085.   end
  3086.   #--------------------------------------------------------------------------
  3087.   # ● 选择特技结束
  3088.   #--------------------------------------------------------------------------
  3089.   alias first_update_end_skill_select end_skill_select  
  3090.   def end_skill_select
  3091. # -------------------
  3092. # 修改開始
  3093.     @skill_window.help_window.visible = false#★★★★★★★★★★★★
  3094. # 修改終了
  3095. # -------------------
  3096.     first_update_end_skill_select
  3097.   end
  3098.   #--------------------------------------------------------------------------
  3099.   # ● 开始选择物品
  3100.   #--------------------------------------------------------------------------
  3101.   def start_item_select
  3102.     # 生成物品窗口
  3103.     @item_window = Window_Item.new
  3104.     # 关联帮助窗口
  3105. # -------------------
  3106. # 修改開始
  3107.     @item_window.help_window =  Window_Help.new#★★★★★★★★★★★★
  3108. # 修改終了
  3109. # -------------------
  3110.     # 无效化角色指令窗口
  3111.     @actor_command_window.active = false
  3112.     @actor_command_window.visible = false
  3113.   end
  3114.   #--------------------------------------------------------------------------
  3115.   # ● 结束选择物品
  3116.   #--------------------------------------------------------------------------
  3117.   alias first_update_end_item_select end_item_select
  3118.   def end_item_select
  3119. # -------------------
  3120. # 修改開始
  3121.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  3122. # 修改終了
  3123. # -------------------
  3124.     first_update_end_item_select
  3125.   end
  3126. end
  3127. #------------------------------------------------------------------------------



  3128. #------------------------------------------------------------------------------
  3129. #==============================================================================
  3130. # ■ Scene_Shop
  3131. #------------------------------------------------------------------------------
  3132. #  处理商店画面的类。
  3133. #==============================================================================

  3134. class Scene_Shop
  3135.   #--------------------------------------------------------------------------
  3136.   # ● 主处理
  3137.   #--------------------------------------------------------------------------
  3138. # --------------------
  3139. # 衝突可能
  3140.   def main
  3141.     # 生成帮助窗口
  3142. # -------------------
  3143. # 修改開始
  3144.     @help_window = Window_Help.new#★★★★★★★★★★★★★★★★
  3145. # 修改終了
  3146. # -------------------
  3147.     # 生成指令窗口
  3148.     @command_window = Window_ShopCommand.new
  3149.     # 生成金钱窗口
  3150.     @gold_window = Window_Gold.new
  3151.     @gold_window.x = 480
  3152. # -------------------
  3153. # 修改開始
  3154.     @gold_window.y = 64-64#★★★★★★★★★★★★★
  3155. # 修改終了
  3156. # -------------------
  3157.     # 生成时间窗口
  3158. # -------------------
  3159. # 修改開始
  3160.     @dummy_window = Window_Base.new(0, 128-64, 640, 352+64)#★★★★★★★★★★★★★
  3161. # 修改終了
  3162. # -------------------
  3163.     # 生成购买窗口
  3164.     @buy_window = Window_ShopBuy.new($game_temp.shop_goods)
  3165.     @buy_window.active = false
  3166.     @buy_window.visible = false
  3167.     @buy_window.help_window = @help_window
  3168.     # 生成卖出窗口
  3169.     @sell_window = Window_ShopSell.new
  3170.     @sell_window.active = false
  3171.     @sell_window.visible = false
  3172.     @sell_window.help_window = @help_window
  3173.     # 生成数量输入窗口
  3174.     @number_window = Window_ShopNumber.new
  3175.     @number_window.active = false
  3176.     @number_window.visible = false
  3177.     # 生成状态窗口
  3178.     @status_window = Window_ShopStatus.new
  3179.     @status_window.visible = false
  3180.     # 执行过渡
  3181.     Graphics.transition
  3182.     # 主循环
  3183.     loop do
  3184.       # 刷新游戏画面
  3185.       Graphics.update
  3186.       # 刷新输入信息
  3187.       Input.update
  3188.       # 刷新画面
  3189.       update
  3190.       # 如果画面切换的话就中断循环
  3191.       if $scene != self
  3192.         break
  3193.       end
  3194.     end
  3195.     # 准备过渡
  3196.     Graphics.freeze
  3197.     # 释放窗口
  3198.     @help_window.dispose
  3199.     @command_window.dispose
  3200.     @gold_window.dispose
  3201.     @dummy_window.dispose
  3202.     @buy_window.dispose
  3203.     @sell_window.dispose
  3204.     @number_window.dispose
  3205.     @status_window.dispose
  3206.   end
  3207.   #--------------------------------------------------------------------------
  3208.   # ● 刷新画面
  3209.   #--------------------------------------------------------------------------
  3210. # --------------------
  3211. # 衝突可能
  3212.   def update
  3213.     # 刷新窗口
  3214.     @help_window.update
  3215.     @command_window.update
  3216.     @gold_window.update
  3217.     @dummy_window.update
  3218.     @buy_window.update
  3219.     @sell_window.update
  3220.     @number_window.update
  3221.     @status_window.update
  3222.     # 指令窗口激活的情况下: 调用 update_command
  3223.     if @command_window.active
  3224. # -------------------
  3225. # 修改開始
  3226.       @help_window.visible=false#★★★★★★★★★★★★★★★★
  3227. # 修改終了
  3228. # -------------------
  3229.       update_command
  3230.       return
  3231.     end
  3232.     # 购买窗口激活的情况下: 调用 update_buy
  3233.     if @buy_window.active
  3234. # -------------------
  3235. # 修改開始
  3236.       @help_window.visible=true#★★★★★★★★★★★★★★★★
  3237.       if @buy_window.item==nil#★★★★★★★★★★★★★★★★
  3238.         @help_window.visible=false#★★★★★★★★★★★★★★★★
  3239.       end #★★★★★★★★★★★★★★★★     
  3240. # 修改終了
  3241. # -------------------
  3242.       update_buy
  3243.       return
  3244.     end
  3245.     # 卖出窗口激活的情况下: 调用 update_sell
  3246.     if @sell_window.active
  3247. # -------------------
  3248. # 修改開始
  3249.       @help_window.visible=true#★★★★★★★★★★★★★★★★
  3250.       if @sell_window.item==nil#★★★★★★★★★★★★★★★★
  3251.         @help_window.visible=false#★★★★★★★★★★★★★★★★
  3252.       end #★★★★★★★★★★★★★★★★
  3253. # 修改終了
  3254. # -------------------      
  3255.       update_sell
  3256.       return
  3257.     end
  3258.     # 个数输入窗口激活的情况下: 调用 update_number
  3259.     if @number_window.active
  3260. # -------------------
  3261. # 修改開始
  3262.       @help_window.visible=false#★★★★★★★★★★★★★★★★
  3263. # 修改終了
  3264. # -------------------
  3265.       update_number
  3266.       return
  3267.     end
  3268.   end
  3269. end
复制代码
’’
作者: eu国猪    时间: 2012-8-2 21:44
eu国猪 发表于 2012-7-21 12:22
#==============================================================================
# 禾西製作 / Created ...

就是像网游那样显示嘛
作者: 56722562    时间: 2013-4-21 10:59
强,简直是长篇小说.........
作者: z2214557w    时间: 2013-4-21 12:12
我试过站里的几乎所有显示详细信息脚本,都不理想。最后用一个土方法实现:因为我的装备最多只加三样属性,所以直接在物品文字说明那写出来了,当然如果你的物品或装备加的属性很多,那就没办法,写不下




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1