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

110 lines
4.6 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.

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ◆ ふきだしアイコン表示拡張 ver1.00 ◆ VX Ace ◆
# by
#------------------------------------------------------------------------------
#  本来であれば10種類までしか使えないふきだしアイコンを好きなだけ種類を
# 増やすことができるようにしました。そもそも何で10種類までしか使えないんだよ、
# 海老ェ・・・。
#  イベントのスクリプト show_balloon(イベント, ふきだし[, ウェイト]) にて表示することが
# できます。
# イベントの指定
#  プレイヤー → :player or -1
#  このイベント → :self or 0
#  その他のイベント → イベントID
# ふきだしの指定
#  ふきだしの名前 or ふきだしアイコンの上からn番目
# ウェイトの指定
#  表示が終わるまでウェイトをするか? true → する false → しない
# 省略した場合は自動でfalseになります。
# 例) show_balloon(:player, "びっくり")
#  イベントの「ふきだしアイコンの表示」でプレイヤーに"ビックリ"のアイコンを
# 表示すると同じことができます。
#==============================================================================
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
$imported = {} if $imported == nil
$imported["Show_Balloon"] = true
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ★ 設定項目 Show Balloon ★
#==============================================================================
module Show_Balloon
#デフォルトのふきだし名
Default_Balloon_Name = ["びっくり", "はてな", "音符", "ハート", "怒り", "",
"くしゃくしゃ", "沈黙", "電球", "Zzz"]
#追加のふきだし名
#(設定が面倒ならやらなくてもok。)
Extra_Balloon_Name = ["11", "12", "13", "14", "15", "16",
"17", "18", "19", "20"]
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ☐ Show Balloon
#==============================================================================
module Show_Balloon
#------------------------------------------------------------------------
# ○ イベント取得
#------------------------------------------------------------------------
def self.event_id(event)
case event
when :player
return -1
when :self
return 0
else
return event
end
end
#------------------------------------------------------------------------
# ○ バルーンのID取得
#------------------------------------------------------------------------
def self.balloon_id(balloon)
if Default_Balloon_Name.include?(balloon)
Default_Balloon_Name.index(balloon) + 1
elsif Extra_Balloon_Name.include?(balloon)
Extra_Balloon_Name.index(balloon) + 11
elsif balloon.is_a?(Integer)
balloon
else
nil
end
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ☐ Command
#==============================================================================
module Commands
module_function
#------------------------------------------------------------------------
# ○ ふきだし表示
#------------------------------------------------------------------------
def show_balloon(event, balloon, wait = false)
event_id = Show_Balloon.event_id(event)
character = get_character(event_id)
balloon_id = Show_Balloon.balloon_id(balloon)
return unless balloon_id
if character
character.balloon_id = balloon_id
Fiber.yield while character.balloon_id > 0 if wait
end
end
end
class Game_Interpreter
include Commands
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★