lunariafantasia/Scripts/_.33.rb
2024-01-12 03:12:38 -06:00

40 lines
1.6 KiB
Ruby
Raw Blame History

This file contains ambiguous Unicode characters

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.

#==============================================================================
# ■ Game_Event
#------------------------------------------------------------------------------
#  イベントを扱うクラスです。条件判定によるイベントページ切り替えや、並列処理
# イベント実行などの機能を持っており、Game_Map クラスの内部で使用されます。
#==============================================================================
class Game_Event < Game_Character
#--------------------------------------------------------------------------
# ● イベントページの設定をセットアップ
#--------------------------------------------------------------------------
alias light_setup_page_settings setup_page_settings
def setup_page_settings
light_setup_page_settings
light_set if light?
end
#--------------------------------------------------------------------------
# 明かり条件
#--------------------------------------------------------------------------
def light?
@character_name != "" && @event.name == "!light"
end
#--------------------------------------------------------------------------
# 明かり設定
#--------------------------------------------------------------------------
def light_set
@blend_type = 1
@opacity = 122
l = @list
if l[0].code == 108
index = 0
while l[index].code == 408 || l[index].code == 108
text = l[index].parameters[0]
@blend_type = $1.to_i if text =~ /ブレンド(\d)/
@opacity = $1.to_i if text =~ /不透明度(\d+)/
index += 1
end
end
end
end