if @end_window != nil and !@end_window.disposed?
update_end
#=============================================================
elsif @bgm_se_window_update
update_bgm_se
#=============================================================
elsif @bgm_window != nil and !@bgm_window.disposed? and @currentbgm_window != nil and !@currentbgm_window.disposed?
update_bgm
elsif @sfx_window != nil and !@sfx_window.disposed? and @currentsfx_window != nil and !@currentsfx_window.disposed?
update_sfx
elsif !@system_window.disposed?
update_system
end
return
end
end
def update_command
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# @back_item.visible = false
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 切换的地图画面
$scene = Scene_Map.new
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 同伴人数为 0、存档、游戏结束以外的场合
if $game_party.actors.size == 0 and @command_window.index < 4
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 命令窗口的光标位置分支
case @command_window.index
when 1 # 物品
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
@back_item.visible = true
loop do
if @back_item.zoom_x < 1
@back_item.zoom_x += 0.07
end
if @back_item.zoom_y < 1
@back_item.zoom_y += 0.07
end
delay(0.1)
if @back_item.zoom_x >= 1
break
end
end
# 生成帮助窗口、物品窗口
@item_help_window = Window_Help_New.new
@item_help_window.x = 180
@item_help_window.y = 320
@item_help_window.visible = true
@item_help_window.height = 100
@item_window = Window_Item_New.new
@item_window.z = 2
@item_window.y = 32+3
@item_window.visible = true
@item_window.height = 320
@item_window.windowskin = RPG::Cache.windowskin("../system/menu/windowskins/palskin")
@item_window.back_opacity = 0
#........................................................................
@item_icon_window = Window_Equip1.new
@item_icon_window.visible = true
@arrow_status.visible = true
when 2 # 装备
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 激活状态窗口
@command_window.active = false
@status_window1.active = true
@status_window1.index = 0
@arrow_status.visible = false
when 4 # 任务
###################################
# 刷新窗口
@task_names_window.update
@task_info_window.update
####################################
#@stagg = -1
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 激活合成窗口
@command_window.active = false
# @command_window.active = true
@back_rw.visible = true
loop do
if @back_rw.x > 0
@back_rw.x -= 23
end
if @back_rw.y > 0
@back_rw.y -= 17
end
if @back_rw.zoom_x < 1
@back_rw.zoom_x += 0.07
end
if @back_rw.zoom_y < 1
@back_rw.zoom_y += 0.07
end
delay(0.1)
if @back_rw.zoom_y >= 1
break
end
end
@task_names_window.visible = true
@task_info_window.visible = true
# @task_names_window.active = true
@rw_update = true
when 0 # 状态
@stagg = -1
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 激活状态窗口
@command_window.active = false
@status_window.active = true
@status_window.index = 0
@arrow_status.visible = false
when 5 # 存档
@status_update = false
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
@system_window = Window_SysCommand.new
@system_window.x = 700
@system_window.z =4 #999999
@command_window.active = false
@sys_update = true
@back_xt.visible = true
loop do
if @system_window.x > 550
@system_window.x -= 15
end
if @back_xt.x > 565
@back_xt.x -= 15
end
delay(0.1)
if @system_window.x <= 550
break
end
end
end
return
end
end
#==============================================================================
# def loadcraft
# $scene = Scene_Task.new
# end
#--------------------------------------------------------------------------
# ● 刷新任务名称窗口
#--------------------------------------------------------------------------
def update_task_names_window
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
@task_names_window.visible = false
@task_info_window.visible = false
@task_names_window.active = false
@rw_update = false
# 这里设置返回的场景,返回地图是Scene_Map.new,菜单是Scene_Menu.new(任务界面index)
$scene = Scene_Menu.new(4)
loop do
if @back_rw.x < 322
@back_rw.x += 23
end
if @back_rw.y < 238
@back_rw.y += 17
end
if @back_rw.zoom_x > 0.02
@back_rw.zoom_x -= 0.07
end
if @back_rw.zoom_y > 0.02
@back_rw.zoom_y -= 0.07
end
delay(0.1)
if @back_rw.zoom_y <= 0.02
break
end
end
@command_window.active = true
@back_rw.visible = false
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
@back_rw.visible = true
@task_names_window.visible = true
@task_info_window.visible = true
# 无任务可显示的话
if @task_names_window.task == nil
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 如果光标没有移动的话,翻页
if $game_party.latest_task == @task_names_window.task.id
if @task_info_window.oy + @task_info_window.height - 32 > @task_info_window.contents.height
@task_info_window.oy = 0
else
@task_info_window.oy += 480-32
end
if @task_info_window.contents.height > @task_info_window.height - 32
# 演奏翻页 SE
Audio.se_play(CHANGE_PAGE_SE)
end
else
@task_info_window.refresh(@task_names_window.task.id)
$game_party.latest_task = @task_names_window.task.id
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
end
end
end
#==============================================================================
#--------------------------------------------------------------------------
def delay(seconds)
for i in 0...(seconds * 1)
sleep 0.01
Graphics.update
end
end
#------------------------------------------------------------------------------
def update_status
loop do
if @status_window.x < -16
@status_window.x += 48
@arrow_status.visible = false
end
delay(0.1)
if @status_window.x >= -16
break
end
end
case @status_window.index
when 0
@arrow_status.x = 28
@arrow_status.y = 47
when 1
@arrow_status.x = 28+124
@arrow_status.y = 47
when 2
@arrow_status.x = 28+124+124
@arrow_status.y = 47
when 3
@arrow_status.x = 28+124+124+124
@arrow_status.y = 47
end
@arrow_status.visible = true
# 按下 B 键的情况下
if Input.trigger?(Input::B)
@arrow_status.visible = false
loop do
if @status_window.x > -524
@status_window.x -= 48
end
delay(0.1)
if @status_window.x <= -524
break
end
end
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 激活命令窗口
@command_window.active = true
@status_window.active = false
@status_window.index = -2
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 命令窗口的光标位置分支
case @command_window.index
when 3 # 仙术
# 本角色的行动限制在 2 以上的情况下
if $game_party.actors[@status_window.index].restriction >=4 #2
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
@arrow_status.visible = false
@back_skill.visible = true
loop do
if @status_window.x > -524
@status_window.x -= 48
end
delay(0.1)
if @status_window.x <= -524
break
end
end
loop do
if @back_skill.x > 0
@back_skill.x -= 46
end
if @back_skill.zoom_x < 1
@back_skill.zoom_x += 0.07
end
if @back_skill.zoom_y < 1
@back_skill.zoom_y += 0.07
end
delay(0.1)
if @back_skill.zoom_x >= 1
break
end
end
if @back_skill.x >= 0 #@status_window.x <= -524
@window_index = @status_window.index
@actor = $game_party.actors[@status_window.index]
# 生成帮助窗口、状态窗口、特技窗口
@skill_help_window = Window_Help_New_Skill.new
@skill_window = Window_Skill_New.new(@actor)
@skill_window.z = 1011
#........................................................................
@skill_window_icon = Window_Skill_Icon.new
@skill_window_icon.z=1012
#........................................................................
# 关联帮助窗口
@skill_window.help_window = @skill_help_window
@status_window.active = false
@skill_update = true
end
when 0 # 状态
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 切换到状态画面
# 获取角色
@actor = $game_party.actors[@status_window.index]
# 生成状态窗口
@status_status_window = Window_Status_New.new(@actor)
@status_window.active = false
@status_update = true
@arrow_status.visible = false
end
return
end
end
#--------------------------------------------------------------------------
# ● 物品刷新
#--------------------------------------------------------------------------
def update_item
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 切换到菜单画面
@item_help_window.dispose
@item_window.dispose
#........................................................................
@item_icon_window.dispose
#........................................................................
@item_update = false
@command_window.active = true
loop do
if @back_item.zoom_x > 0.02
@back_item.zoom_x -= 0.07
end
if @back_item.zoom_y > 0.02
@back_item.zoom_y -= 0.07
end
delay(0.1)
if @back_item.zoom_x <= 0.02
break
end
end
@back_item.visible = false
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# @back_item.visible = false
# 获取物品窗口当前选中的物品数据
@item = @item_window.item
# 不使用物品的情况下
unless @item.is_a?(RPG::Item)
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 不能使用的情况下
unless $game_party.item_can_use?(@item.id)
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
@back_item.visible = false
@item_help_window.visible = false
@item_icon_window.visible = false
# @status_window.z = 10
###############################################################
@status_window.visible = true
###############################################################
@item_window.visible = false
# 效果范围是我方的情况下
if @item.scope >= 3
# 激活目标窗口
@item_window.active = false
#@item_window.active = true
####################################
@status_window.active = true
####################################
# 设置效果范围 (单体/全体) 的对应光标位置
if @item.scope == 4 || @item.scope == 6
@status_window.index = -1
else
@status_window.index = 0
end
# 效果在我方以外的情况下
else
# 公共事件 ID 有效的情况下
if @item.common_event_id > 0
# 预约调用公共事件
$game_temp.common_event_id = @item.common_event_id
# 演奏物品使用时的 SE
$game_system.se_play(@item.menu_se)
# 消耗品的情况下
if @item.consumable
# 使用的物品数减 1
$game_party.lose_item(@item.id, 1)
# 再描绘物品窗口的项目
@item_window.draw_item(@item_window.index)
end
@item_help_window.dispose
@item_window.dispose
#........................................................................
@equip_window.dispose
#........................................................................
############################
@status_window.dispose
############################
# 切换到地图画面
$scene = Scene_Map.new
return
end
end
return
end
end
def update_item_target
loop do
if @status_window.x < -16
@status_window.x += 48
@arrow_status.visible = false
end
delay(0.1)
if @status_window.x >= -16
break
end
end
case @status_window.index
when 0
@arrow_status.x = 28
@arrow_status.y = 47
when 1
@arrow_status.x = 28+124
@arrow_status.y = 47
when 2
@arrow_status.x = 28+124+124
@arrow_status.y = 47
when 3
@arrow_status.x = 28+124+124+124
@arrow_status.y = 47
end
@arrow_status.visible = true
# 按下 B 键的情况下
if Input.trigger?(Input::B)
loop do
if @status_window.x > -524
@status_window.x -= 48
@arrow_status.visible = false
end
delay(0.1)
if @status_window.x <= -524
break
end
end
@back_item.visible = true
@item_window.visible = true
@item_help_window.visible = true
@item_icon_window.visible = true
#@status_window.z = 2
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 由于物品用完而不能使用的场合
unless $game_party.item_can_use?(@item.id)
# 再次生成物品窗口的内容
@item_window.refresh
end
# 删除目标窗口
@item_window.active = true
#####################################
@status_window.index = -2
@status_window.active = false
#####################################
@arrow_status.visible = false
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
@arrow_status.visible = true
# 如果物品用完的情况下
if $game_party.item_number(@item.id) == 0
# 演奏冻结 SE
@back_item.visible = false
@item_help_window.visible = false
@item_icon_window.visible = false
$game_system.se_play($data_system.buzzer_se)
return
end
# 目标是全体的情况下
if @status_window.index == -1
@back_item.visible = false
@item_help_window.visible = false
@item_icon_window.visible = false
# 对同伴全体应用物品使用效果
used = false
for i in $game_party.actors
used |= i.item_effect(@item)
end
end
# 目标是单体的情况下
if @status_window.index >= 0
# 对目标角色应用物品的使用效果
@back_item.visible = false
@item_help_window.visible = false
@item_icon_window.visible = false
target = $game_party.actors[@status_window.index]
used = target.item_effect(@item)
end
# 使用物品的情况下
if used
# 演奏物品使用时的 SE
$game_system.se_play(@item.menu_se)
# 消耗品的情况下
if @item.consumable
# 使用的物品数减 1
$game_party.lose_item(@item.id, 1)
# 再描绘物品窗口的项目
@item_window.draw_item(@item_window.index)
end
# 再生成目标窗口的内容
@back_item.visible = false
@item_help_window.visible = false
@item_icon_window.visible = false
@status_window.refresh
# 全灭的情况下
if $game_party.all_dead?
# 切换到游戏结束画面
$scene = Scene_Gameover.new
return
end
# 公共事件 ID 有效的情况下
if @item.common_event_id > 0
# 预约调用公共事件
$game_temp.common_event_id = @item.common_event_id
@item_help_window.dispose
@item_window.dispose
# 切换到地图画面
$scene = Scene_Map.new
return
end
end
# 无法使用物品的情况下
unless used
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#--------------------------------------------------------------------------
# ● 仙术刷新
#--------------------------------------------------------------------------
def update_skill
############------------------使用仙术的情况---------------###############
case @status_window.index
when 0
@arrow_status.x = 28
@arrow_status.y = 47
when 1
@arrow_status.x = 28+124
@arrow_status.y = 47
when 2
@arrow_status.x = 28+124+124
@arrow_status.y = 47
when 3
@arrow_status.x = 28+124+124+124
@arrow_status.y = 47
end
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
@skill_window_icon.dispose
@skill_help_window.dispose
@skill_window.dispose
loop do
if @back_skill.x < 644
@back_skill.x += 46
end
if @back_skill.zoom_x > 0.02
@back_skill.zoom_x -= 0.07
end
if @back_skill.zoom_y > 0.02
@back_skill.zoom_y -= 0.07
end
delay(0.1)
if @back_skill.x >= 644
@back_skill.visible = false
break
end
end
##########------显示人物选择-------#######################
@arrow_status.visible = true
# 切换到菜单画面
@skill_update = false
@status_window.active = true
@status_window.index = @window_index
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
@arrow_status.visible = false
# 获取特技窗口现在选择的特技的数据
@skill = @skill_window.skill
# 不能使用的情况下
if @skill == nil or not @actor.skill_can_use?(@skill.id)
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
#----------法术背景消失----------------
@back_skill.visible = false
#----------法术图标消失----------------
@skill_window_icon.visible = false
#----------法术说明消失----------------
@skill_help_window.visible = false
#----------法术消失!!----------------
@skill_window.visible = false
loop do
if @status_window.x < -16
@status_window.x += 48
@arrow_status.visible = false
end
delay(0.1)
if @status_window.x >= -16
break
end
end
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 效果范围是我方的情况下
if @skill.scope >= 3
# 激活目标窗口
@arrow_status.visible = true
@skill_window.active = false
@status_window.active = true
# 设置效果范围 (单体/全体) 的对应光标位置
if @skill.scope == 4 || @skill.scope == 6
@status_window.index = -1
elsif @skill.scope == 7
@status_window.index = @actor_index - 10
else
@status_window.index = 0
end
# 效果在我方以外的情况下
else
# 公共事件 ID 有效的情况下
if @skill.common_event_id > 0
# 预约调用公共事件
$game_temp.common_event_id = @skill.common_event_id
# 演奏特技使用时的 SE
$game_system.se_play(@skill.menu_se)
# 消耗 SP
@actor.sp -= @skill.sp_cost
# 再生成各窗口的内容
@skill_window.refresh
@status_window.refresh
@skill_help_window.dispose
@skill_window.dispose
@skill_window_icon.dispose
@back_skill.dispose
# 切换到地图画面
$scene = Scene_Map.new
return
end
end
return
end
end
def update_skill_target
case @status_window.index
when 0
@arrow_status.x = 28
@arrow_status.y = 47
when 1
@arrow_status.x = 28+124
@arrow_status.y = 47
when 2
@arrow_status.x = 28+124+124
@arrow_status.y = 47
when 3
@arrow_status.x = 28+124+124+124
@arrow_status.y = 47
end
# 按下 B 键的情况下
if Input.trigger?(Input::B)
@arrow_status.visible = false
loop do
if @status_window.x > -524
@status_window.x -= 48
end
delay(0.1)
if @status_window.x <= -524
break
end
end
#----------法术背景出现----------------
@back_skill.visible = true
#----------法术图标出现----------------
@skill_window_icon.visible = true
#----------法术说明出现----------------
@skill_help_window。visible = true
#----------法术出现!!----------------
@skill_window.visible = true
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 删除目标窗口
@skill_window.active = true
@status_window.index = -2
@status_window.active = false
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 因为 SP 不足而无法使用的情况下
unless @actor.skill_can_use?(@skill.id)
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 目标是全体的情况下
if @status_window.index == -1
# 对同伴全体应用特技使用效果
used = false
for i in $game_party.actors
used |= i.skill_effect(@actor, @skill)
end
end
# 目标是使用者的情况下
if @status_window.index <= -2
# 对目标角色应用特技的使用效果
target = $game_party.actors[@status_window.index + 10]
used = target.skill_effect(@actor, @skill)
end
# 目标是单体的情况下
if @status_window.index >= 0
# 对目标角色应用特技的使用效果
target = $game_party.actors[@status_window.index]
used = target.skill_effect(@actor, @skill)
end
# 使用特技的情况下
if used
# 演奏特技使用时的 SE
$game_system.se_play(@skill.menu_se)
#-----修正------------------------------------------------------
@actor.skill_sp_cost[@skill.id] = @skill.sp_cost if @actor.skill_sp_cost[@skill.id] == nil
# SP 消費
@actor.sp -= @actor.skill_sp_cost[@skill.id]
#---------------------------------------------------------------
# 再生成各窗口内容
@status_window.refresh
@skill_window.refresh
# 全灭的情况下
if $game_party.all_dead?
# 切换到游戏结束画面
$scene = Scene_Gameover.new
return
end
# 公共事件 ID 有效的情况下
if @skill.common_event_id > 0
# 预约调用公共事件
$game_temp.common_event_id = @skill.common_event_id
@skill_help_window.dispose
@skill_window.dispose
@back_skill.dispose
# 释放窗口
@item_window.dispose
# @back_item.dispose
@status_window.dispose
# 切换到地图画面
$scene = Scene_Map.new
return
end
end
# 无法使用特技的情况下
unless used
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
end
return
end
end
#--------------------------------------------------------------------------
# ● 装备刷新
#--------------------------------------------------------------------------
def update_right
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
@arrow_status.visible = false
#######################################
@equip_heads.dispose
@equip_left_window.visible = false
#######################################
# 切换到菜单画面
@equip_help_window.dispose
@equip_right_window.dispose
@equip_item_window1.dispose
@equip_item_window2.dispose
@equip_item_window3.dispose
@equip_item_window4.dispose
@equip_item_window5.dispose
@equip_item_window6.dispose
@equip_item_window7.dispose
@equip_item_window8.dispose
#........................................................................
@equip_window.dispose
#........................................................................
@equip_update = false
loop do
if @back_equip.x < 322
@back_equip.x += 23
end
if @back_equip.zoom_x > 0.02
@back_equip.zoom_x -= 0.07
end
if @back_equip.zoom_y > 0.02
@back_equip.zoom_y -= 0.07
end
delay(0.1)
if @back_equip.zoom_x <= 0.02
break
end
end
@back_equip.visible = false
@status_window1.active = true
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 固定装备的情况下
if @actor.equip_fix?(@equip_right_window.index)
# 演奏冻结 SE
$game_system.se_play($data_system.buzzer_se)
return
end
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
# 激活物品窗口
@equip_right_window.active = false
@equip_item_window.active = true
@equip_window.set_item_id
@equip_item_window.index = 0
return
end
end
def update_equip_item
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 激活右侧窗口
@equip_right_window.active = true
@equip_item_window.active = false
@equip_item_window.index = -1
@equip_window.set_item_id
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 演奏装备 SE
$game_system.se_play($data_system.equip_se)
# 获取物品窗口现在选择的装备数据
item = @equip_item_window.item
# 变更装备
@actor.equip(@equip_right_window.index, item == nil ? 0 : item.id)
# 激活右侧窗口
@equip_right_window.active = true
@equip_item_window.active = false
@equip_item_window.index = -1
@equip_window.set_item_id
# 再生成右侧窗口、物品窗口的内容
@equip_right_window.refresh
if @equip_right_window.index == 6 or @equip_right_window.index == 7
@equip_item_window7.refresh
@equip_item_window8.refresh
else
@equip_item_window.refresh
end
return
end
end
def update_status1
loop do
if @status_window1.x < -16
@status_window1.x += 48
@arrow_status.visible = false
end
delay(0.1)
if @status_window1.x >= -16
break
end
end
case @status_window1.index
when 0
@arrow_status.x = 28
@arrow_status.y = 47
when 1
@arrow_status.x = 28+124
@arrow_status.y = 47
when 2
@arrow_status.x = 28+124+124
@arrow_status.y = 47
when 3
@arrow_status.x = 28+124+124+124
@arrow_status.y = 47
end
@arrow_status.visible = true
# 按下 B 键的情况下
if Input.trigger?(Input::B)
loop do
if @status_window1.x > -524
@status_window1.x -= 48
@arrow_status.visible = false
end
delay(0.1)
if @status_window1.x <= -524
break
end
end
@arrow_status.visible = false
@back_equip.visible = false
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 激活命令窗口
@command_window.active = true
@status_window1.active = false
@status_window1.index = -1
return
end
# 进入装备界面选择人物时 按下 C 键的情况下
if Input.trigger?(Input::C)
loop do
if @status_window1.x > -524
@status_window1.x -= 48
@arrow_status.visible = false
end
delay(0.1)
if @status_window1.x <= -524
break
end
end
@back_equip.visible = true
loop do
if @back_equip.x > 0
@back_equip.x -= 23
end
if @back_equip.zoom_x < 1
@back_equip.zoom_x += 0.07
end
if @back_equip.zoom_y < 1
@back_equip.zoom_y += 0.07
end
delay(0.1)
if @back_equip.zoom_y >= 1
break
end
end
@arrow_status.visible = false
@equip_left_window.visible = true
##########################################################
@actor = $game_party.actors[@status_window1.index]
@equip_heads = Window_Equip_heads.new(@actor)
@equip_heads.z=1002
@equip_heads.x=25
@equip_heads.y=-50
###########################################################
# 命令窗口的光标位置分支
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
@equip_index = 0
@actor = $game_party.actors[@status_window1.index]
@equip_help_window = Window_HelpEquip.new
#@equip_help_window.x = 137
#@equip_help_window.y = 480 - 64 - 32 - 8
@equip_help_window.z=10001
@equip_right_window = Window_EquipRight_New.new(@actor)
@equip_right_window.z=10001
@equip_item_window1 = Window_EquipItem_New.new(@actor, 0)
@equip_item_window1.z=10001
@equip_item_window2 = Window_EquipItem_New.new(@actor, 1)
@equip_item_window2.z=10001
@equip_item_window3 = Window_EquipItem_New.new(@actor, 2)
@equip_item_window3.z=10001
@equip_item_window4 = Window_EquipItem_New.new(@actor, 3)
@equip_item_window4.z=10001
@equip_item_window5 = Window_EquipItem_New.new(@actor, 4)
@equip_item_window5.z=10001
@equip_item_window6 = Window_EquipItem_New.new(@actor, 5)
@equip_item_window6.z=10001
@equip_item_window7 = Window_EquipItem_New.new(@actor, 6)
@equip_item_window7.z=10001
@equip_item_window8 = Window_EquipItem_New.new(@actor, 6)
@equip_item_window8.z=10001
#........................................................................
@equip_window = Window_Equip.new
#@equip_window.y = 394
@equip_window.z=10001
@equip_window.set_item_id
#........................................................................
# 关联帮助窗口
@equip_right_window.help_window = @equip_help_window
@equip_item_window1.help_window = @equip_help_window
@equip_item_window2.help_window = @equip_help_window
@equip_item_window3.help_window = @equip_help_window
@equip_item_window4.help_window = @equip_help_window
@equip_item_window5.help_window = @equip_help_window
@equip_item_window6.help_window = @equip_help_window
@equip_item_window7.help_window = @equip_help_window
@equip_item_window8.help_window = @equip_help_window
# 设置光标位置
@equip_right_window.index = @equip_index
@status_window1.active = false
@equip_update = true
# 设置物品窗口的可视状态
@equip_item_window1.visible = (@equip_right_window.index == 0)
@equip_item_window2.visible = (@equip_right_window.index == 1)
@equip_item_window3.visible = (@equip_right_window.index == 2)
@equip_item_window4.visible = (@equip_right_window.index == 3)
@equip_item_window5.visible = (@equip_right_window.index == 4)
@equip_item_window6.visible = (@equip_right_window.index == 5)
@equip_item_window7.visible = (@equip_right_window.index == 6)
@equip_item_window8.visible = (@equip_right_window.index == 7)
# 获取当前装备中的物品
item1 = @equip_right_window.item
# 设置当前的物品窗口到 @item_window
@equip_window.set_item_id
case @equip_right_window.index
when 0
@equip_item_window = @equip_item_window1
when 1
@equip_item_window = @equip_item_window2
when 2
@equip_item_window = @equip_item_window3
when 3
@equip_item_window = @equip_item_window4
when 4
@equip_item_window = @equip_item_window5
when 5
@equip_item_window = @equip_item_window6
when 6
@equip_item_window = @equip_item_window7
when 7
@equip_item_window = @equip_item_window8
end
# 右窗口被激活的情况下
if @equip_right_window.active
########################################################################
########################################################################
# 删除变更装备后的能力
#@status_window1.set_new_parameters(nil, nil, nil)
@equip_left_window.set_new_parameters(nil, nil, nil, nil, nil, nil, nil, nil)
end
# 物品窗口被激活的情况下
if @equip_item_window.active
# 获取现在选中的物品
item2 = @equip_item_window.item
# 变更装备
last_hp = @actor.hp
last_sp = @actor.sp
@actor.equip(@equip_right_window.index, item2 == nil ? 0 : item2.id)
# 获取变更装备后的能力值
new_atk = @actor.atk
new_pdef = @actor.pdef
new_mdef = @actor.mdef
######################################################################
new_eva = @actor.eva
new_str = @actor.str
new_dex = @actor.dex
new_agi = @actor.agi
new_int = @actor.int
######################################################################
# 返回到装备
@actor.equip(@equip_right_window.index, item1 == nil ? 0 : item1.id)
@actor.hp = last_hp
@actor.sp = last_sp
# 描画左窗口
###############################################################################
###############################################################################
#@status_window1.set_new_parameters(new_atk, new_pdef, new_mdef)
@equip_left_window.set_new_parameters(new_atk, new_pdef, new_mdef, new_eva, new_str, new_dex, new_agi, new_int)
#........................................................................
@equip_window.set_item(item2)
#........................................................................
end
end
end
#--------------------------------------------------------------------------
# ● 状态刷新
#--------------------------------------------------------------------------
def update_status_status
# 按下 B 键的情况下
if Input.trigger?(Input::B)
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 切换到菜单画面
@status_status_window.dispose
#@bgstatus.dispose
@status_update = false
@status_window.active =true
@status_window.index = 0
@arrow_status.visible = true
return
end
end
#===========================================================================
#===========================================================================
#===========================================================================
#--------------------------------------------------------------------------
# ● 天书刷新
#--------------------------------------------------------------------------
def update_system
@system_window.update
case @system_window.index
when 0
@save.visible = true
@load.visible = false
@xt.visible = false
@exit.visible = false
when 1
@save.visible = false
@load.visible = true
@xt.visible = false
@exit.visible = false
when 2
@save.visible = false
@load.visible = false
@xt.visible = true
@exit.visible = false
when 3
@save.visible = false
@load.visible = false
@xt.visible = false
@exit.visible = true
end
# 按下 B 键的情况下
if Input.trigger?(Input::B)
@save.visible = false
@load.visible = false
@xt.visible = false
@exit.visible = false
loop do
if @system_window.x < 700
@system_window.x += 15
end
if @back_xt.x < 715
@back_xt.x += 15
end
delay(0.1)
if @system_window.x >= 700
break
end
end
# 演奏取消 SE
$game_system.se_play($data_system.cancel_se)
# 切换到菜单画面
@system_window.dispose
@sys_update = false
@command_window.active = true
return
end
# 按下 C 键的情况下
if Input.trigger?(Input::C)
# 演奏确定 SE
$game_system.se_play($data_system.decision_se)
case @system_window.index
###########
when 2
@bgm_se_window = Window_bgm_se.new
@bgm_se_window.x = -460 #130
@bgm_se_window.y = 238
@bgm_se_window.z = 1000
@system_window.active = false
@bgm_se_window_update = true
@move.visible = true
loop do
if @move.x < 70
@move.x += 59
end
if @bgm.x < 146
@bgm.x += 59
end
if @se.x < 146
@se.x += 59
end
if @bgm_se_window.x < 130
@bgm_se_window.x += 59
end
delay(0.1)
if @move.x >= 70
break
end
end
@currentbgm_window.visible = true
@currentsfx_window.visible = true
=begin
@bgm_window = Window_BGM_Volume.new(80, ["0%", "17%", "34%", "50%", "67%", "84%", "100%"])
@bgm_window.x = 700
@currentbgm_window = Window_CurrentBGM_Volume.new
@currentbgm_window.x = 725
@system_window.active = false
loop do
if @currentbgm_window.x > 575
@currentbgm_window.x -= 15
end
delay(0.1)
if @currentbgm_window.x <= 575
break
end
end
loop do
if @bgm_window.x > 500
@bgm_window.x -= 10
end
delay(0.1)
if @bgm_window.x <= 500
break
end
end
##### when 4
when 4
@sfx_window = Window_SFX_Volume.new(80, ["0%", "17%", "34%", "50%", "67%", "84%", "100%"])
@sfx_window.x = 700
@currentsfx_window = Window_CurrentSFX_Volume.new
@currentsfx_window.x = 725
@system_window.active = false
loop do
if @currentsfx_window.x > 575
@currentsfx_window.x -= 15
end
delay(0.1)
if @currentsfx_window.x <= 575
break
end
end
loop do
if @sfx_window.x > 500
@sfx_window.x -= 10
end
delay(0.1)
if @sfx_window.x <= 500
break
end
end
=end
##################
when 0
@system_window.dispose
@save.visible = false
@load.visible = false
@xt.visible = false
@exit.visible = false
@back_xt.visible = false
$scene = Scene_Save.new
##################
when 1
@save.visible = false
@load.visible = false
@xt.visible = false
@exit.visible = false
@back_xt.visible = false
@system_window.dispose
$scene = Scene_Load.new(true)
##################
when 3
@end_window = Window_EndCommand.new
@system_window.active = false
end
return
end
end
#==========================================================================
def update_bgm_se
@bgm_se_window.update
if $game_system.bgm_volume == 0
@gdt.x = 235
end
if $game_system.bgm_volume == 17
@gdt.x = 235+41
end
if $game_system.bgm_volume == 34
@gdt.x = 235+41+41
end
if $game_system.bgm_volume == 50
@gdt.x = 235+41+41+41
end
if $game_system.bgm_volume == 67
@gdt.x = 235+41+41+41+41
end
if $game_system.bgm_volume == 84
@gdt.x = 235+41+41+41+41+41
end
if $game_system.bgm_volume == 100
@gdt.x = 235+41+41+41+41+41+41
end
if $game_system.se_volume == 0
@gdt1.x = 235
end
if $game_system.se_volume == 17
@gdt1.x = 235+41
end
if $game_system.se_volume == 34
@gdt1.x = 235+41+41
end
if $game_system.se_volume == 50
@gdt1.x = 235+41+41+41
end
if $game_system.se_volume == 67
@gdt1.x = 235+41+41+41+41
end
if $game_system.se_volume == 84
@gdt1.x = 235+41+41+41+41+41
end
if $game_system.se_volume == 100
@gdt1.x = 235+41+41+41+41+41+41
end
@gdt1.visible = true
@gdt.visible = true
case @bgm_se_window.index
when 0
@bgm.visible = true
@se.visible = false
when 1
@bgm.visible = false
@se.visible = true
end
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@gdt1.visible = false
@gdt.visible = false
@currentbgm_window.visible = false
@currentsfx_window.visible = false
loop do
if @move.x > -520
@move.x -= 59
end
if @bgm.x > -441
@bgm.x -= 59
end
if @se.x > -441
@se.x -= 59
end
if @bgm_se_window.x > -460
@bgm_se_window.x -= 59
end
delay(0.1)
if @move.x <= -520
break
end
end
@bgm.visible = false
@se.visible = false
@move.visible = false
@bgm_se_window.dispose
@bgm_se_window_update = false
@system_window.active = true
return
end
if Input.trigger?(Input::C)
$game_system.se_play($data_system.decision_se)
case @bgm_se_window.index
when 0
# @bgm_se_window.dispose
# @system_window.dispose
@bgm_window = Window_BGM_Volume.new(15, ["", "", "", "", "", "", ""])
@bgm_window.x = 220 ##700
@bgm_window.y = 245
@system_window.active = false
@bgm_se_window_update = false
when 1
# @bgm_se_window.dispose
# @system_window.dispose
@sfx_window = Window_SFX_Volume.new(80, ["", "", "", "", "", "", ""])
@sfx_window.x = 220
@sfx_window.y = 270
@system_window.active = false
@bgm_se_window_update = false
return
end
end
#################################-----------------------------------
def update_bgm
if $game_system.bgm_volume == 0
@gdt.x = 235
end
if $game_system.bgm_volume == 17
@gdt.x = 235+41
end
if $game_system.bgm_volume == 34
@gdt.x = 235+41+41
end
if $game_system.bgm_volume == 50
@gdt.x = 235+41+41+41
end
if $game_system.bgm_volume == 67
@gdt.x = 235+41+41+41+41
end
if $game_system.bgm_volume == 84
@gdt.x = 235+41+41+41+41+41
end
if $game_system.bgm_volume == 100
@gdt.x = 235+41+41+41+41+41+41
end
@gdt.visible = true
@bgm_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@bgm_se_window_update = true
@system_window.active = false
@gdt.visible = false
@bgm_window.dispose
return
end
if Input.trigger?(Input::C)
case @bgm_window.index
when 0
$game_system.bgm_volume = 0
@currentbgm_window.refresh
@gdt.x = 235
when 1
$game_system.bgm_volume = 17
@currentbgm_window.refresh
@gdt.x = 235+41
when 2
$game_system.bgm_volume = 34
@currentbgm_window.refresh
@gdt.x = 235+41+41
when 3
$game_system.bgm_volume = 50
@currentbgm_window.refresh
@gdt.x = 235+41+41+41
when 4
$game_system.bgm_volume = 67
@currentbgm_window.refresh
@gdt.x = 235+41+41+41+41
when 5
$game_system.bgm_volume = 84
@currentbgm_window.refresh
@gdt.x = 235+41+41+41+41+41
when 6
$game_system.bgm_volume = 100
@currentbgm_window.refresh
@gdt.x = 235+41+41+41+41+41+41
end
$game_map.autoplay
return
end
end
def update_sfx
if $game_system.se_volume == 0
@gdt1.x = 235
end
if $game_system.se_volume == 17
@gdt1.x = 235+41
end
if $game_system.se_volume == 34
@gdt1.x = 235+41+41
end
if $game_system.se_volume == 50
@gdt1.x = 235+41+41+41
end
if $game_system.se_volume == 67
@gdt1.x = 235+41+41+41+41
end
if $game_system.se_volume == 84
@gdt1.x = 235+41+41+41+41+41
end
if $game_system.se_volume == 100
@gdt1.x = 235+41+41+41+41+41+41
end
@gdt1.visible = true
@sfx_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@bgm_se_window_update = true
@system_window.active = false
@sfx_window.dispose
return
end
if Input.trigger?(Input::C)
case @sfx_window.index
when 0
$game_system.se_volume = 0
$game_system.se_play($data_system.decision_se)
@currentsfx_window.refresh
when 1
$game_system.se_volume = 17
$game_system.se_play($data_system.decision_se)
@currentsfx_window.refresh
when 2
$game_system.se_volume = 34
$game_system.se_play($data_system.decision_se)
@currentsfx_window.refresh
when 3
$game_system.se_volume = 50
$game_system.se_play($data_system.decision_se)
@currentsfx_window.refresh
when 4
$game_system.se_volume = 67
$game_system.se_play($data_system.decision_se)
@currentsfx_window.refresh
when 5
$game_system.se_volume = 84
$game_system.se_play($data_system.decision_se)
@currentsfx_window.refresh
when 6
$game_system.se_volume = 100
$game_system.se_play($data_system.decision_se)
@currentsfx_window.refresh
end
$game_map.autoplay
return
end
end
def update_end
@end_window.update
if Input.trigger?(Input::B)
$game_system.se_play($data_system.cancel_se)
@end_window.dispose
@system_window.active = true
return
end
if Input.trigger?(Input::C)
case @end_window.index
when 0
@end_window.dispose
@system_window.dispose
command_to_title
when 1
command_shutdown
end
return
end
end
def command_to_title
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = Scene_Title.new
end
def command_shutdown
$game_system.se_play($data_system.decision_se)
Audio.bgm_fade(800)
Audio.bgs_fade(800)
Audio.me_fade(800)
$scene = nil
end
end
end
#end
里的@equip_heads = Window_Equip_heads.new(@actor)