#==============================================================================
# ■ Window_SquareBattleActorMessge
#------------------------------------------------------------------------------
# 显示角色信息的类,归到窗口类为了方便。
#==============================================================================
class Window_SquareBattleActorMessge < Window_Base
#--------------------------------------------------------------------------
# ● 初始化窗口
#--------------------------------------------------------------------------
def initialize
super(0, 480 - 32, 160, 32)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
refresh
end
#--------------------------------------------------------------------------
# ● 刷新
#--------------------------------------------------------------------------
def refresh
self.contents.clear
# 角色の绘制
if $game_party.actors.size != 0
@x1 = 16
@x2 = 176
@x3 = 332
@x4 = 496
@ay = 0
# 一号角色
if $game_party.actors.include?($game_actors[1])
draw_actor_head(1, @x1, @ay)
@a1hp = 1.000000 / $game_actors[1].maxhp * $game_actors[1].hp
@a1hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
@a1hpzao.x = @x1 + 64
@a1hpzao.y = @ay + 16
@a1hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
@a1hptiao.x = @a1xuetiao.x + 1
@a1hptiao.y = @a1xuetiao.y + 1
@a1hptiao.zoom_x = @a1hp
@a1sp = 1.000000 / $game_actors[1].maxsp * $game_actors[1].sp
@a1spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
@a1spzao.x = @x1 + 64
@a1spzao.y = @ay + 32
@a1sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
@a1sptiao.x = @a1xuetiao.x + 1
@a1sptiao.y = @a1xuetiao.y + 1
@a1sptiao.zoom_x = @a1sp
@a1mor = 1.000000 / 100 * $game_actors[1].mor
@a1morzao = Bitmap.new("Graphics/Pictures/mor槽")
@a1morzao.x = @x1 + 64
@a1morzao.y = @ay + 48
@a1mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
@a1mortiao.x = @a1xuetiao.x + 1
@a1mortiao.y = @a1xuetiao.y + 1
@a1mortiao.zoom_x = @a1mor
end
# 二号角色
if $game_party.actors.include?($game_actors[2])
if $game_party.actors.include?($game_actors[1])
draw_actor_head(2, @x2, @ay)
else
draw_actor_head(2, @x1, @ay)
end
@a2hp = 1.000000 / $game_actors[2].maxhp * $game_actors[2].hp
@a2hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
if $game_party.actors.include?($game_actors[1])
@a2hpzao.x = @x2 + 64
else
@a2hptiao.x = @x1 + 64
end
@a2hpzao.y = @ay + 16
@a2hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
@a2hptiao.x = @a1xuetiao.x + 1
@a2hptiao.y = @a1xuetiao.y + 1
@a2hptiao.zoom_x = @a1hp
@a2sp = 1.000000 / $game_actors[2].maxsp * $game_actors[2].sp
@a2spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
if $game_party.actors.include?($game_actors[1])
@a2spzao.x = @x2 + 64
else
@a2spzao.x = @x1 + 64
end
@a2spzao.y = @ay + 32
@a2sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
@a2sptiao.x = @a1xuetiao.x + 1
@a2sptiao.y = @a1xuetiao.y + 1
@a2sptiao.zoom_x = @a1sp
@a2mor = 1.000000 / 100 * $game_actors[2].mor
@a2morzao = Bitmap.new("Graphics/Pictures/mor槽")
if $game_party.actors.include?($game_actors[1])
@a2morzao.x = @x2 + 64
else
@a2morzao.x = @x1 + 64
end
@a2morzao.y = @ay + 48
@a2mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
@a2mortiao.x = @a1xuetiao.x + 1
@a2mortiao.y = @a1xuetiao.y + 1
@a2mortiao.zoom_x = @a1mor
end
# 三号角色
if $game_party.actors.include?($game_actors[3])
if $game_party.actors.include?($game_actors[1])
if $game_party.actors.include?($game_actors[2])
draw_actor_head(3, @x3, @ay)
else
draw_actor_head(3, @x2, @ay)
end
elsif $game_party.actors.include?($game_actors[2])
draw_actor_head(3, @x2, @ay)
else
draw_actor_head(3, @x1, @ay)
end
@a3hp = 1.000000 / $game_actors[3].maxhp * $game_actors[3].hp
@a3hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
@a3hpzao.y = @ay + 16
@a3hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
@a3hptiao.x = @a1xuetiao.x + 1
@a3hptiao.y = @a1xuetiao.y + 1
@a3hptiao.zoom_x = @a1hp
@a3sp = 1.000000 / $game_actors[3].maxsp * $game_actors[3].sp
@a3spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
@a3spzao.y = @ay + 32
@a3sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
@a3sptiao.x = @a1xuetiao.x + 1
@a3sptiao.y = @a1xuetiao.y + 1
@a3sptiao.zoom_x = @a1sp
@a3mor = 1.000000 / 100 * $game_actors[3].mor
@a3morzao = Bitmap.new("Graphics/Pictures/mor槽")
@a3morzao.y = @ay + 48
@a3mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
@a3mortiao.x = @a1xuetiao.x + 1
@a3mortiao.y = @a1xuetiao.y + 1
@a3mortiao.zoom_x = @a1mor
if $game_party.actors.include?($game_actors[1])
if $game_party.actors.include?($game_actors[2])
@a3hpzao.x = @x3 + 64
@a3spzao.x = @x3 + 64
@a3morzao.x = @x3 + 64
else
@a3hpzao.x = @x2 + 64
@a3spzao.x = @x2 + 64
@a3morzao.x = @x2 + 64
end
elsif $game_party.actors.include?($game_actors[2])
@a3hpzao.x = @x2 + 64
@a3spzao.x = @x2 + 64
@a3morzao.x = @x2 + 64
else
@a3hpzao.x = @x1 + 64
@a3spzao.x = @x1 + 64
@a3morzao.x = @x1 + 64
end
end
# 四号角色
if $game_party.actors.include?($game_actors[4])
if $game_party.actors.include?($game_actors[1])
if $game_party.actors.include?($game_actors[2])
if $game_party.actors.include?($game_actors[3])
draw_actor_head(4, @x4, @ay)
else
draw_actor_head(4, @x3, @ay)
end
elsif $game_party.actors.include?($game_actors[3])
draw_actor_head(4, @x3, @ay)
else
draw_actor_head(4, @x2, @ay)
end
elsif $game_party.actors.include?($game_actors[2])
if $game_party.actors.include?($game_actors[3])
draw_actor_head(4, @x3, @ay)
else
draw_actor_head(4, @x2, @ay)
end
elsif $game_party.actors.include?($game_actors[3])
draw_actor_head(4, @x2, @ay)
else
draw_actor_head(4, @x1, @ay)
end
@a4hp = 1.000000 / $game_actors[4].maxhp * $game_actors[4].hp
@a4hpzao = Bitmap.new("Graphics/Pictures/HP SP槽")
@a4hpzao.y = @ay + 16
@a4hptiao = Bitmap.new("Graphics/Pictures/HP槽(填充)")
@a4hptiao.x = @a1xuetiao.x + 1
@a4hptiao.y = @a1xuetiao.y + 1
@a4hptiao.zoom_x = @a1hp
@a4sp = 1.000000 / $game_actors[4].maxsp * $game_actors[4].sp
@a4spzao = Bitmap.new("Graphics/Pictures/HP SP槽")
@a4spzao.y = @ay + 32
@a4sptiao = Bitmap.new("Graphics/Pictures/SP槽(填充)")
@a4sptiao.x = @a1xuetiao.x + 1
@a4sptiao.y = @a1xuetiao.y + 1
@a4sptiao.zoom_x = @a1sp
@a4mor = 1.000000 / 100 * $game_actors[4].mor
@a4morzao = Bitmap.new("Graphics/Pictures/mor槽")
@a4morzao.y = @ay + 48
@a4mortiao = Bitmap.new("Graphics/Pictures/mor槽(填充)")
@a4mortiao.x = @a1xuetiao.x + 1
@a4mortiao.y = @a1xuetiao.y + 1
@a4mortiao.zoom_x = @a1mor
if $game_party.actors.include?($game_actors[1])
if $game_party.actors.include?($game_actors[2])
if $game_party.actors.include?($game_actors[3])
@a4hpzao.x = @x4 + 64
@a4spzao.x = @x4 + 64
@a4morzao.x = @x4 + 64
else
@a4hpzao.x = @x3 + 64
@a4spzao.x = @x3 + 64
@a4morzao.x = @x3 + 64
end
elsif $game_party.actors.include?($game_actors[3])
@a4hpzao.x = @x3 + 64
@a4spzao.x = @x3 + 64
@a4morzao.x = @x3 + 64
else
@a4hpzao.x = @x2 + 64
@a4spzao.x = @x2 + 64
@a4morzao.x = @x2 + 64
end
elsif $game_party.actors.include?($game_actors[2])
if $game_party.actors.include?($game_actors[3])
@a4hpzao.x = @x3 + 64
@a4spzao.x = @x3 + 64
@a4morzao.x = @x3 + 64
else
@a4hpzao.x = @x2 + 64
@a4spzao.x = @x2 + 64
@a4morzao.x = @x2 + 64
end
elsif $game_party.actors.include?($game_actors[3])
@a4hpzao.x = @x2 + 64
@a4spzao.x = @x2 + 64
@a4morzao.x = @x2 + 64
else
@a4hpzao.x = @x1 + 64
@a4spzao.x = @x1 + 64
@a4morzao.x = @x1 + 64
end
end
end
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
super
if @a1hptiao != 1.000000 / $game_actors[1].maxhp * $game_actors[1].hp or @a2hptiao != 1.000000 / $game_actors[2].maxhp * $game_actors[2].hp or @a3hptiao != 1.000000 / $game_actors[3].maxhp * $game_actors[3].hp or @a4hptiao != 1.000000 / $game_actors[4].maxhp * $game_actors[4].hp or @a1sptiao != 1.000000 / $game_actors[1].maxsp * $game_actors[1].sp or @a2sptiao != 1.000000 / $game_actors[2].maxsp * $game_actors[2].sp or @a3sptiao != 1.000000 / $game_actors[3].maxsp * $game_actors[3].sp or @a4sptiao != 1.000000 / $game_actors[4].maxsp * $game_actors[4].sp or @a1mortiao != 1.000000 / 100 * $game_actors[1].mor or @a2mortiao != 1.000000 / 100 * $game_actors[2].mor or @a3mortiao != 1.000000 / 100 * $game_actors[3].mor or @a4mortiao != 1.000000 / 100 * $game_actors[4].mor
refresh
end
end
end