#==============================================================================
# キラーズアトラクトin VX Ace By 貪藻矢射妥←
#------------------------------------------------------------------------------
# セブンスドラゴンシリーズにあるアレです。
#
# ※実質はマップでのエンカウント処理のパクリ・・・
#
#==============================================================================
# 変更点
# まだなし
module KILLERS_ATTRACT
# キラーズアトラクト用スキルID
KA_SKILL_ID = 154
end
class Scene_Skill < Scene_ItemBase
#--------------------------------------------------------------------------
# ● アイテムの使用
#--------------------------------------------------------------------------
def use_item
if item.is_a?(RPG::Skill) && item.id == KILLERS_ATTRACT::KA_SKILL_ID
#none
else
play_se_for_item
end
user.use_item(item)
use_item_to_actors
check_common_event
check_gameover
# キラーズアトラクト判定
if item.is_a?(RPG::Skill) && item.id == KILLERS_ATTRACT::KA_SKILL_ID
check_killers_attract
end
@actor_window.refresh
end
#--------------------------------------------------------------------------
# ● キラーズアトラクト予約判定
# キラーズアトラクトの呼び出しが予約されているならマップ画面へ遷移する。
#--------------------------------------------------------------------------
def check_killers_attract
bzz_flg = false
#msgbox item.id
troop_id = $game_player.make_encounter_troop_id # 敵グループを決定
if $game_map.interpreter.running? # イベント実行中?
bzz_flg = true
end
if $game_system.encounter_disabled # エンカウント禁止中?
bzz_flg = true
end
if $data_troops[troop_id] == nil # 敵グループが無効?
bzz_flg = true
end
if bzz_flg
# ブザー SE を演奏
Sound.play_buzzer
else
play_se_for_item
BattleManager.setup(troop_id)
BattleManager.on_encounter
Graphics.update
Graphics.freeze
BattleManager.save_bgm_and_bgs
BattleManager.play_battle_bgm
Sound.play_battle_start
SceneManager.call(Scene_Battle)
end
end
end
|