HOME
ツクール
RGSS
テクニック
ゲーム紹介
制作中のゲーム
ダウンロード
掲示板
ブログ
EnDREss DREamERブログ
PCパーツ・ソフト通販(仮)
DIYチューンブログ
リンク
手動先制・不意打ち
コンセプト
戦闘で任意に「先制攻撃」や「不意打ち」を設定したい。
挿入位置
「▼ 素材」のすぐ下辺りに。
完成すると
戦闘前にイベントスクリプトを実行すると1回だけ指定通りの戦闘が出来る。
更新履歴
#============================================================================== # ☆VXAce RGSS3 「手動先制・不意打ち」☆ # EnDlEss DREamER # URL:http://mitsu-evo.6.ql.bz/ # 製作者 mitsu-evo # Last:2012/1/1 # 手動で「先制攻撃」や「不意打ち」を設定する。 # ▼ 「▼ 素材」に近い位置に挿入。 #============================================================================== =begin 使用方法 イベントスクリプトに「$game_party.manual_pree_surp = x」 と記入すると指定の戦闘を行う。 「x」に記入する値の一覧 0 : 通常 1: 先制 2: 不意打ち =end $ed_rgss3 = {} if $ed_rgss3 == nil $ed_rgss3["ed_pree_surp"] = true #============================================================================== # ■ BattleManager #------------------------------------------------------------------------------ # 戦闘の進行を管理するモジュールです。 #============================================================================== module BattleManager class << self #-------------------------------------------------------------------------- # ● 戦闘終了 # result : 結果(0:勝利 1:逃走 2:敗北) #-------------------------------------------------------------------------- alias ed_pree_surp_battle_end battle_end def battle_end(result) $game_party.manual_pree_surp = 0 ed_pree_surp_battle_end(result) end #-------------------------------------------------------------------------- # ● 戦闘開始 #-------------------------------------------------------------------------- alias ed_pree_surp_battle_start battle_start def battle_start case $game_party.manual_pree_surp when 1 @preemptive = true when 2 @surprise = true end ed_pree_surp_battle_start end end end #============================================================================== # ■ Game_Party #------------------------------------------------------------------------------ # パーティを扱うクラスです。所持金やアイテムなどの情報が含まれます。このクラ # スのインスタンスは $game_party で参照されます。 #============================================================================== class Game_Party < Game_Unit #-------------------------------------------------------------------------- # ● 先制攻撃と不意打ちの設定 # 0 : 通常 1: 先制 2: 不意打ち #-------------------------------------------------------------------------- def manual_pree_surp=(value) @manual_pree_surp = 0 if @manual_pree_surp == nil @manual_pree_surp = value end #-------------------------------------------------------------------------- # ● 先制攻撃と不意打ちの取得 #-------------------------------------------------------------------------- def manual_pree_surp @manual_pree_surp = 0 if @manual_pree_surp == nil return @manual_pree_surp end end
Copyright (C)
EnDlEss DREamER
. All Rights Reserved.
テンプレートのpondt
リサーチ