# # バトルの格闘場化・サイドビュー対応版(RGSS2) #  (C)2008 TYPE74RX-T # # ★ カスタマイズポイント:15~18行目 #============================================================================== # ★ RX_T #------------------------------------------------------------------------------ #  素材用汎用モジュールです。 #============================================================================== module RX_T G_Victory = "%sの予想が見事的中した!" # 賭けに勝った時 G_Defeat = "%sの予想は外れてしまった。" # 賭けに負けた時 G_fight = "賭ける" # 賭ける時のコマンド名 G_escape = "やめる" # やめる時のコマンド名 end #============================================================================== # ■ Game_Temp #------------------------------------------------------------------------------ #  セーブデータに含まれない、一時的なデータを扱うクラスです。このクラスのイン # スタンスは $game_temp で参照されます。 #============================================================================== class Game_Temp #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias rx_rgss2c5_initialize initialize def initialize # メソッドを呼び戻す rx_rgss2c5_initialize # ★ ギャンブルモードにするか否か @rx_gamble_mode = false # ★ オッズ @rx_gamble_odds = [0, 0, 0, 0, 0, 0, 0, 0] # ★ 賭け金 @rx_bet_gold = 0 # ★ オッズ表示用文字列 @rx_odds_view = "" # ★ 対象選択中フラグ @rx_gamble_selecting = true end #-------------------------------------------------------------------------- # ★ ギャンブルモードにするか否かの取得 #-------------------------------------------------------------------------- def rx_gamble_mode return @rx_gamble_mode end #-------------------------------------------------------------------------- # ★ オッズの取得 #-------------------------------------------------------------------------- def rx_gamble_odds return @rx_gamble_odds end #-------------------------------------------------------------------------- # ★ 賭け金の取得 #-------------------------------------------------------------------------- def rx_bet_gold return @rx_bet_gold end #-------------------------------------------------------------------------- # ★ ギャンブルモードにするか否かの設定 #-------------------------------------------------------------------------- def rx_gamble_mode=(judge) @rx_gamble_mode = judge end #-------------------------------------------------------------------------- # ★ オッズの設定 #-------------------------------------------------------------------------- def rx_gamble_odds=(odds) @rx_gamble_odds = odds end #-------------------------------------------------------------------------- # ★ 賭け金の設定 #-------------------------------------------------------------------------- def rx_bet_gold=(gold) @rx_bet_gold = gold end #-------------------------------------------------------------------------- # ★ オッズ表示用文字列 #-------------------------------------------------------------------------- def rx_odds_view return @rx_odds_view end #-------------------------------------------------------------------------- # ★ オッズ表示用文字列の設定 #-------------------------------------------------------------------------- def rx_odds_view=(odds_str) @rx_odds_view = odds_str end #-------------------------------------------------------------------------- # ★ 対象選択中フラグ #-------------------------------------------------------------------------- def rx_gamble_selecting return @rx_gamble_selecting end #-------------------------------------------------------------------------- # ★ 対象選択中フラグか否かの設定 #-------------------------------------------------------------------------- def rx_gamble_selecting=(judge) @rx_gamble_selecting = judge end end #============================================================================== # ■ Game_Battler #------------------------------------------------------------------------------ #  バトラーを扱うクラスです。このクラスは Game_Actor クラスと Game_Enemy クラ # スのスーパークラスとして使用されます。 #============================================================================== class Game_Battler #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias rx_rgss2c5_initialize initialize def initialize # メソッドを呼び戻す rx_rgss2c5_initialize # ★ 賭け対象フラグ @rx_gamble = false end #-------------------------------------------------------------------------- # ★ 賭け対象フラグの取得 #-------------------------------------------------------------------------- def rx_gamble return @rx_gamble end #-------------------------------------------------------------------------- # ★ 賭け対象フラグの設定 #-------------------------------------------------------------------------- def rx_gamble=(judge) @rx_gamble = judge end end #============================================================================== # ■ Game_BattleAction #------------------------------------------------------------------------------ #  戦闘行動を扱うクラスです。このクラスは Game_Battler クラスの内部で使用され # ます。 #============================================================================== class Game_BattleAction #-------------------------------------------------------------------------- # ● 敵ユニットを取得 #-------------------------------------------------------------------------- alias rx_rgss2c5_opponents_unit opponents_unit def opponents_unit # ★ ギャンブルモードなら敵ユニットを一律敵キャラ側に if $game_temp.rx_gamble_mode if battler.actor? return $game_troop else return $game_troop end return end # メソッドを呼び戻す rx_rgss2c5_opponents_unit end #-------------------------------------------------------------------------- # ● 通常攻撃のターゲット作成 #-------------------------------------------------------------------------- alias rx_rgss2c5_make_attack_targets make_attack_targets def make_attack_targets # ★ ギャンブルモードなら特殊なターゲット作成処理へ return rx_gamble_make_attack_targets if $game_temp.rx_gamble_mode # メソッドを呼び戻す rx_rgss2c5_make_attack_targets end #-------------------------------------------------------------------------- # ★ 通常攻撃のターゲット作成(ギャンブルモード用) #-------------------------------------------------------------------------- def rx_gamble_make_attack_targets targets = [] if battler.confusion? targets.push(battler) elsif battler.berserker? # ★ ターゲット取得 index = @target_index # ★ 誤選択防止1・エラー回避 unless index < opponents_unit.members.size index = opponents_unit.members.size - 1 end target_hp = opponents_unit.members[index].hp # ★ 誤選択防止2・自分またはHP0の相手を攻撃しない while index == battler.index or target_hp == 0 # ターゲットを再定義 index = rand(opponents_unit.members.size) # 再定義されたターゲットのHPを求める target_hp = opponents_unit.members[index].hp end targets.push(opponents_unit.smooth_target(index)) else # ★ ターゲット取得 index = @target_index # ★ 誤選択防止1・エラー回避 unless index < opponents_unit.members.size index = opponents_unit.members.size - 1 end target_hp = opponents_unit.members[index].hp # ★ 誤選択防止2・自分またはHP0の相手を攻撃しない while index == battler.index or target_hp == 0 # ターゲットを再定義 index = rand(opponents_unit.members.size) # 再定義されたターゲットのHPを求める target_hp = opponents_unit.members[index].hp end targets.push(opponents_unit.smooth_target(index)) end if battler.dual_attack # 連続攻撃 # ★ ターゲット取得 index = @target_index # ★ 誤選択防止1・エラー回避 unless index < opponents_unit.members.size index = opponents_unit.members.size - 1 end target_hp = opponents_unit.members[index].hp # ★ 誤選択防止2・自分またはHP0の相手を攻撃しない while index == battler.index or target_hp == 0 # ターゲットを再定義 index = rand(opponents_unit.members.size) # 再定義されたターゲットのHPを求める target_hp = opponents_unit.members[index].hp end targets.push(opponents_unit.smooth_target(index)) targets += targets end return targets.compact end #-------------------------------------------------------------------------- # ● スキルまたはアイテムのターゲット作成 # obj : スキルまたはアイテム #-------------------------------------------------------------------------- alias rx_rgss2c5_make_obj_targets make_obj_targets def make_obj_targets(obj) # ★ ギャンブルモードなら特殊なターゲット作成処理へ return rx_gamble_make_obj_targets(obj) if $game_temp.rx_gamble_mode # メソッドを呼び戻す rx_rgss2c5_make_obj_targets(obj) end #-------------------------------------------------------------------------- # ★ スキルまたはアイテムのターゲット作成(ギャンブルモード用) # obj : スキルまたはアイテム #-------------------------------------------------------------------------- def rx_gamble_make_obj_targets(obj) targets = [] if obj.for_opponent? if obj.for_random? if obj.for_one? # 敵単体 ランダム number_of_targets = 1 elsif obj.for_two? # 敵二体 ランダム number_of_targets = 2 else # 敵三体 ランダム number_of_targets = 3 end number_of_targets.times do # ★ ターゲット取得 index = @target_index # ★ 誤選択防止1・エラー回避 unless index < opponents_unit.members.size index = opponents_unit.members.size - 1 end target_hp = opponents_unit.members[index].hp # ★ 誤選択防止2・自分またはHP0の相手を攻撃しない while index == battler.index or target_hp == 0 # ターゲットを再定義 index = rand(opponents_unit.members.size) # 再定義されたターゲットのHPを求める target_hp = opponents_unit.members[index].hp end targets.push(opponents_unit.smooth_target(index)) end elsif obj.dual? # 敵単体 連続 # ★ ターゲット取得 index = @target_index # ★ 誤選択防止1・エラー回避 unless index < opponents_unit.members.size index = opponents_unit.members.size - 1 end target_hp = opponents_unit.members[index].hp # ★ 誤選択防止2・自分またはHP0の相手を攻撃しない while index == battler.index or target_hp == 0 # ターゲットを再定義 index = rand(opponents_unit.members.size) # 再定義されたターゲットのHPを求める target_hp = opponents_unit.members[index].hp end targets.push(opponents_unit.smooth_target(index)) targets += targets elsif obj.for_one? # 敵単体 # ★ ターゲット取得 index = @target_index # ★ 誤選択防止1・エラー回避 unless index < opponents_unit.members.size index = opponents_unit.members.size - 1 end target_hp = opponents_unit.members[index].hp # ★ 誤選択防止2・自分またはHP0の相手を攻撃しない while index == battler.index or target_hp == 0 # ターゲットを再定義 index = rand(opponents_unit.members.size) # 再定義されたターゲットのHPを求める target_hp = opponents_unit.members[index].hp end targets.push(opponents_unit.smooth_target(index)) else # 敵全体 # ★ 攻撃者以外をターゲットとする for all_target in opponents_unit.members # ★ ターゲットが生存しているか、自分がターゲットになっていない場合 if all_target.exist? and all_target.index != battler.index targets.push(all_target) end end end elsif obj.for_user? # 使用者 targets.push(battler) elsif obj.for_dead_friend? if obj.for_one? # 味方単体 (戦闘不能) targets.push(battler) else # 味方全体 (戦闘不能) targets.push(battler) end elsif obj.for_friend? if obj.for_one? # 味方単体 targets.push(battler) else # 味方全体 targets.push(battler) end end return targets.compact end end #============================================================================== # ■ Game_Party #------------------------------------------------------------------------------ #  パーティを扱うクラスです。ゴールドやアイテムなどの情報が含まれます。このク # ラスのインスタンスは $game_party で参照されます。 #============================================================================== class Game_Party < Game_Unit #-------------------------------------------------------------------------- # ● ゴールドの増加 (減少) # n : 金額 #-------------------------------------------------------------------------- alias rx_rgss2c5_gain_gold gain_gold def gain_gold(n) # ★ 増減前のゴールドを取得 rx_before_gold = @gold # メソッドを呼び戻す rx_rgss2c5_gain_gold(n) # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode # ★ ゴールドの差額を取得 rx_bet_gold = rx_before_gold - @gold # ★ ゴールドが減ったなら、減ったゴールドを賭け金として取得 $game_temp.rx_bet_gold = rx_bet_gold if rx_bet_gold > 0 else # ★ 賭け金を初期化する $game_temp.rx_bet_gold = 0 end end end #============================================================================== # ■ Interpreter #------------------------------------------------------------------------------ #  イベントコマンドを実行するインタプリタです。このクラスは Game_System クラ # スや Game_Event クラスの内部で使用されます。 #============================================================================== class Game_Interpreter #-------------------------------------------------------------------------- # ★ 注釈 #-------------------------------------------------------------------------- alias rx_rgss2c5_command_108 command_108 def command_108 # 格闘場モード if @parameters[0].include?("格闘場モード") # ギャンブルモードをON $game_temp.rx_gamble_mode = true # オッズの取得 odds = @parameters[0].scan(/[-10-9]+/) for i in 0...odds.size odds[i] = odds[i].to_i end $game_temp.rx_gamble_odds[0...odds.size] = odds # 継続(競合対策) return true end # メソッドを呼び戻す rx_rgss2c5_command_108 end end #============================================================================== # ■ Window_Help #------------------------------------------------------------------------------ #  スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。 #============================================================================== class Window_Help < Window_Base #-------------------------------------------------------------------------- # ● テキスト設定 # text : ウィンドウに表示する文字列 # align : アラインメント (0..左揃え、1..中央揃え、2..右揃え) #-------------------------------------------------------------------------- alias rx_rgss2c5_set_text set_text def set_text(text, align = 0) if $game_temp.rx_gamble_mode and $game_temp.rx_gamble_selecting text += $game_temp.rx_odds_view end # メソッドを呼び戻す rx_rgss2c5_set_text(text, align) end end #============================================================================== # ■ Window_PartyCommand #------------------------------------------------------------------------------ #  バトル画面で、戦うか逃げるかを選択するウィンドウです。 #============================================================================== class Window_PartyCommand < Window_Command #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias rx_rgss2c5_initialize initialize def initialize # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode s1 = RX_T::G_fight s2 = RX_T::G_escape super(128, [s1, s2], 1, 4) draw_item(0, true) draw_item(1, $game_troop.can_escape) self.active = false return end # メソッドを呼び戻す rx_rgss2c5_initialize end end #============================================================================== # ■ Scene_Battle #------------------------------------------------------------------------------ #  バトル画面の処理を行うクラスです。 #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ● ターゲット選択の開始 #-------------------------------------------------------------------------- alias rx_rgss2c5_start_target_selection start_target_selection def start_target_selection(actor = false) # ★ ギャンブルモードなら専用処理へ return rx_2c5_start_target_selection(actor) if $game_temp.rx_gamble_mode # メソッドを呼び戻す rx_rgss2c5_start_target_selection(actor) end #-------------------------------------------------------------------------- # ★ ターゲット選択の開始(ギャンブルモード用) #-------------------------------------------------------------------------- def rx_2c5_start_target_selection(actor = false) members = $game_party.members if actor members = $game_troop.members unless actor # カーソルスプライトの作成 @cursor = Sprite.new @cursor.bitmap = Cache.character("cursor") @cursor.src_rect.set(0, 0, 32, 32) @cursor_flame = 0 @cursor.x = -200 @cursor.y = -200 @cursor.ox = @cursor.width @cursor.oy = @cursor.height # ターゲット名を表示するヘルプウインドウを作成 @help_window = Window_Help.new if @help_window == nil # 不要なウインドウを消す @actor_command_window.active = false @skill_window.visible = false if @skill_window != nil @item_window.visible = false if @item_window != nil # 存在しているターゲットで最も番号の低い対象を最初に指すように @index = 0 @max_index = members.size - 1 # アクターは戦闘不能者でもターゲットできるようにエネミーと区別 unless actor members.size.times do break if members[@index].exist? @index += 1 end end # オッズを小数化 odds = $game_temp.rx_gamble_odds[@index] * 0.1 # オッズ表示用に文字列化する $game_temp.rx_odds_view = " " + odds.to_s + "倍" @help_window.set_text(members[@index].name, 1) select_member(actor) end #-------------------------------------------------------------------------- # ● カーソルを前に移動 #-------------------------------------------------------------------------- alias rx_rgss2c5_cursor_up cursor_up def cursor_up(members, actor) # ★ ギャンブルモードなら専用処理へ return rx_2c5_cursor_up(members, actor) if $game_temp.rx_gamble_mode # メソッドを呼び戻す rx_rgss2c5_cursor_up(members, actor) end #-------------------------------------------------------------------------- # ★ カーソルを前に移動(ギャンブルモード用) #-------------------------------------------------------------------------- def rx_2c5_cursor_up(members, actor) Sound.play_cursor members.size.times do @index += members.size - 1 @index %= members.size break if actor break if members[@index].exist? end # オッズを小数化 odds = $game_temp.rx_gamble_odds[@index] * 0.1 # オッズ表示用に文字列化する $game_temp.rx_odds_view = " " + odds.to_s + "倍" @help_window.set_text(members[@index].name, 1) end #-------------------------------------------------------------------------- # ● カーソルを次に移動 #-------------------------------------------------------------------------- alias rx_rgss2c5_cursor_down cursor_down def cursor_down(members, actor) # ★ ギャンブルモードなら専用処理へ return rx_2c5_cursor_down(members, actor) if $game_temp.rx_gamble_mode # メソッドを呼び戻す rx_rgss2c5_cursor_down(members, actor) end #-------------------------------------------------------------------------- # ★ カーソルを次に移動(ギャンブルモード用) #-------------------------------------------------------------------------- def rx_2c5_cursor_down(members, actor) Sound.play_cursor members.size.times do @index += 1 @index %= members.size break if actor break if members[@index].exist? && !actor end # オッズを小数化 odds = $game_temp.rx_gamble_odds[@index] * 0.1 # オッズ表示用に文字列化する $game_temp.rx_odds_view = " " + odds.to_s + "倍" @help_window.set_text(members[@index].name, 1) end #-------------------------------------------------------------------------- # ● 勝敗判定 #-------------------------------------------------------------------------- alias rx_rgss2c5_judge_win_loss judge_win_loss def judge_win_loss # ★ ギャンブルモードなら特殊な勝敗判定処理へ return rx_gamble_judge_win_loss if $game_temp.rx_gamble_mode # メソッドを呼び戻す rx_rgss2c5_judge_win_loss end #-------------------------------------------------------------------------- # ★ 勝敗判定(ギャンブルモード用) #-------------------------------------------------------------------------- def rx_gamble_judge_win_loss # ★ 生存者数と勝利フラグを初期化 exist = 0 win = false # ★ 生存者数をカウント。同時に生存者が賭け対象であるかもチェック for enemy in $game_troop.members exist += 1 if enemy.exist? win = enemy.rx_gamble if enemy.exist? end # ★ 敵キャラが 2 体以上いるなら続行 return false if exist > 1 # ★ 賭けに勝ったか負けたかでそれぞれ処理する if win process_victory return true else process_defeat return true end end #-------------------------------------------------------------------------- # ● 戦闘終了 # result : 結果 (0:勝利 1:逃走 2:敗北) #-------------------------------------------------------------------------- alias rx_rgss2c5_battle_end battle_end def battle_end(result) # ★ ギャンブルモードで引き分け(中断)か逃げた場合 if $game_temp.rx_gamble_mode and result == 1 # 賭けた金だけ払い戻す $game_party.gain_gold($game_temp.rx_bet_gold) end # ★ 賭け金を初期化 $game_temp.rx_bet_gold = 0 # ★ ギャンブルモードを解除 $game_temp.rx_gamble_mode = false # メソッドを呼び戻す rx_rgss2c5_battle_end(result) end #-------------------------------------------------------------------------- # ● パーティコマンド選択の開始 #-------------------------------------------------------------------------- alias rx_rgss2c5_start_party_command_selection start_party_command_selection def start_party_command_selection # ★ アクターがギャンブラーモードかイベントオートバトルならメイン処理へ if @rx_actor_gambler or @rx_event_auto_battle start_main return end # メソッドを呼び戻す rx_rgss2c5_start_party_command_selection end #-------------------------------------------------------------------------- # ● パーティコマンド選択の更新 #-------------------------------------------------------------------------- alias rx_rgss2c5_update_party_command_selection update_party_command_selection def update_party_command_selection # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode if Input.trigger?(Input::C) case @party_command_window.index when 0 # 戦う Sound.play_decision @status_window.index = @actor_index = -1 # 対象選択モードをオン $game_temp.rx_gamble_selecting = true @party_command_window.active = false start_target_enemy_selection when 1 # 逃げる if $game_troop.can_escape == false Sound.play_buzzer return end Sound.play_decision process_escape end end return end # メソッドを呼び戻す rx_rgss2c5_update_party_command_selection end #-------------------------------------------------------------------------- # ● ターゲット選択の終了 #-------------------------------------------------------------------------- alias rx_rgss2c5_end_target_selection end_target_selection def end_target_selection # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode @cursor.dispose @cursor = nil if @actor_command_window.index == 0 @help_window.dispose @help_window = nil end @party_command_window.active = true return end # メソッドを呼び戻す rx_rgss2c5_end_target_selection end #-------------------------------------------------------------------------- # ● 戦闘開始の処理 #-------------------------------------------------------------------------- alias rx_rgss2c5_process_battle_start process_battle_start def process_battle_start # ★ イベントオートバトルモード状態の初期化 @rx_event_auto_battle = false # ★ ギャンブルモードかつお金を掛けていなければ if $game_temp.rx_gamble_mode and $game_temp.rx_bet_gold == 0 # イベントオートバトルモードにする @rx_event_auto_battle = true # 賭け対象を一体目に設定したオッズ番目の敵キャラにする # 但し、誤った設定をしていたら最後に設定した敵キャラが # 賭け対象になるようにする if $game_temp.rx_gamble_odds[0] >= $game_troop.members.size $game_temp.rx_gamble_odds[0] = $game_troop.members.size - 1 end $game_troop.members[$game_temp.rx_gamble_odds[0]].rx_gamble = true end # ★ アクターのギャンブラーモード状態を初期化 @rx_actor_gambler = false # ★ 賭け対象のオッズを初期化 @rx_target_odds = 0 # メソッドを呼び戻す rx_rgss2c5_process_battle_start end #-------------------------------------------------------------------------- # ● 逃走の処理 #-------------------------------------------------------------------------- alias rx_rgss2c5_process_escape process_escape def process_escape # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode # 100 %逃走成功 wait_for_message battle_end(1) return end # メソッドを呼び戻す rx_rgss2c5_process_escape end #-------------------------------------------------------------------------- # ● 勝利の処理 #-------------------------------------------------------------------------- alias rx_rgss2c5_process_victory process_victory def process_victory # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode @info_viewport.visible = false @message_window.visible = true RPG::BGM.stop # イベントオートバトルでなければ勝利時 ME を演奏 $game_system.battle_end_me.play unless @rx_event_auto_battle unless $BTEST $game_temp.map_bgm.play $game_temp.map_bgs.play end display_exp_and_gold battle_end(0) return end # メソッドを呼び戻す rx_rgss2c5_process_victory end #-------------------------------------------------------------------------- # ● 獲得した経験値とお金の表示 #-------------------------------------------------------------------------- alias rx_rgss2c5_display_exp_and_gold display_exp_and_gold def display_exp_and_gold # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode # イベントオートバトルでないならメッセージ表示 unless @rx_event_auto_battle # 取得ゴールド=掛け金×オッズ÷ 10 gold = $game_temp.rx_bet_gold * @rx_target_odds / 10 $game_party.gain_gold(gold) text = sprintf(RX_T::G_Victory, $game_party.name) $game_message.texts.push('\|' + text) if gold > 0 text = sprintf(Vocab::ObtainGold, gold, Vocab::gold) $game_message.texts.push('\.' + text) end wait_for_message end return end # メソッドを呼び戻す rx_rgss2c5_display_exp_and_gold end #-------------------------------------------------------------------------- # ● 敗北の処理 #-------------------------------------------------------------------------- alias rx_rgss2c5_process_defeat process_defeat def process_defeat # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode @info_viewport.visible = false # イベントオートバトルでないならメッセージ表示 unless @rx_event_auto_battle @message_window.visible = true text = sprintf(RX_T::G_Defeat, $game_party.name) $game_message.texts.push(text) wait_for_message end battle_end(2) return end # メソッドを呼び戻す rx_rgss2c5_process_defeat end #-------------------------------------------------------------------------- # ● 戦闘行動の実行 #-------------------------------------------------------------------------- alias rx_rgss2c5_execute_action execute_action def execute_action # ★ ギャンブルモードなら if $game_temp.rx_gamble_mode # ★ 生存者数を初期化 rx_exist = 0 # ★ 生存者数をカウント for enemy in $game_troop.members rx_exist += 1 if enemy.exist? end # ★ 敵キャラが残り一体なら if rx_exist < 2 # 複数回行動に対応 @active_battler.recover_all @active_battler.action.kind = -1 end end # メソッドを呼び戻す rx_rgss2c5_execute_action end #-------------------------------------------------------------------------- # ● ターゲット選択 #-------------------------------------------------------------------------- alias rx_rgss2c5_select_member select_member def select_member(actor = false) # ★ ギャンブルモードなら専用処理へ return rx_2c5_select_member(actor) if $game_temp.rx_gamble_mode # メソッドを呼び戻す rx_rgss2c5_select_member(actor) end #-------------------------------------------------------------------------- # ★ ターゲット選択(ギャンブルモード用) #-------------------------------------------------------------------------- def rx_2c5_select_member(actor = false) members = $game_party.members if actor members = $game_troop.members unless actor loop do update_basic @cursor_flame = 0 if @cursor_flame == 30 @cursor.src_rect.set(0, 0, 32, 32) if @cursor_flame == 29 @cursor.src_rect.set(0, 32, 32, 32) if @cursor_flame == 15 point = @spriteset.set_cursor(actor, @index) @cursor.x = point[0] @cursor.y = point[1] @cursor_flame += 1 if Input.trigger?(Input::B) Sound.play_cancel end_target_selection break elsif Input.trigger?(Input::C) Sound.play_decision # ★ 選択したエネミーを賭け対象とする $game_troop.members[@index].rx_gamble = true # ★ 賭け対象のオッズを取得 @rx_target_odds = $game_temp.rx_gamble_odds[@index] end_target_selection end_skill_selection end_item_selection # ★ アクターをギャンブラーモードに # そして対象選択モードをオフにしてメイン処理へ @rx_actor_gambler = true $game_temp.rx_gamble_selecting = false start_main break end if Input.repeat?(Input::LEFT) if actor cursor_down(members, actor) if $back_attack cursor_up(members, actor) unless $back_attack else cursor_up(members, actor) if $back_attack cursor_down(members, actor) unless $back_attack end end if Input.repeat?(Input::RIGHT) if actor cursor_up(members, actor) if $back_attack cursor_down(members, actor) unless $back_attack else cursor_down(members, actor) if $back_attack cursor_up(members, actor) unless $back_attack end end cursor_up(members, actor) if Input.repeat?(Input::UP) cursor_down(members, actor) if Input.repeat?(Input::DOWN) end end end