class Window_BattleStatus
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 320, 640, 160)
self.opacity = 0
self.contents = Bitmap.new(width - 32, height - 32)
@level_up_flags = [false, false, false, false]
# Setup Empty Hash
@at_bar_sprites = {}
refresh
end
#--------------------------------------------------------------------------
# * Refresh
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = Color.new(255, 255, 255)
for i in 0...$game_party.actors.size
actor = $game_party.actors[i]
actor_y = i * 24 + 16
draw_actor_name(actor, 288, actor_y)
draw_actor_hp(actor, 344, actor_y)
draw_actor_sp(actor, 400, actor_y)
draw_actor_at(actor, 456, actor_y)
if @level_up_flags[i]
self.contents.font.color = normal_color
self.contents.draw_text(520, actor_y, 120, 32, "LEVEL UP")
end
end
end
#--------------------------------------------------------------------------
# * Draw Actor Hp - Ccoa
#--------------------------------------------------------------------------
def draw_actor_hp(actor, x, y)
self.contents.font.name = "Arial Rounded MT Bold"
self.contents.font.size = 20
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x, y, 48, 32, actor.hp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw "HP" text string - Petros
#--------------------------------------------------------------------------
def draw_actor_hp_text(actor, x, y)
self.contents.font.name = "Arial Rounded MT Bold"
self.contents.font.size = 12
self.contents.draw_text(x, y, 48, 32, $data_system.words.hp)
end
#--------------------------------------------------------------------------
# * Draw Actor Sp - Ccoa
#--------------------------------------------------------------------------
def draw_actor_sp(actor, x, y)
self.contents.font.name = "Arial Rounded MT Bold"
self.contents.font.size = 20
self.contents.font.color = actor.sp == 0 ? knockout_color :
actor.sp <= actor.maxsp / 4 ? crisis_color : normal_color
self.contents.draw_text(x, y, 48, 32, actor.sp.to_s, 2)
end
#--------------------------------------------------------------------------
# * Draw "SP" text string - Petros
#--------------------------------------------------------------------------
def draw_actor_sp_text(actor, x, y)
self.contents.font.name = "Arial Rounded MT Bold"
self.contents.font.size = 12
self.contents.draw_text(x, y, 48, 32, $data_system.words.sp)
end
#--------------------------------------------------------------------------
# * Draw Actor Name - Petros
#--------------------------------------------------------------------------
def draw_actor_name(actor, x, y)
self.contents.font.name = "Arial Rounded MT Bold"
self.contents.font.size = 18
self.contents.font.color = actor.hp == 0 ? knockout_color :
actor.hp <= actor.maxhp / 4 ? crisis_color : normal_color
self.contents.draw_text(x, y, 48, 32, actor.name.to_s, 2)
end
end