#==============================================================================
# ** Make BGM unchange 1.01 by ERZENGEL <
erzvx@live.de>
#==============================================================================
DURING = 9 # if the switch with ID 9 is on the BGM won't change at the battle
#==============================================================================
# ** Scene_Map
#------------------------------------------------------------------------------
# This class performs the map screen processing.
#==============================================================================
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# * Switch to Battle Screen
#--------------------------------------------------------------------------
def call_battle
unless $game_switches[DURING]
@spriteset.update
Graphics.update
$game_player.make_encounter_count
$game_player.straighten
$game_
temp.map_bgm = RPG::BGM.last
$game_
temp.map_bgs = RPG::BGS.last
RPG::BGM.stop
RPG::BGS.stop
Sound.play_battle_start
$game_system.battle_
bgm.play $game_
temp.next_scene = nil
$scene = Scene_
Battle.new else
@spriteset.update
Graphics.update
$game_player.make_encounter_count
$game_player.straighten
Sound.play_battle_start
$game_
temp.next_scene = nil
$scene = Scene_
Battle.new end
end
end
#==============================================================================
# ** Scene_Battle
#------------------------------------------------------------------------------
# This class performs battle screen processing.
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# * End Battle
# result : Results (0: win, 1: escape, 2:lose)
#--------------------------------------------------------------------------
def battle_end(result)
if result == 2 and not $game_troop.can_lose
call_gameover
else
$game_party.clear_actions
$game_party.remove_states_battle
$game_troop.clear
if $game_temp.battle_proc != nil
$game_temp.battle_
proc.call(result)
$game_temp.battle_proc = nil
end
unless $BTEST
unless $game_switches[DURING]
$game_
temp.map_
bgm.play $game_
temp.map_
bgs.play end
end
$scene = Scene_
Map.new @message_window.clear
Graphics.fadeout(30)
end
$game_
temp.in_battle = false
end
#--------------------------------------------------------------------------
# * Victory Processing
#--------------------------------------------------------------------------
def process_victory
unless $game_switches[DURING]
@info_viewport.visible = false
@message_window.visible = true
RPG::BGM.stop
$game_system.battle_end_me.play
unless $BTEST
$game_
temp.map_
bgm.play $game_
temp.map_
bgs.play end
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
else
@info_viewport.visible = false
@message_window.visible = true
display_exp_and_gold
display_drop_items
display_level_up
battle_end(0)
end
end
end