#------------------------------------------------------------------------
# ● 說明描述
#------------------------------------------------------------------------
x = 0
y += 1
text = description
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)
x+=1
if x==word#每行10个字
x = 0
y += 1
end
end
#------------------------------------------------------------------------
# ● 攻擊範圍
#------------------------------------------------------------------------
text = phrase["scope"] + scope[skill.scope]
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
#------------------------------------------------------------------------
# ● 空一行
#------------------------------------------------------------------------
y += 1
#------------------------------------------------------------------------
# ● 威力描述
#------------------------------------------------------------------------
unless skill.power.zero?
power = skill.power > 0 ? skill.power : -1 * skill.power
text = phrase["power"] + power.to_s
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
#------------------------------------------------------------------------
# ● 消費SP描述
#------------------------------------------------------------------------
text = phrase["cost_sp"] + skill.sp_cost.to_s
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
#------------------------------------------------------------------------
# ● 命中率描述
#------------------------------------------------------------------------
text = phrase["hit_rate"] + skill.hit.to_s + "%"
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
#------------------------------------------------------------------------
# ● 攻擊屬性
#------------------------------------------------------------------------
if element_set.size > 0
text=phrase["elements"]
for i in 0...element_set.size
if i < 4
text+=$data_system.elements[element_set[i]]
else
break
end
end
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
if element_set.size >= 5
text=""
for i in 4...element_set.size
text+=$data_system.elements[element_set[i]]
end
x= (phrase["elements"].size)*3
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
#------------------------------------------------------------------------
# ● 狀態附加
#------------------------------------------------------------------------
unless plus_state_set.empty?
text= phrase["plus"]
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
plus_state_set.each do |plus_state|
y += 1
text=$data_states[plus_state].name
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
end
#------------------------------------------------------------------------
# ●狀態解除
#------------------------------------------------------------------------
unless minus_state_set.empty?
text = phrase["minus"]
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size=size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
minus_state_set.each do |minus_state|
y += 1
text=$data_states[minus_state].name
self.contents.font.color = normal_color
self.contents.font.size=size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
end
end
#--------------------------------------------------------------------------
# ● 设置角色
# actor : 要显示状态的角色
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# ● 設置角色
# actor : 要顯示狀態之角色
#--------------------------------------------------------------------------
def set_actor(actor)
self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# ● 設置敵人
# enemy : 要顯示名字與狀態之敵人
#--------------------------------------------------------------------------
def set_enemy(enemy)
self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
text = enemy.name.sub(/\[Ff][([0-9]+)]/) {""}
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
self.visible = true
end
#--------------------------------------------------------------------------
# ● 校正帮助窗口位置
#--------------------------------------------------------------------------
def set_pos(x,y,width,oy,index,column_max)
#光标坐标
cursor_width = width / column_max - 32
xx = index % column_max * (cursor_width + 32)
yy = index / column_max * 32 - oy
self.x=xx+x+150
self.y=yy+y+30
if self.x+self.width>640
self.x=640-self.width
end
if self.y+self.height>480
self.y=480-self.height
end
end
#------------------------------------------------------------------------
# ● 裝備名字顔色變化 接口
#------------------------------------------------------------------------
def draw_name_color(equipment)
return normal_color
end
#------------------------------------------------------------------------
# ● 自身身份確認
#------------------------------------------------------------------------
def original_help?
return false
end
end
class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 128, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# 战斗中的情况下将窗口移至中央并将其半透明化
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(skill)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------
def update_help
@help_window.set_text(item)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(item)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(item)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------
#------------------------------------------------------------------------
# ● 說明描述
#------------------------------------------------------------------------
x = 0
y += 1
text = description
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)
x+=1
if x==word#每行10个字
x = 0
y += 1
end
end
#------------------------------------------------------------------------
# ● 攻擊範圍
#------------------------------------------------------------------------
text = phrase["scope"] + scope[skill.scope]
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
#------------------------------------------------------------------------
# ● 空一行
#------------------------------------------------------------------------
y += 1
#------------------------------------------------------------------------
# ● 威力描述
#------------------------------------------------------------------------
unless skill.power.zero?
power = skill.power > 0 ? skill.power : -1 * skill.power
text = phrase["power"] + power.to_s
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
#------------------------------------------------------------------------
# ● 消費SP描述
#------------------------------------------------------------------------
text = phrase["cost_sp"] + skill.sp_cost.to_s
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
#------------------------------------------------------------------------
# ● 命中率描述
#------------------------------------------------------------------------
text = phrase["hit_rate"] + skill.hit.to_s + "%"
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
#------------------------------------------------------------------------
# ● 攻擊屬性
#------------------------------------------------------------------------
if element_set.size > 0
text=phrase["elements"]
for i in 0...element_set.size
if i < 4
text+=$data_system.elements[element_set[i]]
else
break
end
end
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
if element_set.size >= 5
text=""
for i in 4...element_set.size
text+=$data_system.elements[element_set[i]]
end
x= (phrase["elements"].size)*3
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
#------------------------------------------------------------------------
# ● 狀態附加
#------------------------------------------------------------------------
unless plus_state_set.empty?
text= phrase["plus"]
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
plus_state_set.each do |plus_state|
y += 1
text=$data_states[plus_state].name
self.contents.font.color = normal_color
self.contents.font.size = size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
end
#------------------------------------------------------------------------
# ●狀態解除
#------------------------------------------------------------------------
unless minus_state_set.empty?
text = phrase["minus"]
x = 0
y += 1
self.contents.font.color = normal_color
self.contents.font.size=size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
minus_state_set.each do |minus_state|
y += 1
text=$data_states[minus_state].name
self.contents.font.color = normal_color
self.contents.font.size=size
self.contents.draw_text(x, y*size+5, text.size*6, size, text, 0)
end
end
end
#--------------------------------------------------------------------------
# ● 设置角色
# actor : 要显示状态的角色
#--------------------------------------------------------------------------
def set_actor(actor)
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# ● 設置角色
# actor : 要顯示狀態之角色
#--------------------------------------------------------------------------
def set_actor(actor)
self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
if actor != @actor
self.contents.clear
draw_actor_name(actor, 4, 0)
draw_actor_state(actor, 140, 0)
draw_actor_hp(actor, 284, 0)
draw_actor_sp(actor, 460, 0)
@actor = actor
@text = nil
self.visible = true
end
end
#--------------------------------------------------------------------------
# ● 設置敵人
# enemy : 要顯示名字與狀態之敵人
#--------------------------------------------------------------------------
def set_enemy(enemy)
self.contents = Bitmap.new(width - 32, height - 32) if self.contents.nil?
text = enemy.name.sub(/\\[Ff]\[([0-9]+)\]/) {""}
state_text = make_battler_state_text(enemy, 112, false)
if state_text != ""
text += " " + state_text
end
set_text(text, 1)
self.visible = true
end
#--------------------------------------------------------------------------
# ● 校正帮助窗口位置
#--------------------------------------------------------------------------
def set_pos(x,y,width,oy,index,column_max)
#光标坐标
cursor_width = width / column_max - 32
xx = index % column_max * (cursor_width + 32)
yy = index / column_max * 32 - oy
self.x=xx+x+150
self.y=yy+y+30
if self.x+self.width>640
self.x=640-self.width
end
if self.y+self.height>480
self.y=480-self.height
end
end
#------------------------------------------------------------------------
# ● 裝備名字顔色變化 接口
#------------------------------------------------------------------------
def draw_name_color(equipment)
return normal_color
end
#------------------------------------------------------------------------
# ● 自身身份確認
#------------------------------------------------------------------------
def original_help?
return false
end
end
class Window_Skill < Window_Selectable
#--------------------------------------------------------------------------
# ● 初始化对像
# actor : 角色
#--------------------------------------------------------------------------
def initialize(actor)
super(0, 128, 640, 352)
@actor = actor
@column_max = 2
refresh
self.index = 0
# 战斗中的情况下将窗口移至中央并将其半透明化
if $game_temp.in_battle
self.y = 64
self.height = 256
self.back_opacity = 160
end
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(skill)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------
def update_help
@help_window.set_text(item)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(item)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------
refresh
self.index = 0
end
#--------------------------------------------------------------------------
# ● 刷新帮助文本
#--------------------------------------------------------------------------
def update_help
@help_window.set_text(item)
#校正帮助窗口位置
@help_window.set_pos(self.x,self.y,self.width,self.oy,self.index,@column_max)
end
end
#------------------------------------------------------------------------------