class Scene_Battle
# Aliases update to run before everything else in the method
alias gameover_to_common_event update
def update
if $game_temp.gameover
# Editable region. This number below is the ID of the common event you
# wish to run. It is 1 by default, change it to suit your game.
$game_temp.common_event_id = 11
$scene = Scene_Map.new
$game_temp.gameover = false
return
end
gameover_to_common_event
end
end