=begin #=======================================================================
◆◇Speedy battle RGSS3◇◆
◆DEICIDE ALMA
◆レーネ
◆http://blog.goo.ne.jp/exa_deicide_alma
★ Function
Enhances the fast forward function during battle.
◆ Redefined location excluding alias
Scene_Battle#wait
Scene_Battle#wait_for_animation
Scene_Battle#wait_for_effect
◆Introduction point (when XP style battle is introduced)
STR_11a, animation weight reduction & continuous XPS,
below STR11k (animation on the use side),
above main
◆Introduction point (when XP style battle is not introduced)
▼As for the material, the animation is lighter and below the continuous, above the main
=end #=========================================================================
module RENNE ; module SPD_BATTLE
# 早送りの速度(2以上に設定)
Q_SPD = 4
# ■超高速化の設定
HSPD_USE = true # 超高速化を使うかどうか
HSPD_KEY = :L # 超高速化ボタン(:LはQキー)
HSPD_LOG = true # ログも超高速化するかどうか
end ; end
$renne_rgss3 = {} if $renne_rgss3.nil?
$renne_rgss3[:speedy_battle] = true
class Sprite_Battler < Sprite_Base
#--------------------------------------------------------------------------
# ● 更新(エイリアス)
#--------------------------------------------------------------------------
alias update_ren3 update
def update
update_ren3
self.visible = true if @effect_type != :blink
end
#--------------------------------------------------------------------------
# ● エフェクトの開始(エイリアス)
#--------------------------------------------------------------------------
alias start_effect_ren3 start_effect
def start_effect(effect_type)
start_effect_ren3(effect_type)
@effect_duration /= 2 if @effect_type == :collapse
end
#--------------------------------------------------------------------------
# ● 崩壊エフェクトの更新(エイリアス)
#--------------------------------------------------------------------------
alias update_collapse_ren3 update_collapse
def update_collapse
update_collapse_ren3
self.opacity = 256 - (48 - @effect_duration) * 6
end
end
class Window_BattleLog < Window_Selectable
#--------------------------------------------------------------------------
# ● 超高速化判定
#--------------------------------------------------------------------------
def hspd_flag?
RENNE::SPD_BATTLE::HSPD_LOG && Input.press?(RENNE::SPD_BATTLE::HSPD_KEY)
end
#--------------------------------------------------------------------------
# ● メッセージ速度の取得(エイリアス)
#--------------------------------------------------------------------------
alias message_speed_ren3 message_speed
def message_speed
return 1 if hspd_flag?
message_speed_ren3
end
end
class Scene_Battle < Scene_Base
#--------------------------------------------------------------------------
# ● 超高速化判定
#--------------------------------------------------------------------------
def hspd_flag?
RENNE::SPD_BATTLE::HSPD_USE && Input.press?(RENNE::SPD_BATTLE::HSPD_KEY)
end
#--------------------------------------------------------------------------
# ● 特殊な更新
#--------------------------------------------------------------------------
def ex_update
update_all_windows
$game_timer.update
$game_troop.update
@spriteset.update
update_info_viewport
update_message_open
end
#--------------------------------------------------------------------------
# ● 絶対的なウェイト(エイリアス)
#--------------------------------------------------------------------------
alias abs_wait_ren3 abs_wait
def abs_wait(duration)
return if hspd_flag?
duration /= (RENNE::SPD_BATTLE::Q_SPD / 2) if show_fast?
abs_wait_ren3(duration)
end
#--------------------------------------------------------------------------
# ● ウェイト ※再定義
#--------------------------------------------------------------------------
def wait(duration)
duration.times {|i|
update_for_wait if i < duration / 2 || !show_fast?
break if i >= duration / RENNE::SPD_BATTLE::Q_SPD and show_fast?
break if hspd_flag?
}
end
#--------------------------------------------------------------------------
# ● アニメーション表示が終わるまでウェイト ※再定義
#--------------------------------------------------------------------------
def wait_for_animation
update_for_wait
count = 0
spd = [RENNE::SPD_BATTLE::Q_SPD / 2, 1].max
while @spriteset.animation?
if show_fast?
(count % spd).zero? ? update_for_wait : ex_update
else
update_for_wait
end
count += 1
break if hspd_flag?
end
end
#--------------------------------------------------------------------------
# ● エフェクト実行が終わるまでウェイト ※再定義
#--------------------------------------------------------------------------
def wait_for_effect
update_for_wait
count = 0
spd = [RENNE::SPD_BATTLE::Q_SPD / 2, 1].max
while @spriteset.effect?
if show_fast?
(count % spd).zero? ? update_for_wait : ex_update
else
update_for_wait
end
count += 1
break if hspd_flag?
end
end
#--------------------------------------------------------------------------
# ● 通常アニメーションの表示(エイリアス)
#--------------------------------------------------------------------------
alias show_normal_animation_ren3 show_normal_animation
def show_normal_animation(targets, animation_id, mirror = false)
return if hspd_flag?
show_normal_animation_ren3(targets, animation_id, mirror)
end
end