#============================================================================== # □ いちゃもんステート (for VX Ace) #------------------------------------------------------------------------------ # Version : 1_20120701 # by サリサ・タイクーン # http://www.tycoon812.com/rgss/ #============================================================================== #============================================================================== # □ 素材スイッチ #============================================================================== $rgsslab = {} if $rgsslab == nil $rgsslab["いちゃもんステート"] = true if $rgsslab["いちゃもんステート"] #============================================================================== # □ カスタマイズポイント #============================================================================== module RGSSLAB end module RGSSLAB::Imputation #-------------------------------------------------------------------------- # ○ 設定 # ステートID => "いちゃもん成立時の表示メッセージ", # # ↑を必要な分だけ記述して下さい。 # # 最後のカンマ(,)の付け忘れにご注意下さい。 # 最後のステートのみ、最後のカンマを省略する事もできます。 # # ステートが解除されるまでの間、同じスキルは # 連続して繰り出す事ができなくなります。 # # スキルだけが対象ですので、攻撃や防御・アイテムは例外です。 #-------------------------------------------------------------------------- IMPUTATION = { 27 => "いちゃもんを付けられている為、同じスキルを連続で実行できない!", } end # カスタマイズポイントは、ここまで #============================================================================== # □ RGSSLAB::Imputation [module] #============================================================================== module RGSSLAB::Imputation #-------------------------------------------------------------------------- # ○ 素材設定用の定数定義 #-------------------------------------------------------------------------- MATERIAL_NAME = "いちゃもんステート" VERSION = 1 RELEASE = 20120701 end #============================================================================== # □ Combined_Use_Modules [module] #============================================================================== module Combined_Use_Modules #============================================================================ # □ WHITE-FLUTE Web.(A Crying Ministerさん) #============================================================================ module WHITE_FLUTE #------------------------------------------------------------------------ # ○ イベントスキップスクリプト #------------------------------------------------------------------------ def self.event_skip return true if defined?(WFRGSS_Event_Skip) return false end end end #============================================================================== # ■ Game_Battler [class] #============================================================================== class Game_Battler < Game_BattlerBase #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_099 = RGSSLAB::Imputation #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :imputation attr_accessor :no_action_skill #-------------------------------------------------------------------------- # ● オブジェクト初期化 [エイリアス] #-------------------------------------------------------------------------- alias imputation_initialize initialize def initialize imputation_initialize @imputation = 0 @no_action_skill = false end #-------------------------------------------------------------------------- # ○ ステート [いちゃもん] 判定 #-------------------------------------------------------------------------- def imputation? flag = false for i in @states if RGSSLAB_099::IMPUTATION[$data_states[i].id] flag = true end end return flag end #-------------------------------------------------------------------------- # ○ ステート [いちゃもん] メッセージ取得 #-------------------------------------------------------------------------- def imputation_text text = "" for i in @states text = RGSSLAB_099::IMPUTATION[$data_states[i].id] end return text end end #============================================================================== # ■ Scene_Battle [class] #============================================================================== class Scene_Battle < Scene_Base #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_099 = RGSSLAB::Imputation #-------------------------------------------------------------------------- # ● 開始処理 [再定義] #-------------------------------------------------------------------------- def start super create_spriteset create_all_windows BattleManager.method_wait_for_message = method(:wait_for_message) BattleManager.method_wait_for_escape = method(:wait_for_escape) if $rgsslab["戦闘アニメーション"] @actor_face_window = Window_Battle_Actor_Face.new if $game_system.rgsslab010.visible if $rgsslab["戦闘画面アクターフェイス表示"] if $rgsslab["いちゃもんステート"] for i in $game_party.battle_members do i.no_action_skill = false end end Game_Interpreter.update_basic_set(method(:update_all_windows)) if Combined_Use_Modules::WHITE_FLUTE.event_skip end #-------------------------------------------------------------------------- # ● スキル/アイテムの効果を適用 [再定義] # target : 対象者 # item : スキル/アイテム #-------------------------------------------------------------------------- def apply_item_effects(target, item) if $rgsslab["いちゃもんステート"] imputation_process(item) if @subject.no_action_skill @subject.no_action_skill = false @log_window.add_text(@subject.imputation_text) return end end target.item_apply(@subject, item) refresh_status @log_window.display_action_results(target, item) random_remove_state(target, item) if $rgsslab["ランダムリムーブステート"] item_steal(target, item) if $rgsslab["アイテムスティール"] gold_steal(target, item) if $rgsslab["所持金スティール"] self_destruct(item) if $rgsslab["自爆"] end #-------------------------------------------------------------------------- # ○ いちゃもんステート # item : スキル/アイテム #-------------------------------------------------------------------------- def imputation_process(item) @subject.no_action_skill = false return unless @subject.imputation? if item.id == 1 or item.id == 2 or item.is_a?(RPG::Item) @subject.imputation = 0 @subject.no_action_skill = false return end if item.id == @subject.imputation @subject.imputation = 0 @subject.no_action_skill = true return end @subject.imputation = item.id @subject.no_action_skill = false end end end