# # 出現トループの追加と変更 #  (C)2006 TYPE74RX-T # class Interpreter #-------------------------------------------------------------------------- # ★ 注釈 #-------------------------------------------------------------------------- alias rx_rgssc8_command_108 command_108 def command_108 # 出現トループの追加処理 if @parameters[0].include?("出現トループの追加") # 初期設定 rx_str = @parameters[0] # 複数行にわたって設定している場合 # それらを全て変数に代入する。 i = 1 loop do # 次の行に文字列がある場合 if @list[@index+i].code == 408 rx_str += " " + rx_str += @list[@index+i].parameters[0] i += 1 else break end end # 文字列から数字の文字列のみを抽出 rx_r_spec = rx_str.scan(/\d+/) # 配列変数の初期化 rx_range_specification = [] # 数字の文字列を数値化 for i in 0...rx_r_spec.size rx_range_specification[i] = rx_r_spec[i].to_i end # 出現トループの追加処理 $game_map.encounter_list.concat rx_range_specification # 継続(競合対策) return true end # 出現トループの変更処理 if @parameters[0].include?("出現トループの変更") # 初期設定 rx_str = @parameters[0] # 複数行にわたって設定している場合 # それらを全て変数に代入する。 i = 1 loop do # 次の行に文字列がある場合 if @list[@index+i].code == 408 rx_str += " " + rx_str += @list[@index+i].parameters[0] i += 1 else break end end # 文字列から数字の文字列のみを抽出 rx_r_spec = rx_str.scan(/\d+/) # 配列変数の初期化 rx_range_specification = [] # 数字の文字列を数値化 for i in 0...rx_r_spec.size rx_range_specification[i] = rx_r_spec[i].to_i end # 初期出現トループ情報のクリア $game_map.encounter_list.clear # 出現トループの変更処理(設定したトループ情報を挿入) $game_map.encounter_list.concat rx_range_specification # 継続(競合対策) return true end # メソッドを呼び戻す rx_rgssc8_command_108 end end