Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # ** RBS - Ramiro's Battle System (PART III - Actions)
- # Version 2.2
- # Difficulty Very Hard.
- # +little Shield Addon by Stesc
- #-------------------------------------------------------------------------------
- # If you don't know what to do... DO NOT EDIT THIS FILE.
- #-------------------------------------------------------------------------------
- # License:
- #Copyright (c) 2012, Ramiro Rojo
- #All rights reserved.
- #
- #Redistribution and use in source and binary forms, with or without
- #modification, are permitted provided that the following conditions are met:
- #
- #1. Redistributions of source code must retain the above copyright notice, this
- # list of conditions and the following disclaimer.
- #2. Redistributions in binary form must reproduce the above copyright notice,
- # this list of conditions and the following disclaimer in the documentation
- # and/or other materials provided with the distribution.
- #
- #THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
- #ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- #WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- #DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
- #ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- #(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- #LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- #ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- #(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- #SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- #
- #The views and conclusions contained in the software and documentation are those
- #of the authors and should not be interpreted as representing official policies,
- #either expressed or implied, of the FreeBSD Project.
- #===============================================================================
- #==============================================================================
- # ¦ Scene_Battle
- #==============================================================================
- class Scene_Battle < Scene_Base
- def setup_battle_commands
- # ADDING A COMMAND:
- # BattleInterpreter::Commands['command in upercase'] = [needs close, linked method]
- # <pose: target, character_index, pose_id, style, loops, interval> (WORKS!)
- BattleInterpreter::Commands['POSE'] = [false, method(:on_pose_command)]
- # <wait: time> (WORKS!)
- BattleInterpreter::Commands['WAIT'] = [false, method(:on_wait_command)]
- # <move: mover, target, x_correction, y_correction, jump, time> (WORKS!)
- BattleInterpreter::Commands['MOVE'] = [false, method(:on_move_command)]
- # <zoom: target, zoom_x, zoom_y, time> (WORKS!)
- BattleInterpreter::Commands['ZOOM'] = [false, method(:on_zoom_command)]
- # <angle: target, angle, time> (WORKS!)
- BattleInterpreter::Commands['ANGLE'] = [false, method(:on_angle_command)]
- # <opacity: target, opacity, time> (WORKS!)
- BattleInterpreter::Commands['OPACITY'] = [false, method(:on_opacity_command)]
- # <animation: target, animation_id, flip> (WORKS!)
- BattleInterpreter::Commands['ANIMATION'] = [false, method(:on_animation_command)]
- # <effects>
- BattleInterpreter::Commands['EFFECTS'] = [false, method(:on_effects_command)]
- # <if: 'evaluating condition'> (WORKS!)
- BattleInterpreter::Commands['IF'] = [true, method(:on_if_command)]
- # <repeat: 'times'> (WORKS!)
- BattleInterpreter::Commands['REPEAT'] = [true, method(:on_repeat_command)]
- # <while: 'evaluating condition'> (WORKS!)
- BattleInterpreter::Commands['WHILE'] = [true, method(:on_while_command)]
- # <afterimage: target, count, separation> (WORKS!)
- BattleInterpreter::Commands['AFTERIMAGE'] = [false, method(:on_afterimage_command)]
- # <mirror: target, value> (WORKS!)
- BattleInterpreter::Commands['MIRROR'] = [false, method(:on_mirror_command)]
- # <show pic: id, name, origin, x, y, zoom_x, zoom_y, opacity, blend_type> (WORKS!)
- BattleInterpreter::Commands['SHOW PIC'] = [false, method(:on_show_picture_command)]
- # <move pic: id, origin, x, y, zoom_x, zoom_y, opacity, blend_type, duration> (WORKS!)
- BattleInterpreter::Commands['MOVE PIC'] = [false, method(:on_move_picture_command)]
- # <move pic ex: id, target, x_correction, y_correction, time> (WORKS!)
- BattleInterpreter::Commands['MOVE PIC EX'] = [false, method(:on_move_picture_ex_command)]
- # <zoom pic ex: id, zoom_x, zoom_y, time> (WORKS!)
- BattleInterpreter::Commands['ZOOM PIC'] = [false, method(:on_zoom_picture_command)]
- # <opacity pic ex: id, opacity, time> (WORKS!)
- BattleInterpreter::Commands['OPACITY PIC'] = [false, method(:on_opacity_picture_command)]
- # <anime pic: id, animation_id, flip> (WORKS!)
- BattleInterpreter::Commands['ANIME PIC'] = [false, method(:on_anime_picture_command)]
- # <rotate pic: id, speed> (WORKS!)
- BattleInterpreter::Commands['ROTATE PIC'] = [false, method(:on_rotate_picture_command)]
- # <tone pic: id, red, green, blue, gray>, time (WORKS!)
- BattleInterpreter::Commands['TONE PIC'] = [false, method(:on_tone_picture_command)]
- # <delete pic: id> (WORKS!)
- BattleInterpreter::Commands['DELETE PIC'] = [false, method(:on_delete_picture_command)]
- # <ruby: script> (WORKS!)
- BattleInterpreter::Commands['RUBY'] = [false, method(:on_ruby_script_command)]
- # <each process: target> (WORKS!)
- BattleInterpreter::Commands['EACH PROCESS'] = [true, method(:on_each_process_command)]
- # <change target: target> (WORKS!)
- BattleInterpreter::Commands['CHANGE TARGET'] = [false, method(:on_target_change_command)]
- # <target change: battler_array> (used by some Commands) (WORKS!)
- BattleInterpreter::Commands['TARGET CHANGE EX'] = [false, method(:on_target_change_special_command)]
- # <end> (WORKS!)
- BattleInterpreter::Commands['END'] = [false, method(:on_end_command)]
- # <check counter> (READY!)
- BattleInterpreter::Commands['CHECK COUNTER'] = [false, method(:on_counter_check_command)]
- # <check reflect> (READY!)
- BattleInterpreter::Commands['CHECK REFLECT'] = [false, method(:on_reflect_check_command)]
- # <check substitute> (READY!)
- BattleInterpreter::Commands['CHECK SUBSTITUTE'] = [false, method(:on_substitute_check_command)]
- # <link skill: skill_id, chance> (READY!)
- BattleInterpreter::Commands['LINK SKILL'] = [false, method(:on_link_skill_command)]
- # <link item: item_id, chance> (READY!)
- BattleInterpreter::Commands['LINK ITEM'] = [false, method(:on_link_item_command)]
- # <damage>
- BattleInterpreter::Commands['DAMAGE'] = [false, method(:on_damage_command)]
- # <move camera: target, x, y, time>
- BattleInterpreter::Commands['MOVE CAMERA'] = [false, method(:on_move_camera_command)]
- # <zoom camera: zoom, time>
- BattleInterpreter::Commands['ZOOM CAMERA'] = [false, method(:on_zoom_camera_command)]
- # <target camera: target>
- BattleInterpreter::Commands['TARGET CAMERA'] = [false, method(:on_target_camera_command)]
- # <perform collapse>
- BattleInterpreter::Commands['PERFORM COLLAPSE'] = [false, method(:on_perform_collapse_command)]
- # <abort>
- BattleInterpreter::Commands['ABORT'] = [false, method(:on_abort_command)]
- # 1.1 and bigger ===============================================================================
- # <weapon: target, x_corr, y_corr, start_angle, end_angle, time, left_hand, over>
- BattleInterpreter::Commands['WEAPON'] = [false, method(:on_weapon_command)]
- # <shield: target, x_corr, y_corr, start_angle, end_angle, time, over>
- BattleInterpreter::Commands['SHIELD'] = [false, method(:on_shield_command)]
- # <weapon ex: target, bitmap, x _corr, y_corr, frames, interval, over> (WORKS!)
- BattleInterpreter::Commands['WEAPON EX'] = [false, method(:on_weapon_ex_command)]
- # <log text: text> (WORKS!)
- BattleInterpreter::Commands['LOG TEXT'] = [false, method(:on_log_text_command)]
- # <balloon: target, balloon_id> (WORKS!)
- BattleInterpreter::Commands['BALLOON'] = [false, method(:on_balloon_command)]
- # 1.2 and bigger ===============================================================================
- # <fps: frames> (WORKS!)
- BattleInterpreter::Commands['FPS'] = [false, method(:on_fps_command)]
- # <switch: id, value> (WORKS!)
- BattleInterpreter::Commands['SWITCH'] = [false, method(:on_switch_command)]
- # <variable: id, value> (WORKS!)
- BattleInterpreter::Commands['VARIABLE'] = [false, method(:on_variable_command)]
- # <movie: name> (WORKS!)
- BattleInterpreter::Commands['MOVIE'] = [false, method(:on_movie_command)]
- # <save bgm> (WORKS!)
- BattleInterpreter::Commands['SAVE BGM'] = [false, method(:on_save_bgm_command)]
- # <replay bgm> (WORKS!)
- BattleInterpreter::Commands['REPLAY BGM'] = [false, method(:on_replay_bgm_command)]
- # <save bgs> (WORKS!)
- BattleInterpreter::Commands['SAVE BGS'] = [false, method(:on_save_bgs_command)]
- # <replay bgs> (WORKS!)
- BattleInterpreter::Commands['REPLAY BGS'] = [false, method(:on_replay_bgs_command)]
- # <play bgm: name, volume, pitch, pos> (WORKS!)
- BattleInterpreter::Commands['PLAY BGM'] = [false, method(:on_play_bgm_command)]
- # <play bgs: name, volume, pitch, pos> (WORKS!)
- BattleInterpreter::Commands['PLAY BGS'] = [false, method(:on_play_bgs_command)]
- # <play me: name, volume, pitch> (WORKS!)
- BattleInterpreter::Commands['PLAY ME'] = [false, method(:on_play_me_command)]
- # <play se: name, volume, pitch> (WORKS!)
- BattleInterpreter::Commands['PLAY SE'] = [false, method(:on_play_se_command)]
- # <stop bgm> (WORKS!)
- BattleInterpreter::Commands['STOP BGM'] = [false, method(:on_stop_bgm_command)]
- # <stop bgs> (WORKS!)
- BattleInterpreter::Commands['STOP BGS'] = [false, method(:on_stop_bgs_command)]
- # <stop me> (WORKS!)
- BattleInterpreter::Commands['STOP ME'] = [false, method(:on_stop_me_command)]
- # <stop se> (WORKS!)
- BattleInterpreter::Commands['STOP SE'] = [false, method(:on_stop_se_command)]
- # <fade bgm: time> (WORKS!)
- BattleInterpreter::Commands['FADE BGM'] = [false, method(:on_fade_bgm_command)]
- # <fade bgs: time> (WORKS!)
- BattleInterpreter::Commands['FADE BGS'] = [false, method(:on_fade_bgs_command)]
- # <fade me: time> (WORKS!)
- BattleInterpreter::Commands['FADE ME'] = [false, method(:on_fade_me_command)]
- end
- def on_pose_command(action, params)
- action.analize_battler_sprites_string(params[0], false, false).each do |i|
- i.set_pose(params[1], params[2], params[3], params[4], params[5])
- end
- end
- def on_wait_command(action, params)
- if params[0].is_a?(String) && params[0][/animation/mi]
- wait_for_battle_interpreter
- elsif params[0].is_a?(String)
- action.wait(action.eval_data(params[0]))
- else
- action.wait(params[0])
- end
- end
- def on_move_command(action, params)
- users = action.analize_battler_sprites_string(params[0], false, false)
- targets = action.analize_battler_sprites_string(params[1], true, true)
- if targets == :screen
- users.each do |i|
- i.set_movement(params[2], params[3], params[4], params[5])
- end
- elsif targets == :origin
- users.each do |i|
- corr_x = params[2]
- corr_y = params[3]
- corr_x *= -1 if i.battler.actor? && BattleConfig::InvertXCorrection
- corr_y *= -1 if i.battler.actor? && BattleConfig::InvertYCorrection
- i.set_movement(corr_x+i.original_x, corr_y+i.original_y, params[4], params[5])
- end
- else
- pos_x = 0
- pos_y = 0
- targets.each do |i|
- pos_x += i.current_x
- pos_y += i.current_y
- end
- if targets.size > 0
- pos_x /= targets.size
- pos_y /= targets.size
- else
- return
- end
- users.each do |i|
- x = pos_x
- y = pos_y
- x += i.battler.actor? && BattleConfig::InvertXCorrection ? -params[2] : params[2]
- y += i.battler.actor? && BattleConfig::InvertYCorrection ? -params[3] : params[3]
- i.set_movement(x, y, params[4], params[5])
- end
- end
- end
- def on_zoom_command(action, params)
- action.analize_battler_sprites_string(params[0], false, false).each do |i|
- i.set_zoom(params[1] / 100.0, params[2] / 100.0, params[3])
- end
- end
- def on_angle_command(action, params)
- action.analize_battler_sprites_string(params[0], false, false).each do |i|
- i.set_angle(params[1], params[2])
- end
- end
- def on_opacity_command(action, params)
- action.analize_battler_sprites_string(params[0], false, false).each do |i|
- i.set_opacity(params[1], params[2])
- end
- end
- def on_animation_command(action, params)
- animations = []
- if params[1] < 0
- if params[1] == -1
- animations.push(action.user.atk_animation_id1)
- else
- animations.push(action.user.atk_animation_id2)
- end
- elsif params[1] == 0
- id = action.item.animation_id
- if id < 1
- animations.push(action.user.atk_animation_id1)
- animations.push(action.user.atk_animation_id2)
- else
- animations.push(id)
- end
- else
- animations.push(params[1])
- end
- targets = action.analize_battler_sprites_string(params[0], false, false)
- show_animation_ex(targets, animations[0], params[2])
- if animations[1]
- wait_for_animation
- show_animation_ex(targets, animations[1], !params[2])
- end
- end
- def on_effects_command(action, params)
- end
- def on_if_command(action, params)
- check = params[0].is_a?(String) ? action.eval_data(params[0]) : params[0]
- if check
- action.insert_commands_as_next(params[1])
- end
- end
- def on_repeat_command(action, params)
- t = params[0].is_a?(String) ? action.eval_data(params[0]) : params[0]
- t.times do |i|
- action.insert_commands_as_next(params[1])
- end
- end
- def on_while_command(action, params)
- check = params[0].is_a?(String) ? action.eval_data(params[0]) : params[0]
- if check
- action.insert_commands_as_next([['END', [] ]])
- action.insert_commands_as_next(params[1])
- action.insert_commands_as_next([ ['WHILE', [ params[0] ] ] ])
- action.insert_commands_as_next(params[1])
- end
- end
- def on_afterimage_command(action, params)
- action.analize_battler_sprites_string(params[0], false, false).each do |i|
- visible = params[1] <= 0 ? false : true
- i.set_aftermages(visible, params[1], params[2])
- end
- end
- def on_mirror_command(action, params)
- targets = action.analize_battler_sprites_string(params[0], false, false)
- targets.each do |target|
- target.set_mirror_value(params[1])
- end
- end
- def on_show_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- i = params[1]
- wpns = action.user.weapons
- wpn = wpns[-i - 1] ? wpns[-i - 1] : (wpns[0] ? wpns[0] : nil)
- index = wpn ? wpn.icon_index : 0
- index = i == 0 ? action.item.icon_index : index
- bmp = i.is_a?(String) ? i : (i > 0 ? i : index)
- picture.show(bmp, params[2], params[3], params[4], params[5],
- params[6], params[7], params[8])
- end
- def on_move_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- picture.move(params[1], params[2], params[3], params[4], params[5],
- params[6], params[7], params[8])
- end
- def on_move_picture_ex_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- targets = action.analize_battler_sprites_string(params[1], false, true)
- pos_x = 0
- pos_y = 0
- if targets != :screen
- targets.each do |i|
- pos_x += i.current_x
- pos_y += i.current_y
- end
- if targets.size > 0
- pos_x /= targets.size
- pos_y /= targets.size
- else
- return
- end
- end
- pos_x += params[2]
- pos_y += params[3]
- picture.move_ex(pos_x, pos_y, params[4])
- end
- def on_zoom_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- picture.set_zoom(params[1], params[2], params[3])
- end
- def on_opacity_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- picture.set_opacity(params[1], params[2])
- end
- def on_anime_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- if params[1] < 0
- if params[1] == -1
- animation_id = action.user.atk_animation_id1
- else
- animation_id = action.user.atk_animation_id2
- end
- else
- animation_id = params[1]
- end
- picture.set_animation(animation_id, params[2])
- end
- def on_rotate_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- picture.rotate(params[1])
- end
- def on_delete_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- picture.erase
- end
- def on_tone_picture_command(action, params)
- picture = $game_troop.screen.pictures[params[0]]
- picture.start_tone_change(Tone.new(params[1], params[2], params[3],
- params[4]), params[5])
- end
- def on_ruby_script_command(action, params)
- action.eval_data(params[0])
- end
- def on_each_process_command(action, params)
- @new_targets = action.analize_target_string(params[0])
- return if @new_targets.size == 0
- @for_alive_targets = @new_targets[0] && @new_targets[0].alive?
- @for_friend_target = @new_targets[0] && @new_targets[0].actor? == action.user.actor?
- @target_size = 1
- @last_targets = action.targets
- @remove_targets = []
- comm = []
- @new_targets.each do |i|
- comm += [['TARGET CHANGE EX', [i] ]] + params[1]
- end
- action.insert_commands_as_next(comm + [['TARGET CHANGE EX', @last_targets]])
- end
- def on_target_change_special_command(action, params)
- if @collapse_checked
- params.each do |battler|
- if battler.alive? != @for_alive_targets
- params.delete(battler)
- end
- end
- if params.size <= 0
- unit = @for_friend_target ? acion.user.friend_unit : action.user.enemy_unit
- params = @for_alive_targets ? unit.alive_members : unit.dead_members
- params = params[0...@target_size].compact
- end
- @collapse_checked = false
- end
- action.targets = params
- action.linked_actions.each do |a|
- a.targets = action.targets
- end
- end
- def on_target_change_command(action, params)
- action.targets = action.analize_target_string(params[0])
- action.linked_actions.each do |a|
- a.targets = action.targets
- end
- end
- def on_end_command(action, params)
- action.loop_depth -= 1
- end
- def on_counter_check_command(action, params)
- action.pause
- action.targets.each do |target|
- if rand < target.item_cnt(action.user, action.item) && action.counter_active?
- action.abort
- invoke_counter_attack_ex(action.user, target, action.item)
- end
- end
- wait_for_battle_interpreter
- action.resume
- end
- def on_reflect_check_command(action, params)
- action.pause
- action.targets.each do |target|
- if rand < target.item_mrf(action.user, action.item)
- invoke_magic_reflection_ex(action, target)
- end
- end
- wait_for_battle_interpreter
- action.resume
- end
- def on_substitute_check_command(action, params)
- @substitutes = []
- action.pause
- action.targets.each do |target|
- apply_substitute_ex(action, target, action.item)
- end
- wait_for_battle_interpreter
- action.resume
- @substitutes.clear
- end
- def on_link_skill_command(action, params)
- result = params[1].is_a?(String) ? action.eval_data(params[1]) : params[1]
- if rand(100) < result
- if params[0] < 1
- id = action.user.attack_skill_id
- else
- id = params[0]
- end
- action.abort
- action.user.current_action.set_skill(id)
- @subject = action.user
- use_item
- end
- end
- def on_link_item_command(action, params)
- result = params[1].is_a?(String) ? action.eval_data(params[1]) : params[1]
- if rand(100) < result
- action.abort
- user.current_action.set_item(id)
- @subject = action.user
- use_item
- end
- end
- def on_damage_command(action, params)
- action.targets.each do |target|
- apply_item_effects_ex(action.user, target, action.item)
- end
- end
- def on_move_camera_command(action, params)
- target = action.analize_battler_sprites_string(params[0], false, true)
- if target == :screen
- BattleCamera.set_movement(params[1], params[2], params[3])
- else
- cx = 0
- cy = 0
- target.each do |i|
- cx += i.current_x
- cy += i.current_y
- end
- if target.size > 0
- cx /= target.size
- cy /= target.size
- end
- BattleCamera.set_movement(cx+params[1], cy+params[2], params[3])
- end
- end
- def on_zoom_camera_command(action, params)
- BattleCamera.set_zoom(params[0] / 100.0, params[1])
- end
- def on_target_camera_command(action, params)
- target = action.analize_battler_sprites_string(params[0], false, true)
- BattleCamera.set_target(target)
- end
- def on_perform_collapse_command(action, params)
- @collapse_checked = true
- action.targets.each do |target|
- if target.dead?
- if target.die_sequence?
- sequence = target.get_die_sequence
- BattleInterpreter.add_action(target, [target], sequence, nil, false)
- else
- target.perform_collapse_effect
- end
- action.targets.delete(target)
- @dead_battlers.push(target)
- @last_targets.delete(target) if @last_targets
- @remove_targets.push(target) if @remove_targets
- end
- end
- end
- def on_abort_command(action, params)
- action.abort
- end
- def on_weapon_command(action, params)
- targets = action.analize_battler_sprites_string(params[0], false, false)
- targets.each do |target|
- x = target.battler.actor? && BattleConfig::InvertXCorrection ? -params[1] : params[1]
- y = target.battler.actor? && BattleConfig::InvertYCorrection ? -params[2] : params[2]
- sa = target.battler.actor? ? 360 - params[3] : params[3]
- ea = target.battler.actor? ? 360 - params[4] : params[4]
- target.set_weapon_icon(x, y, sa, ea, params[5], params[6], params[7])
- end
- end
- def on_shield_command(action, params)
- targets = action.analize_battler_sprites_string(params[0], false, false)
- targets.each do |target|
- x = target.battler.actor? && BattleConfig::InvertXCorrection ? -params[1] : params[1]
- y = target.battler.actor? && BattleConfig::InvertYCorrection ? -params[2] : params[2]
- sa = target.battler.actor? ? 360 - params[3] : params[3]
- ea = target.battler.actor? ? 360 - params[4] : params[4]
- target.set_shield_icon(x, y, sa, ea, params[5], params[6])
- end
- end
- def on_weapon_ex_command(action, params)
- targets = action.analize_battler_sprites_string(params[0], false, false)
- targets.each do |target|
- x = target.battler.actor? && BattleConfig::InvertXCorrection ? -params[2] : params[2]
- y = target.battler.actor? && BattleConfig::InvertYCorrection ? -params[3] : params[3]
- target.set_weapon_sprite(params[1], x, y, params[4], params[5], params[6])
- end
- end
- def on_log_text_command(action, params)
- @log_window.add_text(params[0])
- end
- def on_balloon_command(action, params)
- targets = action.analize_battler_sprites_string(params[0], false, false)
- targets.each do |target|
- target.start_balloon(params[1])
- end
- end
- def on_fps_command(action, params)
- Graphics.frame_rate = params[0]
- end
- def on_switch_command(action, params)
- $game_switches[params[0]] = params[1]
- end
- def on_variable_command(action, params)
- $game_variables[params[0]] = params[1]
- end
- def on_movie_command(action, params)
- Graphics.play_movie(params[0])
- end
- def on_save_bgm_command(action, params)
- @last_bgm_played = RPG::BGM.last
- end
- def on_replay_bgm_command(action, params)
- @last_bgm_played.replay if @last_bgm_played
- @last_bgm_played = nil
- end
- def on_save_bgs_command(action, params)
- @last_bgs_played = RPG::BGS.last
- end
- def on_replay_bgs_command(action, params)
- @last_bgs_played.replay if @last_bgs_played
- @last_bgs_played = nil
- end
- def on_play_bgm_command(action, params)
- RPG::BGM.new(params[0], params[1], params[2], params[3]).play
- end
- def on_play_bgs_command(action, params)
- RPG::BGS.new(params[0], params[1], params[2], params[3]).play
- end
- def on_play_me_command(action, params)
- RPG::ME.new(params[0], params[1], params[2]).play
- end
- def on_play_se_command(action, params)
- RPG::SE.new(params[0], params[1], params[2]).play
- end
- def on_stop_bgm_command(action, params)
- Audio.bgm_stop
- end
- def on_stop_bgs_command(action, params)
- Audio.bgs_stop
- end
- def on_stop_me_command(action, params)
- Audio.me_stop
- end
- def on_stop_se_command(action, params)
- Audio.se_stop
- end
- def on_fade_bgm_command(action, params)
- Audio.bgm_fade(params[0])
- end
- def on_fade_bgs_command(action, params)
- Audio.bgs_fade(params[0])
- end
- def on_fade_me_command(action, params)
- Audio.me_fade(params[0])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement