battle-maiden-mizuki/Scripts/_.18.rb
2025-06-17 11:57:06 -05:00

136 lines
5.7 KiB
Ruby
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#==============================================================================
# ☆VXAce RGSS3 「連続アニメーション」☆
#      EnDlEss DREamER
# URL:http://mitsu-evo.6.ql.bz/
# 製作者 mitsu-evo
# Last:2012/1/20
#   スキルで設定個数分のアニメーションを表示する
# ▼ バトルレイアウト変更よりも下に。
#==============================================================================
=begin
使用方法
スキルのメモ欄に「<連続アニメ:10,20,30>」と記入すると
指定スキル使用時に通常設定のアニメーション後に
アニメーションIDの10番・20番・30番を表示する。
通常攻撃と同じアニメは「-1」を入れて下さい。
スキルのメモ欄に「<使用者アニメ:10,20,30>」と記入すると
指定スキル使用前にスキル使用バトラーにアニメーションを表示します。
連続アニメと同じくいくらでも連続して表示します。
ただし、通常攻撃と同じアニメ指定は出来ません。
=end
$ed_rgss3 = {} if $ed_rgss3 == nil
$ed_rgss3["ed_continuity_anime"] = true
COUNTINUITY_ANIME_MEMO = "連続アニメ" # 連続アニメ用スキルのメモ欄指定文字
SKILL_USER_ANIME_MEMO = "使用者アニメ" # スキル使用者アニメ用スキルのメモ欄指定文字
#==============================================================================
# ■ Scene_Battle
#------------------------------------------------------------------------------
#  バトル画面の処理を行うクラスです。
#==============================================================================
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● スキルアニメのメモ欄取得
#--------------------------------------------------------------------------
def skill_anime_memo(skill)
skill_note = []
skill_note2 = []
a = skill.note.scan(/<#{COUNTINUITY_ANIME_MEMO}[:](-?\d+(?:[ ]*,[ ]*-?\d+)*)>/)
a.flatten!
# 連続アニメ
unless a == [] and a.empty?
$1.scan(/-?\d+/).each { |num|
skill_note.push(num.to_i)}
@skill_continuity_anime = skill_note
else
@skill_continuity_anime = []
end
b = skill.note.scan(/<#{SKILL_USER_ANIME_MEMO}[:](-?\d+(?:[ ]*,[ ]*-?\d+)*)>/)
b.flatten!
# スキル使用者アニメ
unless b == [] and b.empty?
$1.scan(/-?\d+/).each { |num|
skill_note2.push(num.to_i)}
@skill_user_anime = skill_note2
else
@skill_user_anime = []
end
end
#--------------------------------------------------------------------------
# ● 戦闘行動の実行 : スキル
#--------------------------------------------------------------------------
alias ed_continuity_anime_execute_action execute_action
def execute_action
item = @subject.current_action.item
skill_anime_memo(item)
ed_continuity_anime_execute_action
end
#--------------------------------------------------------------------------
# ● スキル使用者アニメーションの表示
# targets : 対象者の配列
# animation_id : アニメーション ID (-1: 通常攻撃と同じ)
#--------------------------------------------------------------------------
def befor_skill_display_animation
unless @skill_user_anime == nil or @skill_user_anime == []
# スキル使用者アニメの場合
for anime in @skill_user_anime
if anime > 0
# targets はバトラーを格納する配列なので、一人の場合は二重にする。
battler = []
battler << @subject
# mirror は アクターなら反転無し。敵なら反転有り。
if $ed_rgss3["ed_battle_scene"]
if @subject.is_a?(Game_Enemy)
# 敵のバックアタック:右側に居る場合 ? 反転なし : 反転有り
mirror = @subject.back_attack? ? false : true
else
# 味方のバックアタック:左側に居る場合 ? 反転あり : 反転なし
mirror = @subject.back_attack? ? true : false
end
else
# 敵の場合は反転アニメ。
mirror = @subject.is_a?(Game_Enemy) ? true : false
end
show_normal_animation(battler, anime, mirror)
wait_for_animation
end
end
@skill_user_anime = []
end
end
#--------------------------------------------------------------------------
# ● アニメーションの表示
# targets : 対象者の配列
# animation_id : アニメーション ID (-1: 通常攻撃と同じ)
#--------------------------------------------------------------------------
alias ed_continuity_anime_show_animation show_animation
def show_animation(targets, animation_id)
# バトルレイアウト変更extensionが導入されていないならここで処理。
befor_skill_display_animation unless $ed_rgss3["ed_battle_extension"]
unless @skill_continuity_anime == nil or @skill_continuity_anime == []
# 連続アニメの場合
ed_continuity_anime_show_animation(targets, animation_id)
for anime in @skill_continuity_anime
if anime < 0
show_attack_animation(targets)
else
ed_continuity_anime_show_animation(targets, anime)
end
end
@skill_continuity_anime = []
else
# 通常アニメの場合
ed_continuity_anime_show_animation(targets, animation_id)
end
end
end