rebf-gaiden/Scripts/_.25.rb
2025-04-26 17:06:34 -05:00

45 lines
No EOL
1.8 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.

module BattleVoice
#設定項目 複数回再生時、ボイスとボイスの間に入れるウェイト
#再生回数が3回の場合、
# 「1回目と2回目の間」「2回目と3回目の間」のウェイトがこの値になる
# 回目の後」のウェイトは通常のVOICE_WAITになる
#再生回数が2回の場合、
# 回目と回目の間」のウェイトがこの値になり、「回目の後」はVOICE_WAIT
VOICE_WAIT_B = 15
module_function
#--------------------------------------------------------------------------
# ● バトルボイスの再生
#--------------------------------------------------------------------------
def play(scene_symbol, battler = nil)
unless $game_switches[SILENT_SWITCH]
if battler
if $game_switches[31] == true#紅茶走改変
key = battler.actor? ? battler.voice_id : (battler.enemy_id * -1*1000)#紅茶走改変
else #紅茶走改変
key = battler.actor? ? battler.voice_id : (battler.enemy_id * -1)#紅茶走改変
end#紅茶走改変
return if silent_battler?(battler)
else
key = get_rand_member_id(scene_symbol)
end
time = 2 + rand(2)
time.times do |i|
filename = get_filename(scene_symbol, key)
if filename
Audio.se_play('Audio/VOICE/' + filename, $game_variables[160], 100)#紅茶走改変
wait_time = i == (time - 1) ? VOICE_WAIT : VOICE_WAIT_B
wait(wait_time)
end
end
end
end
#--------------------------------------------------------------------------
# ● ウェイト
#--------------------------------------------------------------------------
def wait(duration)
SceneManager.scene.wait(duration)
end
end