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

Project1

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

[已经解决] 物品装备名字颜色的显示问题

[复制链接]

Lv3.寻梦者

灌水局大小姐

梦石
0
星屑
3820
在线时间
1690 小时
注册时间
2012-3-10
帖子
2469
跳转到指定楼层
1
发表于 2013-9-24 20:59:50 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
我伸手····我无耻············
可是我真的不会弄啊

问题是这样的:

XX装备  或者 XX物品,比如:宠物蛋@5    在游戏中名字会显示成 紫色!
可是用了详尽帮助脚本后 说明窗口里的“宠物蛋”名字确跟物品栏里的不一样,物品栏里显示紫色,而说明窗口显示的是白色!
能不能让说明窗口里的名字颜色也能根据“@”的设置来显示呢?
  1.   #------------------------------------------------------------------------
  2.   # ● 裝備名字顔色變化 接口
  3.   #------------------------------------------------------------------------
  4.   def draw_name_color(equipment)
  5.     return normal_color
  6.   end
复制代码
上面这一段我是看懂了,但是我不懂怎么去改才能让它显示的文字颜色跟数据库里设置的颜色显示出来呢?

我是真的尝试过,都快疯了!大神一定要帮我,不然水区十年干旱!!!!下面放上脚本
  1. #==============================================================================
  2. # 禾西製作 / Created by Quarcy
  3. #==============================================================================
  4. class Window_Help < Window_Base
  5.   attr_reader :materia
  6.   #--------------------------------------------------------------------------
  7.   # ● 定義不顯示的屬性與狀態
  8.   #--------------------------------------------------------------------------
  9.   def unshown
  10.     @unshow_elements = [17, 18]
  11.     @unshow_states = []
  12.   end
  13.   #--------------------------------------------------------------------------
  14.   # ● 初始化對象
  15.   #--------------------------------------------------------------------------
  16.   def initialize
  17.     super(0, 0, 640, 64)
  18.     self.opacity = 150
  19.     self.z=150
  20.     self.visible = false
  21.   end
  22.   #--------------------------------------------------------------------------
  23.   # ● 設置文本
  24.   #     data  : 窗口顯示的字符串/物品資料
  25.   #     align : 對齊方式 (0..左對齊、1..中間對齊、2..右對齊)
  26.   #--------------------------------------------------------------------------
  27.   def set_text(data, align=0)
  28.     #------------------------------------------------------------------------
  29.     # ● 當資料爲文字時候
  30.     #------------------------------------------------------------------------
  31.     # 如果文本或對齊方式至少一方与上次的不同
  32.     if data != @text or align != @align
  33.       if data.is_a?(String)
  34.         # 再描繪文本
  35.         self.width = 640
  36.         self.height = 64
  37.         self.x=0
  38.         self.y=0
  39.         self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
  40.         self.contents.clear
  41.         self.contents.font.color = normal_color
  42.         self.contents.font.size = 20
  43.         self.contents.draw_text(4, 0, self.width - 40, 32, data, align)
  44.         @text = data
  45.         @align = align
  46.         [url=home.php?mod=space&uid=95897]@actor[/url] = nil
  47.         self.visible = true
  48.       end
  49.     end
  50.     return if data.is_a?(String)
  51.     #------------------------------------------------------------------------
  52.     # ● 當沒有資料時候
  53.     #------------------------------------------------------------------------
  54.     if data.nil?
  55.       self.visible=false
  56.     else
  57.       self.visible=true
  58.     end
  59.     #------------------------------------------------------------------------
  60.     # ● 當資料爲物品/技能時候
  61.     #------------------------------------------------------------------------
  62.     if data != nil && @data != data or self.width != 210
  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.     if identified
  228.       return unless equipment.identified
  229.     end
  230.     #------------------------------------------------------------------------
  231.     # ● 攻擊力描繪(武器)
  232.     #------------------------------------------------------------------------
  233.     if equipment.is_a?(RPG::Weapon)
  234.       x = 0
  235.       y += 1
  236.       text = $data_system.words.atk+":"+equipment.atk.to_s
  237.       self.contents.font.color = normal_color
  238.       self.contents.font.size = size
  239.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  240.     end
  241.     #------------------------------------------------------------------------
  242.     # ● 價格描繪
  243.     #------------------------------------------------------------------------
  244.     x = 0
  245.     y += 1
  246.     text = phrase["price"] + equipment.price.to_s
  247.     self.contents.font.color = normal_color
  248.     self.contents.font.size = size
  249.     self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  250.     #------------------------------------------------------------------------
  251.     # ● 物理防禦
  252.     #------------------------------------------------------------------------
  253.     unless equipment.pdef.zero?
  254.       x = 0
  255.       y += 1
  256.       text = $data_system.words.pdef+":"+equipment.pdef.to_s
  257.       self.contents.font.color = normal_color
  258.       self.contents.font.size = size
  259.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  260.     end
  261.     #------------------------------------------------------------------------
  262.     # ● 魔法防禦
  263.     #------------------------------------------------------------------------
  264.     unless equipment.mdef.zero?
  265.       x = 0
  266.       y += 1
  267.       text=$data_system.words.mdef+":"+equipment.mdef.to_s
  268.       self.contents.font.color = normal_color
  269.       self.contents.font.size = size
  270.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  271.     end
  272.     #------------------------------------------------------------------------
  273.     # ● 屬性
  274.     #------------------------------------------------------------------------
  275.     if element_set.size > 0
  276.       x = 0
  277.       y += 1
  278.       text = phrase["elements"]
  279.       for i in 0...element_set.size
  280.         break if i > 4
  281.         text += $data_system.elements[element_set[i]]
  282.       end
  283.       self.contents.font.color = normal_color
  284.       self.contents.font.size = size
  285.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  286.     end
  287.     if element_set.size >= 5
  288.       x = (phrase["elements"].size)*5-4
  289.       y += 1
  290.       text = ""
  291.       for i in 4...element_set.size
  292.         text += $data_system.elements[element_set[i]]
  293.       end
  294.       self.contents.font.color = normal_color
  295.       self.contents.font.size = size
  296.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  297.     end
  298.     #------------------------------------------------------------------------
  299.     # ● 描述分流 武器/防具
  300.     #------------------------------------------------------------------------
  301.     case equipment
  302.     when RPG::Weapon
  303.       #------------------------------------------------------------------------
  304.       # ● 解除狀態(武器)
  305.       #------------------------------------------------------------------------
  306.       unless minus_state_set.empty?
  307.         x = 0
  308.         y += 1
  309.         text=phrase["minus_states"]
  310.         text=phrase["guard_states"]
  311.         self.contents.font.color = normal_color
  312.         self.contents.font.size = size
  313.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  314.         for i in 0...minus_state_set.size
  315.           y += 1
  316.           text = $data_states[minus_state_set[i]].name        
  317.           self.contents.font.color = normal_color
  318.           self.contents.font.size = size
  319.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  320.         end
  321.       end
  322.       #------------------------------------------------------------------------
  323.       # ● 附加狀態(武器)
  324.       #------------------------------------------------------------------------
  325.       unless plus_state_set.empty?
  326.         x = 0
  327.         y += 1
  328.         text = phrase["plus_states"]
  329.         self.contents.font.color = normal_color
  330.         self.contents.font.size = size
  331.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  332.         for i in 0...plus_state_set.size
  333.           y += 1
  334.           text=$data_states[plus_state_set[i]].name        
  335.           self.contents.font.color = normal_color
  336.           self.contents.font.size = size
  337.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  338.         end  
  339.       end
  340.     when RPG::Armor
  341.       #------------------------------------------------------------------------
  342.       # ● 防禦狀態(防具)
  343.       #------------------------------------------------------------------------
  344.       unless guard_state_set.empty?
  345.         x = 0
  346.         y += 1
  347.         text=phrase["guard_states"]
  348.         self.contents.font.color = normal_color
  349.         self.contents.font.size = size
  350.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  351.         for i in 0...guard_state_set.size
  352.           y += 1
  353.           text = $data_states[guard_state_set[i]].name        
  354.           self.contents.font.color = normal_color
  355.           self.contents.font.size = size
  356.           self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)        
  357.         end
  358.       end
  359.       #------------------------------------------------------------------------
  360.       # ● 自動狀態(防具)
  361.       #------------------------------------------------------------------------
  362.       unless auto_state_id.zero?
  363.         x = 0
  364.         y += 1
  365.         text = phrase["auto_state"] + $data_states[auto_state_id].name
  366.         self.contents.font.color = normal_color
  367.         self.contents.font.size = size
  368.         self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  369.       end
  370.     end
  371.     #------------------------------------------------------------------------
  372.     # ● 空行
  373.     #------------------------------------------------------------------------
  374.     y+=1
  375.     #------------------------------------------------------------------------
  376.     # ● 力量
  377.     #------------------------------------------------------------------------
  378.     unless equipment.str_plus.zero?
  379.       x = 0
  380.       y += 1
  381.       h += 1
  382.       if equipment.str_plus > 0
  383.         text=$data_system.words.str+" +"+ equipment.str_plus.to_s
  384.       else
  385.         text=$data_system.words.str+" -"+ (-equipment.str_plus).to_s
  386.       end
  387.       self.contents.font.color = normal_color
  388.       self.contents.font.size = size
  389.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)  
  390.     end
  391.     #------------------------------------------------------------------------
  392.     # ● 靈巧
  393.     #------------------------------------------------------------------------
  394.     unless equipment.dex_plus.zero?
  395.       x = 0
  396.       y += 1
  397.       h += 1
  398.       if equipment.dex_plus > 0
  399.         text=$data_system.words.dex+" +"+ equipment.dex_plus.to_s
  400.       else
  401.         text=$data_system.words.dex+" -"+ (-equipment.dex_plus).to_s
  402.       end
  403.       self.contents.font.color = normal_color
  404.       self.contents.font.size = size
  405.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  406.     end
  407.     #------------------------------------------------------------------------
  408.     # ● 速度
  409.     #------------------------------------------------------------------------
  410.     unless equipment.agi_plus.zero?
  411.       x = 0
  412.       y += 1
  413.       h += 1
  414.       if equipment.agi_plus > 0
  415.         text=$data_system.words.agi+" +"+ equipment.agi_plus.to_s
  416.       else
  417.         text=$data_system.words.agi+" -"+ (-equipment.agi_plus).to_s
  418.       end
  419.       self.contents.font.color = normal_color
  420.       self.contents.font.size = size
  421.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  422.     end
  423.     #------------------------------------------------------------------------
  424.     # ● 智力
  425.     #------------------------------------------------------------------------
  426.     unless equipment.int_plus.zero?
  427.       x = 0
  428.       y += 1
  429.       h += 1
  430.       if equipment.int_plus > 0
  431.         text=$data_system.words.int+" +"+ equipment.int_plus.to_s
  432.       else
  433.         text=$data_system.words.int+" -"+ (-equipment.int_plus).to_s
  434.       end
  435.       self.contents.font.color = normal_color
  436.       self.contents.font.size = size
  437.       self.contents.draw_text(x+move, y*size+5, text.size*6, size, text, 0)
  438.     end
  439.     #------------------------------------------------------------------------
  440.     # ● 魔力石描繪
  441.     #------------------------------------------------------------------------
  442.     y += draw_materia(equipment, move, y, size) unless self.materia.nil?
  443.   end
  444.   #--------------------------------------------------------------------------
  445.   # ● 物品幫助窗口
  446.   #--------------------------------------------------------------------------
  447.   def set_item_text(item)
  448.     # 取得描述
  449.     description = item.description.clone
  450.     # 取得屬性、附加狀態、解除狀態之副本
  451.     element_set = item.element_set.clone
  452.     plus_state_set = item.plus_state_set.clone
  453.     minus_state_set = item.minus_state_set.clone
  454.     # 過濾不顯示的描述
  455.     element_set -= @unshow_elements
  456.     plus_state_set -= @unshow_states
  457.     minus_state_set -= @unshow_states
  458.     # 初始化數據設定
  459.     x = 0
  460.     y = 0
  461.     h = 0
  462.     phrase = {}
  463.     scope ={}
  464.     parameter_type = {}
  465.    
  466.     # 基本數據設定
  467. =begin
  468.     name_size = 名字文字大小
  469.     size = 描述文字大小
  470.     word = 每行的描述文字數
  471.     move = 全體描述偏移幅度
  472. =end
  473.     name_size = 18
  474.     size = 14
  475.     word = 12
  476.     move = 80
  477.    
  478.     # 基本文字設定
  479.     phrase["scope"] = "范围:"
  480.     phrase["price"] = "价格:"
  481.     phrase["recover_hp_rate"] = "HP 回复率:"
  482.     phrase["recover_hp"] = "HP 回复量:"
  483.     phrase["recover_sp_rate"] = "SP 回复率:"
  484.     phrase["recover_sp"] = "SP 回复量:"
  485.     phrase["elements"] = "属性:"
  486.     phrase["plus"] = "附加"
  487.     phrase["minus"] = "解除"
  488.     phrase["states"] = "状态"
  489.     scope[0] = "特殊物品"
  490.     scope[1] = "特殊物品"
  491.     scope[2] = "敌单体"
  492.     scope[3] = "敌全体"
  493.     scope[4] = "己方单体"
  494.     scope[5] = "己方全体"
  495.     scope[6] = "己方昏死单体"
  496.     scope[7] = "己方昏死全体"
  497.     scope[8] = "使用者"

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

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

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

  999. #------------------------------------------------------------------------------



  1000. #------------------------------------------------------------------------------
  1001. #==============================================================================
  1002. # ■ Window_Item
  1003. #------------------------------------------------------------------------------
  1004. #  物品画面、战斗画面、显示浏览物品的窗口。
  1005. #==============================================================================

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



  1032. #------------------------------------------------------------------------------
  1033. #==============================================================================
  1034. # ■ Window_Skill
  1035. #------------------------------------------------------------------------------
  1036. #  特技画面、战斗画面、显示可以使用的特技浏览的窗口。
  1037. #==============================================================================

  1038. class Window_Skill < Window_Selectable
  1039.   #--------------------------------------------------------------------------
  1040.   # ● 初始化对像
  1041.   #     actor : 角色
  1042.   #--------------------------------------------------------------------------
  1043.   def initialize(actor)
  1044.     super(0, 128, 640, 352)
  1045.     @actor = actor
  1046.     @column_max = 2
  1047.    
  1048.     refresh
  1049.     self.index = 0
  1050.     # 战斗中的情况下将窗口移至中央并将其半透明化
  1051.     if $game_temp.in_battle
  1052.       self.y = 64
  1053.       self.height = 256
  1054.       self.back_opacity = 160
  1055.     end
  1056.   end
  1057.   #--------------------------------------------------------------------------
  1058.   # ● 刷新帮助文本
  1059.   #--------------------------------------------------------------------------

  1060.   def update_help
  1061.     @help_window.set_text(skill)
  1062.     #校正帮助窗口位置
  1063.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1064.   end
  1065. end
  1066. #------------------------------------------------------------------------------



  1067. #------------------------------------------------------------------------------
  1068. #==============================================================================
  1069. # ■ Window_SkillStatus
  1070. #------------------------------------------------------------------------------
  1071. #  显示特技画面、特技使用者的窗口。
  1072. #==============================================================================

  1073. class Window_SkillStatus < Window_Base
  1074.   #--------------------------------------------------------------------------
  1075.   # ● 初始化对像
  1076.   #     actor : 角色
  1077.   #--------------------------------------------------------------------------
  1078.   def initialize(actor)
  1079. # -------------------
  1080. # 修改開始
  1081.     super(0, 64-64, 640, 64+64)#★★★★★★★★★★★★★★★★★★★★
  1082. # 修改終了
  1083. # -------------------
  1084.     self.contents = Bitmap.new(width - 32, height - 32)
  1085.     @actor = actor
  1086.     refresh
  1087.   end
  1088. end
  1089. #------------------------------------------------------------------------------



  1090. #------------------------------------------------------------------------------


  1091. #------------------------------------------------------------------------------
  1092. #==============================================================================
  1093. # ■ Window_EquipRight
  1094. #------------------------------------------------------------------------------
  1095. #  装备画面、显示角色现在装备的物品的窗口。
  1096. #==============================================================================

  1097. class Window_EquipRight < Window_Selectable
  1098.   #--------------------------------------------------------------------------
  1099.   # ● 初始化对像
  1100.   #     actor : 角色
  1101.   #--------------------------------------------------------------------------
  1102.   def initialize(actor)
  1103.     super(272, 64-64, 368, 192+64)
  1104.     self.contents = Bitmap.new(width - 32, height - 32)
  1105.     @actor = actor
  1106.     refresh
  1107.     self.index = 0
  1108.   end
  1109.   #--------------------------------------------------------------------------
  1110.   # ● 刷新帮助文本
  1111.   #--------------------------------------------------------------------------

  1112.   def update_help
  1113.     @help_window.set_text(item)
  1114.     #校正帮助窗口位置
  1115.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1116.   end
  1117. end
  1118. class Window_EquipLeft < Window_Base
  1119.   #--------------------------------------------------------------------------
  1120.   # ● 初始化对像
  1121.   #     actor : 角色
  1122.   #--------------------------------------------------------------------------
  1123.   def initialize(actor)
  1124.     super(0, 64-64, 272, 192+64)
  1125.     self.contents = Bitmap.new(width - 32, height - 32)
  1126.     @actor = actor
  1127.     refresh
  1128.   end
  1129. end
  1130. #------------------------------------------------------------------------------



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

  1137. class Window_EquipItem < Window_Selectable
  1138.   def update_help
  1139.     @help_window.set_text(item)
  1140.     #校正帮助窗口位置
  1141.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1142.   end
  1143. end
  1144. #------------------------------------------------------------------------------



  1145. #------------------------------------------------------------------------------
  1146. #==============================================================================
  1147. # ■ Window_ShopCommand
  1148. #------------------------------------------------------------------------------
  1149. #  商店画面、选择要做的事的窗口
  1150. #==============================================================================

  1151. class Window_ShopCommand < Window_Selectable
  1152.   #--------------------------------------------------------------------------
  1153.   # ● 初始化对像
  1154.   #--------------------------------------------------------------------------
  1155.   def initialize
  1156. # -------------------
  1157. # 修改開始
  1158.     super(0, 64-64, 480, 64)#★★★★★★★★★★★★★★★★★
  1159. # 修改終了
  1160. # -------------------
  1161.     self.contents = Bitmap.new(width - 32, height - 32)
  1162.     @item_max = 3
  1163.     @column_max = 3
  1164.     @commands = ["买", "卖", "取消"]
  1165.     refresh
  1166.     self.index = 0
  1167.   end
  1168. end
  1169. #------------------------------------------------------------------------------



  1170. #------------------------------------------------------------------------------
  1171. #========================================================================================================================
  1172. # ■ Window_ShopBuy
  1173. #------------------------------------------------------------------------------
  1174. #  商店画面、浏览显示可以购买的商品的窗口。
  1175. #==============================================================================

  1176. class Window_ShopBuy < Window_Selectable
  1177.   #--------------------------------------------------------------------------
  1178.   # ● 初始化对像
  1179.   #     shop_goods : 商品
  1180.   #--------------------------------------------------------------------------
  1181.   def initialize(shop_goods)
  1182. # -------------------
  1183. # 修改開始
  1184.     super(0, 128-64, 368, 352+64)#★★★★★★★★★★★★★★★★
  1185. # 修改終了
  1186. # -------------------
  1187.     @shop_goods = shop_goods
  1188.    
  1189.     refresh
  1190.     self.index = 0
  1191.   end
  1192.   #--------------------------------------------------------------------------
  1193.   # ● 刷新帮助文本
  1194.   #--------------------------------------------------------------------------

  1195.   def update_help
  1196.     @help_window.set_text(item)
  1197.     #校正帮助窗口位置
  1198.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1199.   end
  1200. end
  1201. #------------------------------------------------------------------------------



  1202. #------------------------------------------------------------------------------
  1203. #==============================================================================
  1204. # ■ Window_ShopSell
  1205. #------------------------------------------------------------------------------
  1206. #  商店画面、浏览显示可以卖掉的商品的窗口。
  1207. #==============================================================================

  1208. class Window_ShopSell < Window_Selectable
  1209.   #--------------------------------------------------------------------------
  1210.   # ● 初始化对像
  1211.   #--------------------------------------------------------------------------
  1212.   def initialize
  1213. # -------------------
  1214. # 修改開始
  1215.     super(0, 128-64, 640, 352+64)#★★★★★★★★★★★★★★★★
  1216. # 修改終了
  1217. # -------------------
  1218.     @column_max = 2
  1219.    
  1220.     refresh
  1221.     self.index = 0
  1222.   end
  1223.   #--------------------------------------------------------------------------
  1224.   # ● 刷新帮助文本
  1225.   #--------------------------------------------------------------------------

  1226.   def update_help
  1227.     @help_window.set_text(item)
  1228.     #校正帮助窗口位置
  1229.     @help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
  1230.   end
  1231. end
  1232. #------------------------------------------------------------------------------



  1233. #------------------------------------------------------------------------------
  1234. #==============================================================================
  1235. # ■ Window_ShopNumber
  1236. #------------------------------------------------------------------------------
  1237. #  商店画面、输入买卖数量的窗口。
  1238. #==============================================================================
  1239. class Window_ShopNumber < Window_Base
  1240.   #--------------------------------------------------------------------------
  1241.   # ● 初始化对像
  1242.   #--------------------------------------------------------------------------
  1243.   def initialize
  1244. # -------------------
  1245. # 修改開始
  1246.     super(0, 128-64, 368, 352+64)#★★★★★★★★★★★★★★★★
  1247. # 修改終了
  1248. # -------------------
  1249.     self.contents = Bitmap.new(width - 32, height - 32)
  1250.     @item = nil
  1251.     [url=home.php?mod=space&uid=25307]@Max[/url] = 1
  1252.     @price = 0
  1253.     [url=home.php?mod=space&uid=27178]@Number[/url] = 1
  1254.   end
  1255. end
  1256. #------------------------------------------------------------------------------



  1257. #------------------------------------------------------------------------------
  1258. #==============================================================================
  1259. # ■ Window_ShopStatus
  1260. #------------------------------------------------------------------------------
  1261. #  商店画面、显示物品所持数与角色装备的窗口。
  1262. #==============================================================================

  1263. class Window_ShopStatus < Window_Base
  1264.   #--------------------------------------------------------------------------
  1265.   # ● 初始化对像
  1266.   #--------------------------------------------------------------------------
  1267.   def initialize
  1268. # -------------------
  1269. # 修改開始
  1270.     super(368, 128-64, 272, 352+64)#★★★★★★★★★★★★
  1271. # 修改終了
  1272. # -------------------
  1273.     self.contents = Bitmap.new(width - 32, height - 32)
  1274.     @item = nil
  1275.     refresh
  1276.   end
  1277. end
  1278. #------------------------------------------------------------------------------



  1279. #------------------------------------------------------------------------------
  1280. #==============================================================================
  1281. # ■ Scene_Equip
  1282. #------------------------------------------------------------------------------
  1283. #  处理装备画面的类。
  1284. #==============================================================================

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



  1389. #------------------------------------------------------------------------------
  1390. #========================================================================================================================
  1391. # ■ Scene_Battle (分割定义 3)
  1392. #------------------------------------------------------------------------------
  1393. #  处理战斗画面的类。
  1394. #========================================================================================================================

  1395. class Scene_Battle
  1396.   #--------------------------------------------------------------------------
  1397.   # ● 刷新画面 (角色命令回合 : 选择特技)
  1398.   #--------------------------------------------------------------------------
  1399.   alias first_reupdate_phase3_skill_select update_phase3_skill_select
  1400.   def update_phase3_skill_select
  1401. # -------------------
  1402. # 修改開始
  1403.     @skill_window.help_window.visible = false#★★★★★★★★★★★★★
  1404. # 修改終了
  1405. # -------------------
  1406.     first_reupdate_phase3_skill_select
  1407.   end
  1408.   #--------------------------------------------------------------------------
  1409.   # ● 刷新画面 (角色命令回合 : 选择物品)
  1410.   #--------------------------------------------------------------------------
  1411.   alias first_reupdate_phase3_item_select update_phase3_item_select  
  1412.   def update_phase3_item_select
  1413. # -------------------
  1414. # 修改開始
  1415.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  1416. # 修改終了
  1417. # -------------------
  1418.     first_reupdate_phase3_item_select
  1419.   end
  1420.   #--------------------------------------------------------------------------
  1421.   # ● 开始选择特技
  1422.   #--------------------------------------------------------------------------
  1423.   def start_skill_select
  1424.     @skill_window = Window_Skill.new(@active_battler)
  1425.     @skill_window.help_window = Window_Help.new
  1426.     @actor_command_window.active = false
  1427.     @actor_command_window.visible = false
  1428.   end
  1429.   #--------------------------------------------------------------------------
  1430.   # ● 选择特技结束
  1431.   #--------------------------------------------------------------------------
  1432.   alias first_update_end_skill_select end_skill_select  
  1433.   def end_skill_select
  1434. # -------------------
  1435. # 修改開始
  1436.     @skill_window.help_window.visible = false#★★★★★★★★★★★★
  1437. # 修改終了
  1438. # -------------------
  1439.     first_update_end_skill_select
  1440.   end
  1441.   #--------------------------------------------------------------------------
  1442.   # ● 开始选择物品
  1443.   #--------------------------------------------------------------------------
  1444.   def start_item_select
  1445.     # 生成物品窗口
  1446.     @item_window = Window_Item.new
  1447.     # 关联帮助窗口
  1448. # -------------------
  1449. # 修改開始
  1450.     @item_window.help_window =  Window_Help.new#★★★★★★★★★★★★
  1451. # 修改終了
  1452. # -------------------
  1453.     # 无效化角色指令窗口
  1454.     @actor_command_window.active = false
  1455.     @actor_command_window.visible = false
  1456.   end
  1457.   #--------------------------------------------------------------------------
  1458.   # ● 结束选择物品
  1459.   #--------------------------------------------------------------------------
  1460.   alias first_update_end_item_select end_item_select
  1461.   def end_item_select
  1462. # -------------------
  1463. # 修改開始
  1464.     @item_window.help_window.visible = false#★★★★★★★★★★★★
  1465. # 修改終了
  1466. # -------------------
  1467.     first_update_end_item_select
  1468.   end
  1469. end
  1470. #------------------------------------------------------------------------------



  1471. #------------------------------------------------------------------------------
  1472. #==============================================================================
  1473. # ■ Scene_Shop
  1474. #------------------------------------------------------------------------------
  1475. #  处理商店画面的类。
  1476. #==============================================================================

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

点评

要上报认可答案的话劳驾去回复“手动认可申请帖”,你举报是闹哪样啊……  发表于 2013-9-24 21:56

Lv3.寻梦者 (版主)

八宝粥的基叔

梦石
0
星屑
4654
在线时间
5238 小时
注册时间
2009-4-29
帖子
14318

贵宾

来自 2楼
发表于 2013-9-24 21:24:17 | 只看该作者
凡是我改过的地方都有:
  1. # P叔改的地方
复制代码
这样的标识,全局搜索可以找到它们。
范例在此: 0000111.rar (194.05 KB, 下载次数: 52)
效果图:

点评

认可答案! 好人卡 + 100  发表于 2013-9-24 21:26

评分

参与人数 1星屑 +90 收起 理由
︶ㄣ牛排ぶ + 90 认可答案

查看全部评分

《逝去的回忆3:四叶草之梦》真情发布,欢迎点击图片下载试玩喵。

《逝去的回忆3》的讨论群:
一群:192885514
二群:200460747
回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
2744
在线时间
2630 小时
注册时间
2013-1-16
帖子
5657

贵宾

3
发表于 2013-9-24 23:39:27 | 只看该作者
可以@xp区版主来认可答案,或是去手动认可帖里申请(见我签名档),举报是最后采用的方法。

@︶ㄣ牛排ぶ  你认可答案又不分类又是闹哪样…

点评

抱歉,忘记了……  发表于 2013-9-25 12:08
(Created by @喵kano)


施工现场:hotege.github.io
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-9-30 01:30

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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