赞 | 0 |
VIP | 0 |
好人卡 | 2 |
积分 | 0 |
经验 | 713 |
最后登录 | 2012-2-15 |
在线时间 | 678 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 48
- 在线时间
- 678 小时
- 注册时间
- 2010-8-11
- 帖子
- 1533
|
RT……等扣吧=_,=
最终幻想的战斗系统么……我最近找到了一个……
不过还没有试过……自己拿去用吧……- #==============================================================================
- # ?VX RGSS2 「バトルウィンドウ変更:FF風表示」?
- # EnDlEss DREamER
- # URL:http://eiennoyumeni.hp.infoseek.co.jp/index.htm
- # 製作者 mitsu-evo
- # Last:2011/8/4
- # 戦闘ウィンドウの配置をFFっぽくする。
- # ▼ 「バトルレイアウト変更」よりも下で「MAIN」近く。
- #==============================================================================
- $ed_rgss2 = {} if $ed_rgss2 == nil
- $ed_rgss2["ed_battle_scene_ff_edit"] = true
- $imported = {} if $imported == nil
- =begin
- 8/4:MM風パーティーシステムに対応修正。
- ★ 概要 ★
-
- ・戦闘ウィンドウ表示関係などを「FF風」に変更するスクリプトです。
- これにより「表情変化」の機能は失われます。
- ・バトルレイアウト変更併用時は「サイドビュー」限定です。
- フロントビューには対応しません。
- ・「ダメージポップアップ」の「FF_MASSAGE_SYSTEM」を「true」
- 「通常攻撃回数システム」「アローカーソル」
- 「バトルレイアウト変更」のサイドビューにすると
- 結構「FFっぽく」なります。
-
- ★ 仕様 ★
-
- ・バトルレイアウト変更とダメージポップアップを導入すると
- メッセージウィンドウがイベント実行による文章表示以外
- 一切表示されなくなります。
- ・このスクリプト単体を導入の場合は、画面上部に透明ウィンドウで
- バトルメッセージが表示されます。
- ・状態異常は回復魔法など「対象アクター選択時」に状態変化が
- 「順番に表示」されます。
- 待っていれば掛かってるステート全部確認可能です。
- ・簡易ATBシステム導入時はバトルステータスのMP表示部がATBゲージになります。
-
- =end
- module ED
-
- # 戦闘中のウィンドウ内フォントサイズ
- BATTLE_FONT_SIZE = 14
- # 戦闘中の行の高さ基準値 (Window Line Height)
- BATTLE_WLH = 18
-
- end
-
- #==============================================================================
- # ■ Window_Help
- #------------------------------------------------------------------------------
- # スキルやアイテムの説明、アクターのステータスなどを表示するウィンドウです。
- #==============================================================================
- class Window_Help < Window_Base
- WLH = ED::BATTLE_WLH
- #--------------------------------------------------------------------------
- # ● テキスト設定
- #--------------------------------------------------------------------------
- def set_mp_text(obj, cost, mp, maxmp, align = 0)
- if obj != @obj or align != @align
- create_contents
- text_mp = mp.to_s + " / " + maxmp.to_s
- cost_str = "消費" + Vocab.mp
- self.contents.clear
- self.contents.font.color = normal_color
- self.contents.font.size = ED::BATTLE_FONT_SIZE
- self.contents.draw_text(4, 0, self.width - 40, WLH, text_mp, align)
- self.contents.draw_text(4, WLH + 8, self.width - 40, WLH, cost_str, align)
- self.contents.draw_text(4, (WLH + 8) * 2, self.width - 40, WLH, cost.to_s, align)
- @obj = obj
- @align = align
- end
- end
- end
- #==============================================================================
- # ■ Window_PartyCommand
- #------------------------------------------------------------------------------
- # バトル画面で、戦うか逃げるかを選択するウィンドウです。
- #==============================================================================
- class Window_PartyCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- s1 = Vocab::fight
- s2 = Vocab::escape
- super(128, [s1, s2], 1, 4)
- draw_item(0, true)
- draw_item(1, $game_troop.can_escape)
- self.active = false
- end
- end
- #==============================================================================
- # ■ Window_ActorCommand
- #------------------------------------------------------------------------------
- # バトル画面で、戦うか逃げるかを選択するウィンドウです。
- #==============================================================================
- class Window_ActorCommand < Window_Command
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(128, [], 1, 4)
- self.active = false
- end
- end
- #==============================================================================
- # ■ Window_Skill_FF
- #------------------------------------------------------------------------------
- # 戦闘画面スキルをFF風に変更したクラスです。
- #==============================================================================
- class Window_Skill_FF < Window_Skill
- WLH = ED::BATTLE_WLH
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- # x : ウィンドウの X 座標
- # y : ウィンドウの Y 座標
- # width : ウィンドウの幅
- # height : ウィンドウの高さ
- # actor : アクター
- #--------------------------------------------------------------------------
- def initialize(x, y, width, height, actor)
- super(x, y, width, height, actor)
- @actor = actor
- @column_max = 3
- @spacing = 8
- self.index = 0
- refresh
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- # index : 項目番号
- #--------------------------------------------------------------------------
- def draw_item(index)
- rect = item_rect(index)
- self.contents.clear_rect(rect)
- self.contents.font.size = ED::BATTLE_FONT_SIZE
- skill = @data[index]
- if skill != nil
- rect.width -= 4
- enabled = @actor.skill_can_use?(skill)
- draw_item_name(skill, rect.x, rect.y, enabled)
- end
- end
- #--------------------------------------------------------------------------
- # ● ヘルプテキスト更新
- #--------------------------------------------------------------------------
- def update_help
- return if skill == nil
- cost = skill.mp_cost
- mp = @actor.mp
- maxmp = @actor.maxmp
- @help_window.set_mp_text(skill, cost, mp, maxmp, 1)
- end
- #--------------------------------------------------------------------------
- # ● スキルの取得
- #--------------------------------------------------------------------------
- def skill
- return @data[self.index]
- end
- if $ed_rgss2["ed_weapon_command"]
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- @weapons = @actor.battle_weapons
- if @actor.select_weapon != nil and @actor.select_weapon != 999
- @used_weapon = @weapons[@actor.select_weapon]
- end
- if @actor.select_weapon != 999
- @data = []
- for skill in @actor.skills
- skill_elements = skill.element_set
- weapon_elements = @used_weapon == nil ? [1] : @used_weapon.element_set
- if weapon_elements == []
- element = nil
- else
- element = weapon_elements - skill_elements
- end
- if $imported["HiddenSkill"] == true
- next unless include?(skill)
- end
- @data.push(skill) if element == []
- if skill.id == @actor.last_skill_id
- self.index = @data.size - 1
- else
- self.index = 0
- end
- end
- else #@actor.select_weapon == 999
- @data = []
- for skill in @actor.skills
- if $imported["HiddenSkill"] == true
- next unless include?(skill)
- end
- @data.push(skill)
- if skill.id == @actor.last_skill_id
- self.index = @data.size - 1
- end
- end
- end
- @item_max = @data.size
- create_contents
- for i in 0...@item_max
- draw_item(i)
- end
- end
- if $ed_rgss2["ed_weapon_count"]
- #--------------------------------------------------------------------------
- # ● アイテム名の描画
- # item : アイテム (スキル、武器、防具でも可)
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # enabled : 有効フラグ。false のとき半透明で描画
- #--------------------------------------------------------------------------
- def draw_item_name(item, x, y, enabled = true)
- if item != nil
- draw_icon(item.icon_index, x, y, enabled)
- # アイテム以外
- if item.is_a?(RPG::Weapon) or item.is_a?(RPG::Armor)
- # アイテムの文字と設定文字がそれぞれ同じなら分岐
- if item.equip_state[2] == Vocab::Equip_Damage
- # 破損
- self.contents.font.color = crisis_color
- elsif item.equip_state[2] == Vocab::Equip_Break
- # 大破
- self.contents.font.color = knockout_color
- else
- # 正常
- self.contents.font.color = normal_color
- end
- end
- self.contents.font.color.alpha = enabled ? 255 : 128
- self.contents.draw_text(x + 24, y, 172, WLH, item.name)
- end
- end
- end
- if $imported["CategorizeSkill"]
- #--------------------------------------------------------------------------
- # ○ スキルをリストに含めるかどうか
- # skill : スキル
- #--------------------------------------------------------------------------
- def include?(skill)
- super(skill)
- end
- elsif $imported["HiddenSkill"]
- #--------------------------------------------------------------------------
- # ○ スキルをリストに含めるかどうか
- # skill : スキル
- #--------------------------------------------------------------------------
- unless $@
- alias include_KGC_HiddenSkill? include? if method_defined?(:include?)
- end
- def include?(skill)
- super(skill)
- end
- end
- end#$ed_rgss2["ed_weapon_command"]
- end
- #==============================================================================
- # ■ Window_TargetEnemy
- #------------------------------------------------------------------------------
- # バトル画面で、行動対象の敵キャラを選択するウィンドウです。
- #==============================================================================
- class Window_TargetEnemy < Window_Command
- WLH = ED::BATTLE_WLH
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- commands = []
- @enemies = []
- names = $game_troop.enemy_names
- counts = []
- name = ""
- old_name = ""
- i = 0
- for enemy in $game_troop.members
- next unless enemy.exist?
- @enemies.push(enemy)
- name = enemy.original_name
- if name != old_name
- counts << i unless old_name == ""
- a = i
- i = 0 unless old_name == ""
- end
- old_name = enemy.original_name
- i += 1
- end
- counts << i if i > 0
- counts << a if i == 0
- for i in 0...names.size
- if counts[i] > 1
- commands.push(names[i] + " " + counts[i].to_s)
- else
- commands.push(names[i])
- end
- end
- super(240, commands, 1, 0, 8)
- self.x = 0
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- commands = []
- names = $game_troop.enemy_names
- counts = []
- name = ""
- old_name = ""
- i = 0
- for enemy in $game_troop.members
- next unless enemy.exist?
- name = enemy.original_name
- if name != old_name
- counts << i unless old_name == ""
- a = i
- i = 0 unless old_name == ""
- end
- old_name = enemy.original_name
- i += 1
- end
- counts << i if i > 0
- counts << a if i == 0
- for i in 0...names.size
- if counts[i] > 1
- commands.push(names[i] + " " + counts[i].to_s)
- else
- commands.push(names[i])
- end
- end
- @commands = commands
- @item_max = commands.size
- for i in 0...@item_max
- draw_item(i)
- end
- end
- #--------------------------------------------------------------------------
- # ● カーソルを下に移動
- # wrap : ラップアラウンド許可
- #--------------------------------------------------------------------------
- def cursor_down(wrap = false)
- if (@index >= @column_max) or (wrap and @column_max == 1)
- @index = (@index - @column_max + @item_max) % @item_max
- end
- end
- #--------------------------------------------------------------------------
- # ● カーソルを上に移動
- # wrap : ラップアラウンド許可
- #--------------------------------------------------------------------------
- def cursor_up(wrap = false)
- if (@index < @item_max - @column_max) or (wrap and @column_max == 1)
- @index = (@index + @column_max) % @item_max
- end
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- # index : 項目番号
- # enabled : 有効フラグ。false のとき半透明で描画
- #--------------------------------------------------------------------------
- def draw_item(index, enabled = true)
- self.contents.font.size = ED::BATTLE_FONT_SIZE
- super(index, enabled)
- end
- end
- #==============================================================================
- # ■ Window_BattleMessage
- #------------------------------------------------------------------------------
- # 戦闘中に表示するメッセージウィンドウです。通常のメッセージウィンドウの機能
- # に加え、戦闘進行のナレーションを表示する機能を持ちます。
- #==============================================================================
- class Window_BattleMessage < Window_Message
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super
- self.openness = 255
- #戦闘中のウィンドウの透明度
- self.opacity = $ed_rgss2["ed_battle_scene"] ? 255 : 0
- self.y = $ed_rgss2["ed_battle_scene"] ? 288 : 0
- @w_opacity = 0
- @fast_battle_mode = false #高速化設定
- @all_texts = [] #高速化用一斉表示文章
- @lines = []
- refresh
- end
- end
- #==============================================================================
- # ■ Window_BattleState_FF
- #------------------------------------------------------------------------------
- # バトル画面でパーティメンバーの状態変化を表示するウィンドウです。
- #==============================================================================
- class Window_BattleState_FF < Window_Selectable
- WLH = ED::BATTLE_WLH
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(40, 0, 200, 128)
- @now_count = 0
- @count = 0
- @indicate_name = []
- refresh
- self.active = false
- end
- #--------------------------------------------------------------------------
- # ● 解放
- #--------------------------------------------------------------------------
- def dispose
- super
- end
- #--------------------------------------------------------------------------
- # ● 現在のプレイ時間
- #--------------------------------------------------------------------------
- def now_count
- return @now_count = Graphics.frame_count# / Graphics.frame_rate
- end
- #--------------------------------------------------------------------------
- # ● リフレッシュ
- #--------------------------------------------------------------------------
- def refresh
- # 通常
- self.contents.clear
- @item_max = $game_party.members.size
- for i in 0...@item_max
- draw_item(i)
- end
- end
- #--------------------------------------------------------------------------
- # ● ステートの描画
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # width : 描画先の幅
- #--------------------------------------------------------------------------
- def draw_actor_state_name(actor, x, y, width = 96)
- # 現在秒数-このメソッドが実行された時の秒
- count = (now_count - @count) / Graphics.frame_rate
- if count > 0
- # 1秒後の更新
- return if actor.states == []
- @count = Graphics.frame_count
- max = actor.states.size - 1
- # アクター個別にステート表示パターンをnilなら代入
- @indicate_name[actor.id] = 0 if @indicate_name[actor.id] == nil
- state = actor.states[@indicate_name[actor.id]]
- self.contents.font.size = ED::BATTLE_FONT_SIZE
- self.contents.font.color = normal_color
- self.contents.draw_text(x, y, width, WLH, state.name)
- # パターン加算
- @indicate_name[actor.id] += 1
- # アクターステート配列最大数よりも大きい場合は初期化。
- @indicate_name[actor.id] = 0 if @indicate_name[actor.id] > max
- else
- # 1秒経過するまでの描画
- return if actor.states == []
- # アクター個別にステート表示パターンをnilなら代入
- @indicate_name[actor.id] = 0 if @indicate_name[actor.id] == nil
- state = actor.states[@indicate_name[actor.id]]
- self.contents.font.size = ED::BATTLE_FONT_SIZE
- self.contents.font.color = normal_color
- self.contents.draw_text(x, y, width, WLH, state.name)
- end
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- # index : 項目番号
- #--------------------------------------------------------------------------
- def draw_item(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.font.color = normal_color
- actor = $game_party.members[index]
- draw_actor_state_name(actor, 4, rect.y,120)
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- def update
- refresh
- super
- end
- end
- #==============================================================================
- # ■ Window_BattleStatus
- #------------------------------------------------------------------------------
- # バトル画面でパーティメンバーのステータスを表示するウィンドウです。
- #==============================================================================
- class Window_BattleStatus < Window_Selectable
- WLH = ED::BATTLE_WLH
- #--------------------------------------------------------------------------
- # ● オブジェクト初期化
- #--------------------------------------------------------------------------
- def initialize
- super(240, 0, 304, 128)
- self.contents.font.size = ED::BATTLE_FONT_SIZE
- refresh
- self.active = false
- end
- #--------------------------------------------------------------------------
- # ● 名前の描画
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- #--------------------------------------------------------------------------
- def draw_actor_name(actor, x, y)
- if $imported["OverDrive"]
- draw_actor_od_gauge(actor, x, y, 90)
- end
- self.contents.font.color = hp_color(actor)
- self.contents.draw_text(x, y, 90, WLH, actor.name)
- end
- #--------------------------------------------------------------------------
- # ● HP の描画
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # width : 幅
- #--------------------------------------------------------------------------
- def draw_actor_hp(actor, x, y, width = 120)
- self.contents.font.color = hp_color(actor)
- self.contents.draw_text(x, y, width, WLH, actor.hp, 2)
- end
- #--------------------------------------------------------------------------
- # ● MP の描画
- # actor : アクター
- # x : 描画先 X 座標
- # y : 描画先 Y 座標
- # width : 幅
- #--------------------------------------------------------------------------
- def draw_actor_mp(actor, x, y, width = 120)
- self.contents.font.color = mp_color(actor)
- self.contents.draw_text(x, y, width, WLH, actor.mp, 2)
- end
- #--------------------------------------------------------------------------
- # ● 項目の描画
- # index : 項目番号
- #--------------------------------------------------------------------------
- def draw_item(index)
- rect = item_rect(index)
- rect.x += 4
- rect.width -= 8
- self.contents.clear_rect(rect)
- self.contents.font.color = normal_color
- self.contents.font.size = ED::BATTLE_FONT_SIZE
- actor = $game_party.members[index]
- draw_actor_name(actor, 4, rect.y)
- #draw_actor_state(actor, 114, rect.y, 48)
- draw_actor_hp(actor, 80, rect.y, 90)
-
- draw_atb_gauge(actor, 190, rect.y - 8, 70) if $ed_rgss2["ed_active_time_battle"]
- draw_actor_mp(actor, 175, rect.y, 90) unless $ed_rgss2["ed_active_time_battle"]
- #draw_actor_mp(actor, 310, rect.y, 70)
- end
- #--------------------------------------------------------------------------
- # ● 顔グラのスプライト作成
- #--------------------------------------------------------------------------
- def create_face_sprite
-
- end
- #--------------------------------------------------------------------------
- # ● 顔グラのスプライトの解放
- #--------------------------------------------------------------------------
- def dispose_face_sprite
-
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- def update
- super
- end
- #--------------------------------------------------------------------------
- # ● カーソル
- #--------------------------------------------------------------------------
- def update_cursor
- super
- end
- #--------------------------------------------------------------------------
- # ● カーソルを右に移動
- # wrap : ラップアラウンド許可
- #--------------------------------------------------------------------------
- def cursor_right(wrap = false)
- super
- end
- #--------------------------------------------------------------------------
- # ● カーソルを左に移動
- # wrap : ラップアラウンド許可
- #--------------------------------------------------------------------------
- def cursor_left(wrap = false)
- super
- end
- #--------------------------------------------------------------------------
- # ● 顔グラのX座標(アクターコマンド表示用)
- #--------------------------------------------------------------------------
- def face_x
- return 112
- end
- end
- #==============================================================================
- # ■ Scene_Battle
- #------------------------------------------------------------------------------
- # バトル画面の処理を行うクラスです。
- #==============================================================================
- class Scene_Battle < Scene_Base
- #--------------------------------------------------------------------------
- # ● 基本更新処理
- # main : メインの update メソッドからの呼び出し
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_update_basic update_basic
- def update_basic(main = false)
- ed_battle_scene_ff_edit_update_basic(main)
- if $ed_rgss2["ed_damage_popup"] and FF_MASSAGE_SYSTEM
- unless $game_message.texts == []
- @message_window.visible = true
- else
- @message_window.visible = false if $ed_rgss2["ed_battle_scene"]
- end
- end
- end
- #--------------------------------------------------------------------------
- # ● 開始後処理
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_battle_post_start post_start
- def post_start
- ed_battle_scene_ff_edit_battle_post_start
- # 簡易ATBでのメッセージウィンドウ設定を無効化
- @message_window.y = $ed_rgss2["ed_battle_scene"] ? 288 : 0
- @message_window.opacity = $ed_rgss2["ed_battle_scene"] ? 255 : 0
- @message_window.visible = false
- end
- #--------------------------------------------------------------------------
- # ● 戦闘開始の処理
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_process_battle_start process_battle_start
- def process_battle_start
- # 簡易ATBでのメッセージウィンドウ設定を無効化
- @message_window.y = 288
- @message_window.opacity = 255
- ed_battle_scene_ff_edit_process_battle_start
- end
- #--------------------------------------------------------------------------
- # ● パーティコマンド選択の開始
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_start_party_command_selection start_party_command_selection
- def start_party_command_selection
- @party_command_window.visible = true
- @party_command_window.x = 112
- @party_command_window.active = true
- ed_battle_scene_ff_edit_start_party_command_selection
- end
- #--------------------------------------------------------------------------
- # ● アクターコマンド選択の開始
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_start_actor_command_selection start_actor_command_selection
- def start_actor_command_selection
- ed_battle_scene_ff_edit_start_actor_command_selection
- @party_command_window.visible = false
- @actor_command_window.x = 112
- @actor_command_window.visible = true
- end
- #--------------------------------------------------------------------------
- # ● 対象敵キャラ選択の開始
- #--------------------------------------------------------------------------
- def start_target_enemy_selection
- @target_enemy_window.active = true
- @target_enemy_window.z = 200
- @actor_command_window.active = false
- @actor_command_window.visible = false
- end
- #--------------------------------------------------------------------------
- # ● 対象敵キャラ選択の終了
- #--------------------------------------------------------------------------
- def end_target_enemy_selection
- @target_enemy_window.active = false
- @target_enemy_window.z = 100
- if @actor_command_window.index == 0
- @actor_command_window.active = true
- @actor_command_window.visible = true
- end
- end
- #--------------------------------------------------------------------------
- # ● 対象アクター対象選択の開始
- #--------------------------------------------------------------------------
- def start_target_actor_selection
- @target_actor_states_window = Window_BattleState_FF.new
- @target_actor_states_window.y = @info_viewport.rect.y
-
- @target_actor_window = Window_BattleStatus.new
- @target_actor_window.index = 0
- @target_actor_window.active = true
- @target_actor_window.y = @info_viewport.rect.y
-
- @actor_command_window.active = false
- end
- #--------------------------------------------------------------------------
- # ● 対象アクター選択の終了
- #--------------------------------------------------------------------------
- def end_target_actor_selection
- @target_actor_states_window.dispose
- @target_actor_states_window = nil
- @target_actor_window.dispose
- @target_actor_window = nil
- end
- #--------------------------------------------------------------------------
- # ● 対象アクター選択の更新
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_update_target_actor_selection update_target_actor_selection
- def update_target_actor_selection
- @target_actor_states_window.update
- ed_battle_scene_ff_edit_update_target_actor_selection
- end
- #--------------------------------------------------------------------------
- # ● スキル選択の開始
- #--------------------------------------------------------------------------
- def start_skill_selection
- # ウィンドウ位置を変更
- @help_window = Window_Help.new
- @help_window.viewport = @info_viewport
- @help_window.x = 416
- @help_window.y = 0
- @help_window.z = 105
- @help_window.width = 128
- @help_window.height = 128
-
- @skill_window = Window_Skill_FF.new(0, 0, 416, 128, @active_battler)
- @skill_window.viewport = @info_viewport
- @skill_window.z = 105
- @skill_window.help_window = @help_window
- @skill_window.active = true
- @skill_window.visible = true
- @actor_command_window.active = false
- @actor_command_window.visible = false
- end
- #--------------------------------------------------------------------------
- # ● スキル選択の終了
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_end_skill_selection end_skill_selection
- def end_skill_selection
- ed_battle_scene_ff_edit_end_skill_selection
- if $ed_rgss2["ed_weapon_command"]
- if @weapon_command_window == nil
- @actor_command_window.active = true if @actor_command_window != nil
- @actor_command_window.visible = true if @actor_command_window != nil
- else
- @actor_command_window.active = false
- @weapon_command_window.active = true if @weapon_command_window != nil
- end
- else
- @actor_command_window.active = true
- @actor_command_window.visible = true
- end
- end
- #--------------------------------------------------------------------------
- # ● アイテム選択の開始
- #--------------------------------------------------------------------------
- def start_item_selection
- @help_window = Window_Help.new
- @help_window.x = 0
- @help_window.y = 416 - 128 - @help_window.height
- @item_window = Window_Item.new(0, 0, 544, 128)
- @item_window.viewport = @info_viewport
- @item_window.z = 105
- @item_window.help_window = @help_window
- @actor_command_window.active = false
- @actor_command_window.visible = false
- end
- #--------------------------------------------------------------------------
- # ● アイテム選択の終了
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_end_item_selection end_item_selection
- def end_item_selection
- ed_battle_scene_ff_edit_end_item_selection
- @actor_command_window.active = true
- @actor_command_window.visible = true
- end
- #--------------------------------------------------------------------------
- # ● 武器コマンド選択の開始
- #--------------------------------------------------------------------------
- def start_weapon_command_selection
- #if $game_temp.in_battle and @actor_command_window.active
- @actor_command_window.active = false
- @weapon_command_window = Window_Battle_Weapon.new(0,0,240,128,@active_battler)
- @weapon_command_window.viewport = @info_viewport
- @weapon_command_window.z = 103
- @weapon_command_window.visible = true
- @weapon_command_window.active = true
- @weapon_command_window.index = 0
- select_weapon
- #end
- end
- #--------------------------------------------------------------------------
- # ● 武器コマンド選択の終了
- #--------------------------------------------------------------------------
- def end_weapon_command_selection
- if @weapon_command_window != nil
- @weapon_command_window.dispose
- @weapon_command_window = nil
- @index = 0
- end
- if @actor_command_window.index == 0
- @actor_command_window.active = true
- @actor_command_window.visible = true
- end
- end
- #--------------------------------------------------------------------------
- # ● 情報表示ビューポートの作成
- #--------------------------------------------------------------------------
- def create_info_viewport
- if $ed_rgss2["ed_damage_popup"] and FF_MASSAGE_SYSTEM
- @message_window.visible = false
- end
- @info_viewport = Viewport.new(0, 288, 544, 128)
- @info_viewport.z = 100
- @status_window = Window_BattleStatus.new
- @party_command_window = Window_PartyCommand.new
- @actor_command_window = Window_ActorCommand.new
- @status_window.viewport = @info_viewport
- @party_command_window.viewport = @info_viewport
- @actor_command_window.viewport = @info_viewport
- #@status_window.x = 128
- @actor_command_window.x = 544
- @status_window.viewport = @info_viewport
- @party_command_window.x = 112
- @party_command_window.y = 0
- @party_command_window.z = 102
- @actor_command_window.x = 112
- @actor_command_window.y = 0
- @actor_command_window.z = 101
- @actor_command_window.visible = false
- @party_command_window.visible = false
-
- if $ed_rgss2["ed_arrow_cursor"]
- @target_enemy_name_window = Window_TargetEnemy.new
- @target_enemy_name_window.viewport = @info_viewport
- @target_enemy_name_window.x = 0
- @target_enemy_name_window.y = 0#@info_viewport.rect.y
- @target_enemy_name_window.height = 128
- #@target_enemy_window.z = 100
- @target_enemy_name_window.visible = true
- @target_enemy_name_window.active = false
- else
- @target_enemy_window = Window_TargetEnemy.new
- @target_enemy_window.viewport = @info_viewport
- @target_enemy_window.x = 0
- @target_enemy_window.y = 0#@info_viewport.rect.y
- @target_enemy_window.height = 128
- #@target_enemy_window.z = 100
- @target_enemy_window.visible = true
- @target_enemy_window.active = false
- end
-
- if $ed_rgss2["ed_mm_party_system"]
- create_side_actor_command
- end
-
- @info_viewport.visible = true
- wait(1)
- end
- #--------------------------------------------------------------------------
- # ● 情報表示ビューポートの更新
- #--------------------------------------------------------------------------
- def update_info_viewport
- if $ed_rgss2["ed_mm_party_system"]
- @side_actor_command.update if @side_window
- end
- unless @target_enemy_window == nil
- @target_enemy_window.update
- end
- unless @party_command_window == nil
- @party_command_window.update
- end
- unless @actor_command_window == nil
- @actor_command_window.update
- end
- unless @status_window == nil
- @status_window.update
- end
- end
- #--------------------------------------------------------------------------
- # ● 戦闘処理の実行開始
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_main start_main
- def start_main
- ed_battle_scene_ff_edit_main
- @status_window.x = 240
- end
- #--------------------------------------------------------------------------
- # ● フレーム更新
- #--------------------------------------------------------------------------
- alias ed_battle_scene_ff_edit_update update
- def update
- @info_viewport.visible = true
- @status_window.refresh
- if $ed_rgss2["ed_arrow_cursor"]
- @target_enemy_name_window.refresh
- @target_enemy_name_window.update
- else
- @target_enemy_window.refresh
- @target_enemy_window.update
- end
-
- super
-
- if $ed_rgss2["ed_active_time_battle"]
- @frames[0] = Graphics.frame_count
- end
-
- if $ed_rgss2["ed_battle_scene"]
- update_enemy_hp # HPゲージの描画
- end
-
- update_basic(true)
- update_info_viewport # 情報表示ビューポートを更新
-
- if $game_message.visible
- @message_window.visible = true
- elsif $ed_rgss2["ed_damage_popup"] and FF_MASSAGE_SYSTEM
- @message_window.visible = false if $ed_rgss2["ed_battle_scene"]
- end
-
- unless $game_message.visible # メッセージ表示中以外
- return if judge_win_loss # 勝敗判定
- update_scene_change
- if $ed_rgss2["ed_mm_party_system"]
- if @side_actor_command.active
- update_side_actor_command
- return
- end
- end
- if $ed_rgss2["ed_arrow_cursor"]
- if @target_enemy_window.is_a?(Arrow_Enemy)
- target_window = @target_enemy_window != nil ? true : false
- else
- target_window = false
- end
- else
- target_window = @target_enemy_window.active
- end
- if target_window
- update_target_enemy_selection # 対象敵キャラ選択
- elsif @target_actor_window != nil
- update_target_actor_selection # 対象アクター選択
- elsif @spell_window != nil
- spell_window_update # 詠唱ウィンドウ選択
- elsif @skill_window != nil
- update_skill_selection # スキル選択
- elsif @item_window != nil
- update_item_selection # アイテム選択
- elsif @party_command_window.active
- update_party_command_selection # パーティコマンド選択
- elsif @actor_command_window.active
- update_actor_command_selection # アクターコマンド選択
- elsif @enter_action
- # 行動決定
- process_battle_event # バトルイベントの処理
-
- process_action # 戦闘行動
-
- #process_battle_event # バトルイベントの処理
- elsif @command_input # コマンド入力中
-
- else
- unless $ed_rgss2["ed_active_time_battle"]
- process_battle_event # バトルイベントの処理
- process_action # 戦闘行動
- process_battle_event # バトルイベントの処理
- return
- end
-
- if $ed_rgss2["ed_weapon_command"] == true
- if @weapon_command_window != nil
- update_weapon_command_selection # 武器コマンド選択
- return
- end
- end
-
- if $ed_rgss2["ed_active_time_battle"]
- frame = @frames[0] - @frames[1]
- if frame >= ATB_FRAME_UPDATE
- add_atb_guage
- Graphics.frame_reset
- make_action_orders
- else
- return
- end
- @frames[1] = Graphics.frame_count
- Graphics.frame_reset
- end
-
- end
- end
- end
- end
复制代码 使用方法就不要问我了…… |
|