#----------------------------------------------------------------------------
# 戦闘難易度 貪藻矢射妥←カスタム by 貪藻矢射妥←
#----------------------------------------------------------------------------
# 原作: ◆ 戦闘難易度 - KGC_BattleDifficulty ◆
# ◇ Last update : 20XX/??/?? ◇
# 原作者: TOMY様
# HP: Kamesoft
# アドレス: http://ytomy.sakura.ne.jp/
#
# 改造内容:
# ・コマンドウィンドウを専用のウィンドウにし、現在選択している難易度の色を変更
# ・一度でも最低難易度にしたら以後難易度を変更できないように設定可能に変更
#
#============================================================================
# 変更点
# 2024:12:01
# ・VX風VocabをよりVXに近づける対応
#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================
module KGC
# ◆難易度配列
# ≪"名称", HP, SP, 他能力値, EXP, ゴールド, トレジャー出現率≫
# 各項目の倍率を指定(百分率)。
BD_DIFFICULTY_LIST = [
["Picnic", 40, 20, 30, 50, 200, 100],
["Easy", 80, 80, 70, 90, 120, 100],
["Normal", 100, 100, 100, 100, 100, 100],
["Hard", 150, 130, 120, 100, 100, 100],
["Superior", 200, 180, 150, 100, 100, 100],
["Nightmare", 250, 200, 180, 120, 80, 100],
["Extraordinary", 300, 260, 200, 150, 60, 100],
["Hell & Inferno", 500, 400, 300, 200, 50, 100],
["Genesic H & I", 999, 777, 666, 250, 25, 100]
]
# ◆初期難易度
# BD_DIFFICULTY_LIST のインデックス。
BD_INITIAL_DIFFICULTY = 2
# ◆一度でも最低難易度に変更したら難易度変更を不可能にするかどうか
BD_DIFF_MIN_FIX_FLG = true
# ◆現在の難易度カラー
BD_SELECTED_COLOR = Color.new(128, 255, 128, 255)
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
$imported = {} if $imported == nil
$imported["BattleDifficulty"] = true
module Difficulty
#--------------------------------------------------------------------------
# ● 難易度設定取得
#--------------------------------------------------------------------------
def self.get
# 難易度設定を返す
return KGC::BD_DIFFICULTY_LIST[$game_system.difficulty]
end
#--------------------------------------------------------------------------
# ● 難易度設定変更
#--------------------------------------------------------------------------
def self.set(index)
# 範囲外ならば変更しない
return if index < 0 || index >= KGC::BD_DIFFICULTY_LIST.size
$game_system.difficulty = index
end
#--------------------------------------------------------------------------
# ● 能力値補正済みエネミー取得
#--------------------------------------------------------------------------
def self.get_revised_enemy(enemy)
en = enemy.clone
diff = self.get
en.maxhp = en.maxhp * diff[1] / 100
en.maxsp = en.maxsp * diff[2] / 100
en.str = en.str * diff[3] / 100
en.dex = en.dex * diff[3] / 100
en.agi = en.agi * diff[3] / 100
en.int = en.int * diff[3] / 100
en.atk = en.atk * diff[3] / 100
en.pdef = en.pdef * diff[3] / 100
en.mdef = en.mdef * diff[3] / 100
en.exp = en.exp * diff[4] / 100
en.gold = en.gold * diff[4] / 100
if en.treasure_prob < 100
en.treasure_prob = [en.treasure_prob * diff[5] / 100, 100].min
end
return en
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
attr_accessor :difficulty # 難易度
attr_accessor :diffixed_flg # 最低難易度固定フラグ
#--------------------------------------------------------------------------
# ● オブジェクト初期化
#--------------------------------------------------------------------------
alias initialize_KGC_BattleDifficulty initialize
def initialize
# 元の処理を実行
initialize_KGC_BattleDifficulty
@difficulty = KGC::BD_INITIAL_DIFFICULTY
@diffixed_flg = false
end
#--------------------------------------------------------------------------
# ● 難易度一覧
#--------------------------------------------------------------------------
def difficulty_list
return KGC::BD_DIFFICULTY_LIST
end
end
#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★
#==============================================================================
# ■ Game_Enemy
#==============================================================================
class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● 基本 MaxHP の取得
#--------------------------------------------------------------------------
alias base_maxhp_KGC_BattleDifficulty base_maxhp
def base_maxhp
n = base_maxhp_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[1]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本 MaxSP の取得
#--------------------------------------------------------------------------
alias base_maxsp_KGC_BattleDifficulty base_maxsp
def base_maxsp
n = base_maxsp_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[2]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本腕力の取得
#--------------------------------------------------------------------------
alias base_str_KGC_BattleDifficulty base_str
def base_str
n = base_str_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本器用さの取得
#--------------------------------------------------------------------------
alias base_dex_KGC_BattleDifficulty base_dex
def base_dex
n = base_dex_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本素早さの取得
#--------------------------------------------------------------------------
alias base_agi_KGC_BattleDifficulty base_agi
def base_agi
n = base_agi_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本魔力の取得
#--------------------------------------------------------------------------
alias base_int_KGC_BattleDifficulty base_int
def base_int
n = base_int_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本攻撃力の取得
#--------------------------------------------------------------------------
alias base_atk_KGC_BattleDifficulty base_atk
def base_atk
n = base_atk_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本物理防御の取得
#--------------------------------------------------------------------------
alias base_pdef_KGC_BattleDifficulty base_pdef
def base_pdef
n = base_pdef_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本魔法防御の取得
#--------------------------------------------------------------------------
alias base_mdef_KGC_BattleDifficulty base_mdef
def base_mdef
n = base_mdef_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● 基本回避修正の取得
#--------------------------------------------------------------------------
alias base_eva_KGC_BattleDifficulty base_eva
def base_eva
n = base_eva_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[3]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● EXP の取得
#--------------------------------------------------------------------------
alias exp_KGC_BattleDifficulty exp
def exp
n = exp_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[4]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● ゴールドの取得
#--------------------------------------------------------------------------
alias gold_KGC_BattleDifficulty gold
def gold
n = gold_KGC_BattleDifficulty
if $imported["BattleDifficulty"]
n *= Difficulty.get[5]
n /= 100
end # $imported["BattleDifficulty"]
return Integer(n)
end
#--------------------------------------------------------------------------
# ● トレジャー出現率の取得
#--------------------------------------------------------------------------
alias treasure_prob_KGC_BattleDifficulty treasure_prob
def treasure_prob
n = treasure_prob_KGC_BattleDifficulty
if n < 100
if $imported["BattleDifficulty"]
n *= Difficulty.get[6]
n /= 100
end # $imported["BattleDifficulty"]
return [n, 100].min
else
return n
end
end
end
#==============================================================================
# ■ Window_BattleDifficulty
#==============================================================================
class Window_BattleDifficulty < Window_Command
#--------------------------------------------------------------------------
# ● リフレッシュ
# 現在選択している難易度だけ色を変えたいのでリフレッシュ処理だけ
#--------------------------------------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
color = i == $game_system.difficulty ? KGC::BD_SELECTED_COLOR : normal_color
draw_item(i, color)
end
end
end |