Project1
标题:
全灭触发公共事件
[打印本页]
作者:
子弹君
时间:
2014-10-13 13:20
标题:
全灭触发公共事件
#==============================================================================
# 全灭触发公共事件 by 子弹君
#==============================================================================
# 说明:
# 可以做一个全灭之后不会gameover,而是传到某个地点。
#==============================================================================
$BombScript ||= {};$BombScript["全灭触发公共事件"] = "全灭触发公共事件20140930"
#=============================================================================
# 设定部分
#=============================================================================
module BOMB
module OR
EVENT = 1
# 设置公共事件ID(全灭之后触发的公共事件)
STH = 10
# 设置一个开关(开关开启时全灭触发公共事件)
end
end
class Scene_Map < Scene_Base
#--------------------------------------------------------------------------
# ● 更新场景消退时的过渡
#--------------------------------------------------------------------------
def update_scene
check_gameover unless $game_switches[BOMB::OR::STH]
update_transfer_player unless scene_changing?
update_encounter unless scene_changing?
update_call_menu unless scene_changing?
update_call_debug unless scene_changing?
end
end
module BattleManager
#--------------------------------------------------------------------------
# ● 全灭时的处理
#--------------------------------------------------------------------------
def self.process_defeat
$game_message.add(sprintf(Vocab::Defeat, $game_party.name))
wait_for_message
if @can_lose
revive_battle_members
replay_bgm_and_bgs
SceneManager.return
else
SceneManager.goto(Scene_Gameover) unless $game_switches[BOMB::OR::STH]
$game_temp.reserve_common_event(BOMB::OR::EVENT) if $game_switches[BOMB::OR::STH]
SceneManager.goto(Scene_Map) if $game_switches[BOMB::OR::STH]
replay_bgm_and_bgs if $game_switches[BOMB::OR::STH]
end
battle_end(2)
return true
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1