#============================================================================== # ■ VX-RGSS2-6 サイドビュー戦闘[Formation] [Ver.1.2.0] by Claimh #------------------------------------------------------------------------------ # アクターの位置(陣形)です。 # アクターの位置によるダメージの増減はありません。 #============================================================================== module Battle_Formation #------------------------------------------------------------------------------ # [陣形設定] # $game_system.battle_formation = 陣形ID # で陣形を変更可能(イベントスクリプトでも可) FORM = { # 陣形ID => [[メンバー1のx、y], [メンバー2のx, y], # [メンバー3のx, y], [メンバー4のx, y]] 0 => [[380,150], [400, 230], [460, 170], [480, 250]] } #------------------------------------------------------------------------------ end #============================================================================== # ■ Game_System #============================================================================== class Game_System attr_accessor :battle_formation # 陣形ID #-------------------------------------------------------------------------- # ● オブジェクト初期化 #-------------------------------------------------------------------------- alias init_game_system initialize def initialize init_game_system @battle_formation = 0 # 初期陣形 end end #============================================================================== # ■ Game_Actor #============================================================================== class Game_Actor < Game_Battler #-------------------------------------------------------------------------- # ● スプライトを使うか? [再定義] #-------------------------------------------------------------------------- def use_sprite? return true end #-------------------------------------------------------------------------- # ● バトル画面 X 座標の取得 #-------------------------------------------------------------------------- def screen_x return Battle_Formation::FORM[$game_system.battle_formation][self.index][0] end #-------------------------------------------------------------------------- # ● バトル画面 Y 座標の取得 #-------------------------------------------------------------------------- def screen_y return Battle_Formation::FORM[$game_system.battle_formation][self.index][1] end #-------------------------------------------------------------------------- # ● バトル画面 Z 座標の取得 #-------------------------------------------------------------------------- def screen_z bitmap = Cache.character(self.character_name) # 高さ+Y 座標 return screen_y + bitmap.height / 4 end end #============================================================================== # ■ Game_Enemy #============================================================================== class Game_Enemy < Game_Battler #-------------------------------------------------------------------------- # ● バトル画面 Z 座標の取得 [再定義] #-------------------------------------------------------------------------- def screen_z bitmap = Cache.battler(self.battler_name, self.battler_hue) # 高さ+Y 座標 return screen_y + bitmap.height end end