module Reisen module BattleEnd # 暗雷战斗结束时候, 启动公共事件的开关 ID BattleEndSwitchID = 1 # 上面这个开关打开时, 调用的公共事件 ID BattleEndCommandEvent = 1 # 战斗结束时, 战斗结果保存的变量 ID BattleEndResultVariableID = 1 end end class Scene_Battle < Scene_Base def battle_end(result) $game_variables[Reisen::BattleEnd::BattleEndResultVariableID] = result if result == 2 and not $game_troop.can_lose if $game_switches[Reisen::BattleEnd::BattleEndSwitchID] $game_temp.common_event_id = Reisen::BattleEnd::BattleEndCommandEvent $scene = Scene_Map.new @message_window.clear Graphics.fadeout(30) else call_gameover end 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 $game_temp.map_bgm.play $game_temp.map_bgs.play end $scene = Scene_Map.new @message_window.clear Graphics.fadeout(30) end $game_temp.in_battle = false end end
module Reisen
module BattleEnd
# 暗雷战斗结束时候, 启动公共事件的开关 ID
BattleEndSwitchID = 1
# 上面这个开关打开时, 调用的公共事件 ID
BattleEndCommandEvent = 1
# 战斗结束时, 战斗结果保存的变量 ID
BattleEndResultVariableID = 1
end
end
class Scene_Battle < Scene_Base
def battle_end(result)
$game_variables[Reisen::BattleEnd::BattleEndResultVariableID] = result
if result == 2 and not $game_troop.can_lose
if $game_switches[Reisen::BattleEnd::BattleEndSwitchID]
$game_temp.common_event_id = Reisen::BattleEnd::BattleEndCommandEvent
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(30)
else
call_gameover
end
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
$game_temp.map_bgm.play
$game_temp.map_bgs.play
end
$scene = Scene_Map.new
@message_window.clear
Graphics.fadeout(30)
end
$game_temp.in_battle = false
end
end
|