if $game_party.actors[$kds_baby].kds_baby.size > 0
if $game_party.actors[$kds_baby].kds_canzhan != 0
@status_window = Window_EquipLeft.new($game_actors[$game_party.actors[$kds_baby].kds_canzhan])
else
@status_window = Window_EquipLeft.new($game_actors[$game_party.actors[$kds_baby].kds_baby[0]])
end
else
@status_window = Window_EquipLeft.new(0)
end
if $game_party.actors[$kds_baby].kds_baby.size > 0
if $game_party.actors[$kds_baby].kds_canzhan != 0
@head_window = Window_Head.new($game_actors[$game_party.actors[$kds_baby].kds_canzhan])
else
@head_window = Window_Head.new($game_actors[$game_party.actors[$kds_baby].kds_baby[0]])
end
else
@head_window = Window_Head.new(0)
end
if $game_party.actors[$kds_baby].kds_baby.size > 0
if $game_party.actors[$kds_baby].kds_canzhan != 0
@babys_window = Window_Baby.new($game_actors[$game_party.actors[$kds_baby].kds_canzhan])
else
@babys_window = Window_Baby.new($game_actors[$game_party.actors[$kds_baby].kds_baby[0]])
end
else
@babys_window = Window_Baby.new(0)
end
@babys_window.index = -1
@babys_window.update
@babys_window.active = false
@babys_window.help_window = @help_window
Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
# 装备过渡
Graphics.freeze
# 释放窗口
$stop = nil
@command_window.dispose
@command2_window.dispose
@help_window.dispose
@item_window.dispose
@head_window.dispose
@status_window.dispose
@skill_window.dispose
@babys_window.dispose
end
#--------------------------------------------------------------------------
# ● 刷新画面
#--------------------------------------------------------------------------
def update
@help_window.update
$baby_face += 1
if ($baby_face+12)%12 == 0 and $game_party.actors[$kds_baby].kds_baby.size > 0
@head_window.refresh
if $baby_face == 36
$baby_face = 0
end
end
if Input.trigger?(Input::B) and @command_window.active == true
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(7)
return
end
if @command2_window.active
@command2_window.update
up_command2
end
if @babys_window.active
@babys_window.update
up_babys
end
if @skill_window.active
@skill_window.update
up_skill
end
if @command_window.active
@command_window.update
up_command
end
if @item_window.active
@item_window.update
up_item
end
end
def up_command
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
Graphics.freeze
@babys_window.index = -1
@babys_window.active = false
@command_window.active = true
@help_window.set_text("")
Graphics.transition
return
end
if Input.trigger?(Input::C)
$command_index = @command_window.index
if @command_window.index != 5 and @command_window.index != 2
if $game_party.actors[$kds_baby].kds_baby.size == 0
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@command_window.active = false
@babys_window.index = 0
@babys_window.active = true
$baby_index = $game_actors[$game_party.actors[$kds_baby].kds_baby[0]]
@baby_index = 0
@babys_window.refresh
@head_window.refresh
@skill_window.refresh
@status_window.refresh2
elsif @command_window.index == 5
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Menu.new(7)
elsif @command_window.index == 2
if $game_party.actors[$kds_baby].kds_baby.size == 0
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
@item_window.update
@item_window.index = -1
@command_window.active = false
@babys_window.index = 0
@babys_window.active = true
$baby_index = $game_actors[$game_party.actors[$kds_baby].kds_baby[0]]
@baby_index = 0
@babys_window.refresh
@head_window.refresh
@skill_window.refresh
@status_window.refresh2
end
return
end
end
def up_babys
if @babys_window.index != @baby_index
@baby_index = @babys_window.index
$baby_index = $game_actors[$game_party.actors[$kds_baby].kds_baby[@babys_window.index]]
@babys_window.refresh
@head_window.refresh
@skill_window.refresh
@status_window.refresh2
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
Graphics.freeze
@babys_window.index = -1
@babys_window.active = false
@command_window.active = true
@help_window.set_text("")
Graphics.transition
return
end
if Input.trigger?(Input::C)
Graphics.freeze
$game_system.se_play($data_system.decision_se)
@chong = $game_actors[$game_party.actors[$kds_baby].kds_baby[@babys_window.index]]
@zhu = $game_party.actors[$kds_baby]
case @command_window.index
when 0
if $game_party.actors[$kds_baby].kds_canzhan == $game_party.actors[$kds_baby].kds_baby[@babys_window.index]
$game_party.actors[$kds_baby].kds_canzhan = 0
else
$game_party.actors[$kds_baby].kds_canzhan = $game_party.actors[$kds_baby].kds_baby[@babys_window.index]
end
@babys_window.refresh
when 1
@babys_window.active = false
@skill_window.index = 0
@skill_window.active = true
when 2
@babys_window.active = false
@item_window.index = 0
@item_window.active = true
when 3
@babys_window.active = false
@command2_window.index = 0
@command2_window.active = true
when 4
$game_variables[29] = $game_party.actors[$kds_baby].id
$game_party.remove_actor(@chong.id)
@baby_index = 0
if @babys_window.index > 0
@babys_window.index -= 1
end
if @zhu.kds_baby.size == 0
$stop = 0
@babys_window.index = -1
@babys_window.active = false
@command_window.active = true
@help_window.set_text("")
@command_window.disable_item(0)
@command_window.disable_item(1)
@command_window.disable_item(2)
@command_window.disable_item(3)
@command_window.disable_item(4)
@command_window.refresh
@command_window.update
end
@babys_window.refresh
@head_window.refresh
@skill_window.refresh
@status_window.refresh2
end
Graphics.transition
return
end
end
def up_skill
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
Graphics.freeze
@babys_window.active = true
@skill_window.index = -1
@skill_window.active = false
Graphics.transition
return
end
end
def up_item
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
Graphics.freeze
@babys_window.active = true
@item_window.index = -1
@item_window.active = false
Graphics.transition
return
end
if Input.trigger?(Input::C)
@item = @item_window.item
if @item == nil
$game_system.se_play($data_system.buzzer_se)
return
end
if @item.element_set.include?(11)
if @chong.skills.include?(@item.recover_hp) == false
@chong.learn_skill(@item.recover_hp)
else
$game_system.se_play($data_system.buzzer_se)
return
end
elsif @item.element_set.include?(12)
$game_system.se_play(@item.menu_se)
end
$game_system.se_play(@item.menu_se)
if @item.consumable
$game_party.lose_item(@item.id, 1)
end
@item_window.refresh
@skill_window.refresh
@status_window.refresh2
return
end
end
def up_command2
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
Graphics.freeze
@babys_window.active = true
@command2_window.index = -1
@command2_window.active = false
Graphics.transition
return
end
if Input.trigger?(Input::C)
if @chong.qianli <= 0
$game_system.se_play($data_system.buzzer_se)
return
end
$game_system.se_play($data_system.decision_se)
case @command2_window.index
when 0
@chong.maxhp += 12
@chong.hp += 12
when 1
@chong.maxsp += 5
@chong.int += 1
when 2
@chong.str += 1
when 3
@chong.dex += 1.5
when 4
@chong.agi += 1
end
@chong.qianli -= 1
@status_window.refresh2
end
end
end