#在下面if c <= 0处修改强化升到各级时显示的颜色
#c代表着升级次数
#==============================================================================
# [PS0]物品颜色描绘
# Window_Base_Itemcolor
#------------------------------------------------------------------------------
# 在物品、技能选项中显示物品品质并显示品质框和修改物品名颜色。
#==============================================================================
# [更新记录]
# - 2012.02.17 By wyongcan
# * 修改为适合装备系统增强 不会读取说明中的品质
# - 2012.01.03 By 仲秋启明
# * 修改为VA定义
# - 2011.12.27 By 仲秋启明
# * 移植至RGSS3,遵循PS0协议;
# * 优化数据库备注中设定方法
# - 2011.08.22 By 冰舞蝶恋
# * 蓝本(实用·极简 -- 按品质,给物品描绘色彩边框)
# - 2010.08.06 By 仲秋启明
# * 蓝本(物品颜色描绘脚本(完整无冲突版))
#------------------------------------------------------------------------------
# [使用方法]
# - 替换原Window_Base中的draw_item_name定义或复制到Main之前
#==============================================================================
$_PS0 = {} if $_PS0 == nil
$_PS0["Window_Base_Itemcolor"] = 20111227
#==============================================================================
# [PS0] 通用配置模块
#==============================================================================
module PS0
module Window_Base_Itemcolor
Color1 = Color.new(255, 255, 255) # 一般品质的色彩(白,1)
Color2 = Color.new(128, 255, 128) # 平庸品质的色彩(绿,2)
Color3 = Color.new(128, 128, 255) # 精良品质的色彩(蓝,3)
Color4 = Color.new(255, 0, 255) # 卓越品质的色彩(紫,4)
Color5 = Color.new(255, 128, 128) # 神秘品质的色彩(红,5)
Color6 = Color.new(255, 128, 0) # 传说品质的色彩(橙,6)
Color7 = Color.new(255, 255, 128) # 特殊品质的色彩(黄,7)
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
def draw_item_name(item, x, y, enabled = true, width = 172)
return unless item
item.up = 0 if item.is_a?(RPG::EquipItem) && item.up == nil
c = 0
c = item.up if item.is_a?(RPG::EquipItem)
if c <= 0
color = PS0::Window_Base_Itemcolor::Color1
elsif c <= 2
color = PS0::Window_Base_Itemcolor::Color2
elsif c <= 4
color = PS0::Window_Base_Itemcolor::Color3
elsif c <= 6
color = PS0::Window_Base_Itemcolor::Color4
elsif c <= 8
color = PS0::Window_Base_Itemcolor::Color5
elsif c <= 10
color = PS0::Window_Base_Itemcolor::Color6
elsif c <= 12
color = PS0::Window_Base_Itemcolor::Color7
else
color = Color.new(0, 0, 0, 0)
end
self.contents.fill_rect(x, y, 24, 1, color)
self.contents.fill_rect(x, y, 1, 24, color)
self.contents.fill_rect(x, y+23, 24, 1, color)
self.contents.fill_rect(x+23, y, 1, 24, color)
draw_icon(item.icon_index, x, y, enabled)
change_color(color, enabled)
if item.is_a?(RPG::EquipItem) && item.up != nil && item.up != 0
draw_text(x + 24, y, width, line_height, item.name + "+" + item.up.to_s)
return
end
draw_text(x + 24, y, width, line_height, item.name)
end
end
#==============================================================================
# [PS0] End of Script
#==============================================================================