#============================================================================== # □ バトルシェイク設定 (for VX Ace) #------------------------------------------------------------------------------ # Version : 1_20111222 # by サリサ・タイクーン # http://www.tycoon812.com/rgss/ #============================================================================== #============================================================================== # □ 素材スイッチ #============================================================================== $rgsslab = {} if $rgsslab == nil $rgsslab["バトルシェイク設定"] = true if $rgsslab["バトルシェイク設定"] #============================================================================== # □ カスタマイズポイント #============================================================================== module RGSSLAB end module RGSSLAB::Battle_Shake_Setting #---------------------------------------------------------------------------- # ○ ダメージ時のシェイク使用の初期設定 # 味方がダメージを受ける時のシェイク機能の初期設定です。 # # ダメージを受けない場合は、シェイクしません。 # # ・イベントコマンドのスクリプトでの変更方法 # $game_system.rgsslab040.damage_shake = true/false #---------------------------------------------------------------------------- ACTOR = true #---------------------------------------------------------------------------- # ○ 攻撃時のシェイク使用の初期設定 # 味方が攻撃した時のシェイク機能の初期設定です。 # # ミス等をした場合は、シェイクしません。 # # ・イベントコマンドのスクリプトでの変更方法 # $game_system.rgsslab040.attack_shake = true/false #---------------------------------------------------------------------------- ENEMY = false end # カスタマイズポイントは、ここまで #============================================================================== # □ RGSSLAB::Battle_Shake_Setting [module] #============================================================================== module RGSSLAB::Battle_Shake_Setting #-------------------------------------------------------------------------- # ○ 素材設定用の定数定義 #-------------------------------------------------------------------------- MATERIAL_NAME = "バトルシェイク設定" VERSION = 1 RELEASE = 20111222 end #============================================================================== # ■ Game_System [class] #============================================================================== class Game_System #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :rgsslab040 #-------------------------------------------------------------------------- # ● オブジェクト初期化 [エイリアス] #-------------------------------------------------------------------------- alias battle_shake_initialize initialize def initialize battle_shake_initialize @rgsslab040 = RgssLab_040.new end end #============================================================================== # □ RgssLab_040 [class] #============================================================================== class RgssLab_040 #-------------------------------------------------------------------------- # ○ モジュールの設定 #-------------------------------------------------------------------------- RGSSLAB_040 = RGSSLAB::Battle_Shake_Setting #-------------------------------------------------------------------------- # ● 公開インスタンス変数 #-------------------------------------------------------------------------- attr_accessor :damage_shake attr_accessor :attack_shake #-------------------------------------------------------------------------- # ○ オブジェクト初期化 #-------------------------------------------------------------------------- def initialize @damage_shake = RGSSLAB_040::ACTOR @attack_shake = RGSSLAB_040::ENEMY end end #============================================================================== # ■ Game_Actor [class] #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● ダメージ効果の実行 [再定義] #-------------------------------------------------------------------------- def perform_damage_effect $game_troop.screen.start_shake(5, 5, 10) if $game_system.rgsslab040.damage_shake @sprite_effect_type = :blink Sound.play_actor_damage end end #============================================================================== # ■ Game_Enemy [class] #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # ● ダメージ効果の実行 [再定義] #-------------------------------------------------------------------------- def perform_damage_effect $game_troop.screen.start_shake(5, 5, 10) if $game_system.rgsslab040.attack_shake @sprite_effect_type = :blink Sound.play_enemy_damage end end end