class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# ● 数据库载入
#--------------------------------------------------------------------------
alias old_ld load_database
def load_database
old_ld
$data_mapinfos = load_data("Data/MapInfos.rvdata")
end
end
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● 开始
#--------------------------------------------------------------------------
alias old_start start
def start
old_start
@mapname_window = Window_MapName.new
end
#--------------------------------------------------------------------------
# ● 结束
#--------------------------------------------------------------------------
alias old_ter terminate
def terminate
old_ter
@mapname_window.dispose
end
#--------------------------------------------------------------------------
# ● 更新
#--------------------------------------------------------------------------
alias old_update update
def update
old_update
@mapname_window.update
end
end作者: 丿冷丶心△男神 时间: 2015-6-22 23:14
(详情帮助脚本 本人非常喜欢。)
h += 1 #價格
h += 1 #装备等级
h += 1 unless equipment.nodur or PA::USE_DUR == false#耐久度
h += 1 if equipment.sockets_num > 0 #孔数
h += 1 unless equipment.atk.zero? #攻擊力
h += 1 unless equipment.def.zero? #防禦力
h += 1 unless equipment.spi.zero? #精神力
h += 1 unless equipment.agi.zero? #敏捷力
h += element_set.size + 1 if element_set.size > 0 #屬性
h += state_set.size + 1 if state_set.size > 0 #狀態
h += special.size + 2 if special.size > 0 #特殊效果
if special.size > 0
case special.size
when 1
@first_line = h-1
when 2
@first_line = h-2
when 3
@first_line = h-3
when 4
@first_line = h-4
when 5
@first_line = h-5
when 6
@first_line = h-6
end
end
@special_size = special.size
#------------------------------------------------------------------------
# ● 圖片顯示保證高度
#------------------------------------------------------------------------
#h = 6 + now_h if (h - now_h) < 6
#------------------------------------------------------------------------
# ● 換算高度
#------------------------------------------------------------------------
self.height = h * @size + @name_size + 36
#------------------------------------------------------------------------
# ● 生成背景
#------------------------------------------------------------------------
self.contents = Bitmap.new(self.width - 32, self.height - 32)
self.contents.clear
#------------------------------------------------------------------------
# ● 名字描繪
#------------------------------------------------------------------------
text = equipment.name
self.contents.font.size = @name_size
if text.nil?
self.visible = false
else
self.visible = true
###self.contents.draw_text(0, 0, text.size*7, @name_size, text, 0)
#我加的,用case判断颜色
unless equipment.is_a?(RPG::Item)
case gifts.size
when 1
self.contents.font.color = text_color(12)
when 2
self.contents.font.color = text_color(29)
when 3
self.contents.font.color = text_color(17)
when 4
self.contents.font.color = text_color(20)
when 5
self.contents.font.color = text_color(26)
when 6
self.contents.font.color = text_color(31)
end
else
self.contents.font.color = text_color(0)
end
self.contents.draw_text(0, 0, contents.width-4, @name_size, text)
end
#------------------------------------------------------------------------
# ● 說明描繪
#------------------------------------------------------------------------
x = 0
@y += 1
while ((text = description.slice!(/./m)) != nil)
self.contents.font.color = normal_color
self.contents.font.size = @size
self.contents.draw_text(x*@size, @y*@size+5, @size, @size, text, 0)
if words_judge(text) == true
x += 1
else
x += 0.5
end
if x == @word or x == @word - 0.5
x = 0
@y += 1
end
end
#------------------------------------------------------------------------
# ● 圖標描繪
#------------------------------------------------------------------------
#bitmap = Cache.system("Iconset")
#rect = Rect.new(equipment.icon_index % 16 * 24, equipment.icon_index / 16 * 24, 24, 24)
#self.contents.blt(0, y*size + 20, bitmap, rect, 255)
#------------------------------------------------------------------------
# ● 價格描繪
#------------------------------------------------------------------------
unless equipment.price.zero?
text = phrase[:price] + ":" + equipment.price.to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 装备等级描繪
#------------------------------------------------------------------------
unless equipment.read_note('装备等级') == nil
text = "角色等级要求:" + equipment.read_note('装备等级').to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 耐久度
#------------------------------------------------------------------------
if PA::USE_DUR == true
unless equipment.nodur
unless equipment.indesctructible
if equipment.maxdur == nil
text = "耐久度:#{equipment.dur} / #{equipment.read_note('耐久度')}"
else
text = "耐久度:#{equipment.dur} / #{equipment.maxdur}"
end
else
text = "耐久度:无法破坏"
end
draw_text(text, 1, move)
end
end
#------------------------------------------------------------------------
# ● 孔数
#------------------------------------------------------------------------
if equipment.sockets_num > 0
text = "剩余孔数:#{equipment.sockets_num}"
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 攻擊力
#------------------------------------------------------------------------
unless equipment.atk.zero?
text = $data_system.terms.atk + ":" + equipment.base_atk.to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 防禦力
#------------------------------------------------------------------------
unless equipment.def.zero?
text = $data_system.terms.def + ":" + equipment.base_def.to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 精神力
#------------------------------------------------------------------------
unless equipment.spi.zero?
text = $data_system.terms.spi + ":" + equipment.base_spi.to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 敏捷力
#------------------------------------------------------------------------
unless equipment.agi.zero?
text = $data_system.terms.agi + ":" + equipment.base_agi.to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 屬性
#------------------------------------------------------------------------
if element_set.size > 0
case equipment
when RPG::Weapon
text=phrase[:elements]+":"
when RPG::Armor
text=phrase[:guard_elements]+":"
end
draw_text(text, 1, move)
element_set.each do |i|
text = $data_system.elements
draw_text(text, 1, move + @size)
end
end
#------------------------------------------------------------------------
# ● 狀態
#------------------------------------------------------------------------
if state_set.size > 0
case equipment
when RPG::Weapon
text=phrase[:states]+":"
when RPG::Armor
text=phrase[:guard_states]+":"
end
draw_text(text, 1, move)
state_set.each do |i|
text = $data_states.name
draw_text(text, 1, move + @size)
end
end
#------------------------------------------------------------------------
# ● 特殊效果
#------------------------------------------------------------------------
if special.size > 0
kind_text = ["","","",""]
weapon_gifts = [0,1,4,5,12,14,15]
armor0_gifts = [2,3,4,5,10,11,15,16]
armor1_gifts = [2,3,8,9,15,16]
armor2_gifts = [2,3,6,7,13,15,16]
kind_text[0] = " 武器" if weapon_gifts.include?(equipment.gifts[0].type)
kind_text[1] = " 盾" if armor0_gifts.include?(equipment.gifts[0].type)
kind_text[2] = " 盔" if armor1_gifts.include?(equipment.gifts[0].type)
kind_text[3] = " 衣" if armor2_gifts.include?(equipment.gifts[0].type)
if equipment.is_a?(RPG::Armor) and equipment.base_id == PA::CRYSTAL
text = "可注入" + kind_text[0] + kind_text[1] + kind_text[2] + kind_text[3]
draw_text(text, 1, move)
special.each {|text| draw_text(text, 1, move + @size)}
else
text = phrase[:special]+":"
draw_text(text, 1, move)
special.each {|text| draw_text(text, 1, move + @size)}
end
end
end
#------------------#
# 取得特殊效果數據 #
#------------------#
special = []
special << phrase[:physical_attack] if item.physical_attack #物理攻撃
special << phrase[:damage_to_mp] if item.damage_to_mp #MPにダメージ
special << phrase[:absorb_damage] if item.absorb_damage #ダメージを吸収
special << phrase[:ignore_defense] if item.ignore_defense #防御力無視
#------------------------------------------------------------------------
# ● 確定背景圖片的高度
#------------------------------------------------------------------------
h += (description.size/3/@word)
h += 1 if (description.size/3%@word) >= 0
now_h = h
h += 2 unless scope[item.scope] == "无" #効果範囲
h += 1 unless item.price == 0 #價格
h += 1 if item.consumable #消耗品
h += 1 unless item.speed.zero? #速度補正値
h += 1 unless item.hp_recovery_rate==0 and item.hp_recovery==0 #HP 回復
h += 1 unless item.mp_recovery_rate==0 and item.mp_recovery==0 #MP 回復
h += 1 unless item.parameter_type.zero? #能力値
h += 1 unless item.base_damage.zero? #基本ダメージ
h += element_set.size + 1 if element_set.size > 0 #屬性
h += plus_state_set.size + 1 if plus_state_set.size > 0 #附加狀態
h += minus_state_set.size + 2 if minus_state_set.size > 0 #解除狀態
h += special.size + 1 if special.size > 0 #特殊效果
#------------------------------------------------------------------------
# ● 圖片顯示保證高度
#------------------------------------------------------------------------
#h = 6 + now_h if (h - now_h) < 6
#------------------------------------------------------------------------
# ● 換算高度
#------------------------------------------------------------------------
self.height = h * @size + @name_size + 36
#------------------------------------------------------------------------
# ● 生成背景
#------------------------------------------------------------------------
self.contents = Bitmap.new(self.width - 32, self.height - 32)
self.contents.clear
#------------------------------------------------------------------------
# ● 名字描繪
#------------------------------------------------------------------------
text = item.name
self.contents.font.color = normal_color#顔色腳本
self.contents.font.size = @name_size
if text.nil?
self.visible = false
else
self.visible = true
self.contents.draw_text(0,0, text.size*7, 20, text, 0)
end
#------------------------------------------------------------------------
# ● 說明描繪
#------------------------------------------------------------------------
x = 0
@y += 1
while ((text = description.slice!(/./m)) != nil)
self.contents.font.color = normal_color
self.contents.font.size = @size
self.contents.draw_text(x*@size, @y*@size+5, @size, @size, text, 0)
if words_judge(text) == true
x+=1
else
x+=0.5
end
if x == @word or x == @word - 0.5
x = 0
@y += 1
end
end
#------------------------------------------------------------------------
# ● 圖標描繪
#------------------------------------------------------------------------
#bitmap = Cache.system("Iconset")
#rect = Rect.new(item.icon_index % 16 * 24, equipment.icon_index / 16 * 24, 24, 24)
#self.contents.blt(0, y*size + 20, bitmap, rect, 255)
#------------------------------------------------------------------------
# ● 效果範圍
#------------------------------------------------------------------------
unless scope[item.scope] == "无"
text = phrase[:scope] +":"
draw_text(text, 1, move)
text = scope[item.scope]
draw_text(text, 1, move + @size)
end
#------------------------------------------------------------------------
# ● 價格
#------------------------------------------------------------------------
unless item.price == 0
text = phrase[:price] + ":" + item.price.to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 消耗品
#------------------------------------------------------------------------
if item.consumable
text = phrase[:consumable]
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 速度補正値
#------------------------------------------------------------------------
unless item.speed.zero?
text = phrase[:speed]
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● HP回復
#------------------------------------------------------------------------
unless item.hp_recovery_rate.zero? and item.hp_recovery.zero?
if item.hp_recovery_rate > 0 and item.hp_recovery > 0
text = " + "
else
text = ""
end
unless item.hp_recovery_rate.zero?
text = item.hp_recovery_rate.to_s + "%" + text
end
unless item.hp_recovery.zero?
text += item.hp_recovery.to_s
end
text = phrase[:recover] +":" + text + phrase[:hp]
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● SP回復
#------------------------------------------------------------------------
unless item.mp_recovery_rate.zero? and item.mp_recovery.zero?
if item.mp_recovery_rate > 0 and item.mp_recovery > 0
text = " + "
else
text = ""
end
unless item.mp_recovery_rate.zero?
text = item.mp_recovery_rate.to_s + "%" + text
end
unless item.mp_recovery.zero?
text += item.mp_recovery.to_s
end
text = phrase[:recover] +":" + text + phrase[:mp]
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 能力值增加
#------------------------------------------------------------------------
unless item.parameter_type.zero?
text = parameter_type[item.parameter_type]+" +"+item.parameter_points.to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 基本ダメージ
#------------------------------------------------------------------------
unless item.base_damage.zero?
#text = phrase[:base_damage] +":" + item.base_damage.to_s
text = item.base_damage > 0 ? phrase[:base_damage] +":" + item.base_damage.to_s: phrase[:recovery] +":" + (-item.base_damage).to_s
draw_text(text, 1, move)
end
#------------------------------------------------------------------------
# ● 屬性
#------------------------------------------------------------------------
if element_set.size > 0
text = phrase[:elements]+":"
draw_text(text, 1, move)
element_set.each do |i|
text = $data_system.elements
draw_text(text, 1, move + @size)
end
end
#------------------------------------------------------------------------
# ● 添加狀態
#------------------------------------------------------------------------
unless plus_state_set.empty?
text = phrase[:plus_states]+":"
draw_text(text, 1, move)
plus_state_set.each do |i|
text = $data_states.name
draw_text(text, 1, move + @size)
end
end
#------------------------------------------------------------------------
# ● 解除狀態
#------------------------------------------------------------------------
unless minus_state_set.empty?
text = phrase[:minus_states]+":"
draw_text(text, 1, move)
minus_state_set.each do |i|
text = $data_states.name
draw_text(text, 1, move + @size)
end
end
#------------------------------------------------------------------------
# ● 特殊效果
#------------------------------------------------------------------------
if special.size > 0
text = phrase[:special]+":"
draw_text(text, 1, move)
special.each {|text| draw_text(text, 1, move + @size)}
end
end
#////////////////////////////////////////////////////////////////////////////
#--------------------------------------------------------------------------
# ● 技能帮助窗口
#--------------------------------------------------------------------------
def set_skill_text(skill)
#----------------------------#
# 取得屬性、狀態、說明之副本 #
#----------------------------#
description = skill.description.clone
element_set = skill.element_set.clone
plus_state_set = skill.plus_state_set.clone
minus_state_set = skill.minus_state_set.clone
# 過濾不顯示的描述
element_set -= @unshow_elements
plus_state_set -= @unshow_states
minus_state_set -= @unshow_states
# 初始化設定
x ,h, move = 0, 0, 0
phrase = @phrase
scope = @scope
#------------------#
# 取得特殊效果數據 #
#------------------#
special = []
special << phrase[:physical_attack] if skill.physical_attack #物理攻撃
special << phrase[:damage_to_mp] if skill.damage_to_mp #MPにダメージ
special << phrase[:absorb_damage] if skill.absorb_damage #ダメージを吸収
special << phrase[:ignore_defense] if skill.ignore_defense #防御力無視
#------------------------------------------------------------------------
# ● 確定背景圖片的高度
#------------------------------------------------------------------------
h += (description.size/3/@word)
h += 1 if (description.size/3%@word) >= 0
now_h = h
h += 4 #効果範囲,消費MP,命中率
h += 1 unless skill.speed.zero? #速度補正値
h += 1 unless skill.base_damage.zero? #基本ダメージ
h += element_set.size + 1 if element_set.size > 0 #屬性
h += plus_state_set.size + 1 if plus_state_set.size > 0 #附加狀態
h += minus_state_set.size + 1 if minus_state_set.size > 0 #解除狀態
h += special.size + 1 if special.size > 0 #特殊效果
@special_size = nil
@first_line = nil
#------------------------------------------------------------------------
# ● 換算高度
#------------------------------------------------------------------------
self.height=(h + 1) * @size + @name_size + 36
self.contents = Bitmap.new(self.width - 32,self.height - 32)
self.contents.clear