if last_size < @actors.size
self.battle_member_count += 1
end
end
#--------------------------------------------------------------------------
# ○ アクターを戦闘メンバーに加える
# actor_id : アクター ID
# index : 追加位置 (省略時は最後尾)
#--------------------------------------------------------------------------
def add_battle_member(actor_id, index = nil)
return unless @actors.include?(actor_id) # パーティにいない
if index == nil
return if battle_members.include?($game_actors[actor_id]) # 出撃済み
return if battle_member_count == max_battle_member_count # 人数が最大
index = battle_member_count
end
class Scene_Title < Scene_Base
#--------------------------------------------------------------------------
# ● 各種ゲームオブジェクトの作成
#--------------------------------------------------------------------------
alias create_game_objects_KGC_LargeParty create_game_objects
def create_game_objects
create_game_objects_KGC_LargeParty
if KGC::LargeParty::DEFAULT_PARTYFORM_ENABLED
$game_switches[KGC::LargeParty::PARTYFORM_SWITCH] = true
$game_switches[KGC::LargeParty::BATTLE_PARTYFORM_SWITCH] = true
end
end
end
class Scene_Menu < Scene_Base
if KGC::LargeParty::USE_MENU_PARTYFORM_COMMAND
#--------------------------------------------------------------------------
# ● コマンドウィンドウの作成
#--------------------------------------------------------------------------
alias create_command_window_KGC_LargeParty create_command_window
def create_command_window
create_command_window_KGC_LargeParty
return if $imported["CustomMenuCommand"]
@__command_partyform_index =
@command_window.add_command(Vocab.partyform)
@command_window.draw_item(@__command_partyform_index,
$game_party.partyform_enable?)
if @command_window.oy > 0
@command_window.oy -= Window_Base::WLH
end
@command_window.index = @menu_index
end
end
#--------------------------------------------------------------------------
# ● コマンド選択の更新
#--------------------------------------------------------------------------
alias update_command_selection_KGC_LargeParty update_command_selection
def update_command_selection
current_menu_index = @__command_partyform_index
call_partyform_flag = false
if Input.trigger?(Input::C)
case @command_window.index
when @__command_partyform_index # パーティ編成
call_partyform_flag = true
end
# パーティ編成ボタン押下
elsif KGC::LargeParty::MENU_PARTYFORM_BUTTON != nil &&
Input.trigger?(KGC::LargeParty::MENU_PARTYFORM_BUTTON)
call_partyform_flag = true
current_menu_index = @command_window.index if current_menu_index == nil
end
# パーティ編成画面に移行
if call_partyform_flag
if $game_party.members.size == 0 || !$game_party.partyform_enable?
Sound.play_buzzer
return
end
Sound.play_decision
$scene = Scene_PartyForm.new(current_menu_index)
return
end
@__command_partyform_index =
@party_command_window.add_command(Vocab.partyform_battle)
@party_command_window.draw_item(@__command_partyform_index,
$game_party.battle_partyform_enable?)
end
#--------------------------------------------------------------------------
# ● パーティコマンド選択の更新
#--------------------------------------------------------------------------
alias update_party_command_selection_KGC_LargeParty update_party_command_selection
def update_party_command_selection
if Input.trigger?(Input::C)
case @party_command_window.index
when @__command_partyform_index # パーティ編成
unless $game_party.battle_partyform_enable?
Sound.play_buzzer
return
end
Sound.play_decision
process_partyform
return
end
end
process_defeat_KGC_LargeParty if $game_party.all_dead?
end
#--------------------------------------------------------------------------
# ○ 全滅時の入れ替え処理
#--------------------------------------------------------------------------
def process_defeat_launch
while @spriteset.animation?
update_basic
end
# 戦闘可能者を出撃 (固定アクターは残す)
$game_party.remove_all_battle_member
max = $game_party.max_battle_member_count
while ($game_party.battle_members.size < max)
actor = $game_party.stand_by_members.find { |a| a.exist? }
break if actor == nil
$game_party.add_battle_member(actor.id)
@status_window.refresh
display_launch(actor)
end
@info_viewport.visible = true
@message_window.visible = false
@message_window.clear
end
#--------------------------------------------------------------------------
# ○ 出撃の表示
# target : 対象者 (アクター)
#--------------------------------------------------------------------------
def display_launch(target)
text = sprintf(Vocab::DefeatLaunch, target.name)
@message_window.add_instant_text(text)
wait(40)
end
end # <-- if KGC::LargeParty::USE_BATTLE_PARTYFORM
end