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
@actors.delete(actor_id)
@actors.insert(index, actor_id)
self.battle_member_count += 1
end
#--------------------------------------------------------------------------
# ○ アクターを戦闘メンバーから外す
# actor_id : アクター ID
#--------------------------------------------------------------------------
def remove_battle_member(actor_id)
return unless @actors.include?(actor_id) # パーティにいない
return if actor_fixed?(actor_id) # 固定済み
return if stand_by_members.include?($game_actors[actor_id]) # 待機中
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
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● メッセージ表示が終わるまでウェイト
#--------------------------------------------------------------------------
alias wait_for_message_KGC_LargeParty wait_for_message
def wait_for_message
return if @ignore_wait_for_message # メッセージ終了までのウェイトを無視
wait_for_message_KGC_LargeParty
end
#--------------------------------------------------------------------------
# ● レベルアップの表示
#--------------------------------------------------------------------------
alias display_level_up_KGC_LargeParty display_level_up
def display_level_up
@ignore_wait_for_message = true
display_level_up_KGC_LargeParty
exp = $game_troop.exp_total * KGC::LargeParty::STAND_BY_EXP_RATE / 1000
$game_party.stand_by_members.each { |actor|
if actor.exist?
actor.gain_exp(exp, KGC::LargeParty::SHOW_STAND_BY_LEVEL_UP)
end
}
@ignore_wait_for_message = false
wait_for_message
end
#--------------------------------------------------------------------------
# ● パーティコマンド選択の開始
#--------------------------------------------------------------------------
alias start_party_command_selection_KGC_LargeParty start_party_command_selection
def start_party_command_selection
if $game_temp.in_battle
@status_window.index = 0
end
start_party_command_selection_KGC_LargeParty
end
if KGC::LargeParty::USE_BATTLE_PARTYFORM
#--------------------------------------------------------------------------
# ● 情報表示ビューポートの作成
#--------------------------------------------------------------------------
alias create_info_viewport_KGC_LargeParty create_info_viewport
def create_info_viewport
create_info_viewport_KGC_LargeParty
@__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
update_party_command_selection_KGC_LargeParty
end
#--------------------------------------------------------------------------
# ○ パーティ編成の処理
#--------------------------------------------------------------------------
def process_partyform
Graphics.freeze
snapshot_for_background
$scene = Scene_PartyForm.new(0, Scene_PartyForm::HOST_BATTLE)
$scene.main
$scene = self
@status_window.refresh
perform_transition
end
end
end