king-exit/Scripts/_.40.rb
2024-08-31 14:17:23 -05:00

48 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.

#==============================================================================
# ■ RGSS3 天候の強さ限界突破 Ver1.00 by 星潟
#------------------------------------------------------------------------------
# 天候の強さの上限を無視し、強さ10以上の天候を実現します。
# イベントコマンドのスクリプトでw_p_set(n)と記入してください。
# nには1以上の数字を入れましょう。
# このコマンドが実行された後、次に天候が変化する際
# 一度だけ本来の設定を無視し、強さがnの値となります。
# 強ければ強いほど負荷が伴うので、実用レベルではnは50程度が限度でしょう。
#
# 例.
# イベントコマンドのスクリプトでw_p_set(50)とした後
# 天候の設定で「雨 強さ9 時間120 変更が終わるまでウェイト」とする。
# ↓
# 実際の天候変化は「雨 強さ50 時間120 変更が終わるまでウェイト」となる。
#
#==============================================================================
module WEATHER_LIMIT
#天候による画面の暗さの限界値を指定
#(本来は強さに応じて真っ暗になるまで暗くなります)
DIM_MAX = 108
end
class Game_Screen
alias change_weather_w_p_set change_weather
def change_weather(type, power, duration)
$game_party.w_p_set = 0 if $game_party.w_p_set == nil
true_power = $game_party.w_p_set > 0 ? $game_party.w_p_set : power
$game_party.w_p_set = 0
change_weather_w_p_set(type, true_power, duration)
end
end
class Game_Interpreter
def w_p_set(n)
$game_party.w_p_set = n
end
end
class Game_Party < Game_Unit
attr_accessor :w_p_set
end
class Spriteset_Weather
alias dimness_w_p_set dimness
def dimness
[dimness_w_p_set, WEATHER_LIMIT::DIM_MAX].min
end
end