class Window_ActorStatus < Window_Base
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
def initialize(id, x)
@actor_num = id
super(x, 320, 160, 160)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = 0
self.back_opacity = 0
actor = $game_party.actors[@actor_num]
@actor_nm = actor.name
@actor_mhp = actor.maxhp
@actor_msp = actor.maxsp
@actor_hp = actor.hp
@actor_sp = actor.sp
@actor_cp = actor.hp_store #修改的这里
@actor_st = make_battler_state_text(actor, 120, true)
@status_window = []
for i in 0...5
@status_window.push(Window_DetailsStatus.new(actor, i, x))
end
refresh(false)
end
#--------------------------------------------------------------------------
# ● 解放
#--------------------------------------------------------------------------
def dispose
for i in 0...5
@status_window[i].dispose
end
super
end
#--------------------------------------------------------------------------
# ● リフレッシュ
#--------------------------------------------------------------------------
def refresh(level_up_flags)
self.contents.clear
actor = $game_party.actors[@actor_num]
@status_window[0].refresh(actor) if @actor_nm != actor.name
@status_window[1].refresh(actor) if
@actor_mhp != actor.maxhp or @actor_hp != actor.hp
@status_window[2].refresh(actor) if
@actor_msp != actor.maxsp or @actor_sp != actor.sp
@status_window[2].refresh(actor) if
@actor_cp != actor.hp_store #修改的这里
@status_window[3].refresh(actor, level_up_flags) if
@actor_st != make_battler_state_text(actor, 120, true) or level_up_flags
@actor_nm = actor.name
@actor_mhp = actor.maxhp
@actor_msp = actor.maxsp
@actor_hp = actor.hp
@actor_sp = actor.sp
@actor_cp = actor.hp_store #修改的这里
@actor_st = make_battler_state_text(actor, 120, true)
end
#--------------------------------------------------------------------------
# ● ATゲージリフレッシュ
#--------------------------------------------------------------------------
def at_refresh
@status_window[4].refresh($game_party.actors[@actor_num])
end
#--------------------------------------------------------------------------
# ● フレーム更新
#--------------------------------------------------------------------------
def update
for window in @status_window
window.update
end
end
end