`#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/`

#_/ ◆戦闘難易度 － KGC_BattleDifficulty◆

#_/----------------------------------------------------------------------------

#_/ 戦闘難易度の設定機能を追加します。

#_/ (メニュー等に表示する場合は[MenuAlter][TitleOption]参照)

#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================

# ★ カスタマイズ項目 ★

#==============================================================================

module KGC

# ◆ Difficulty

# " Name ", HP, SP, STATS, EXP, Gold, Drop Rate»

# Specify the magnification of each item (percentage).

BD_DIFFICULTY_LIST = [#HP SP STAT XP GP DROP

["Sissy-Bitch", 33, 33, 50, 25, 25, 0], # 0

["Weak", 66, 66, 75, 50, 50, 25], # 1

["Regular", 100, 100, 100, 100, 100, 100], # 2

["Hard-ish", 150, 150, 150, 150, 125, 150], # 3

["Psycho", 200, 200, 200, 200, 150, 200], # 4

["Infinity", 300, 300, 300, 300, 225, 400], # 5

["L33t Mode", 500, 500, 500, 500, 500, 800] # 6

]

# ◆初期難易度

# BD_DIFFICULTY_LIST のインデックス。

BD_INITIAL_DIFFICULTY = 2

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 # 難易度

#--------------------------------------------------------------------------

# ● オブジェクト初期化

#--------------------------------------------------------------------------

alias initialize_KGC_BattleDifficulty initialize

def initialize

# 元の処理を実行

initialize_KGC_BattleDifficulty

@difficulty = KGC::BD_INITIAL_DIFFICULTY

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

n *= Difficulty.get[1]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本 MaxSP の取得

#--------------------------------------------------------------------------

alias base_maxsp_KGC_BattleDifficulty base_maxsp

def base_maxsp

n = base_maxsp_KGC_BattleDifficulty

n *= Difficulty.get[2]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本腕力の取得

#--------------------------------------------------------------------------

alias base_str_KGC_BattleDifficulty base_str

def base_str

n = base_str_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本器用さの取得

#--------------------------------------------------------------------------

alias base_dex_KGC_BattleDifficulty base_dex

def base_dex

n = base_dex_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本素早さの取得

#--------------------------------------------------------------------------

alias base_agi_KGC_BattleDifficulty base_agi

def base_agi

n = base_agi_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本魔力の取得

#--------------------------------------------------------------------------

alias base_int_KGC_BattleDifficulty base_int

def base_int

n = base_int_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本攻撃力の取得

#--------------------------------------------------------------------------

alias base_atk_KGC_BattleDifficulty base_atk

def base_atk

n = base_atk_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本物理防御の取得

#--------------------------------------------------------------------------

alias base_pdef_KGC_BattleDifficulty base_pdef

def base_pdef

n = base_pdef_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本魔法防御の取得

#--------------------------------------------------------------------------

alias base_mdef_KGC_BattleDifficulty base_mdef

def base_mdef

n = base_mdef_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● 基本回避修正の取得

#--------------------------------------------------------------------------

alias base_eva_KGC_BattleDifficulty base_eva

def base_eva

n = base_eva_KGC_BattleDifficulty

n *= Difficulty.get[3]

return n / 100

end

#--------------------------------------------------------------------------

# ● EXP の取得

#--------------------------------------------------------------------------

alias exp_KGC_BattleDifficulty exp

def exp

n = exp_KGC_BattleDifficulty

n *= Difficulty.get[4]

return n / 100

end

#--------------------------------------------------------------------------

# ● ゴールドの取得

#--------------------------------------------------------------------------

alias gold_KGC_BattleDifficulty gold

def gold

n = gold_KGC_BattleDifficulty

n *= Difficulty.get[5]

return n / 100

end

#--------------------------------------------------------------------------

# ● トレジャー出現率の取得

#--------------------------------------------------------------------------

alias treasure_prob_KGC_BattleDifficulty treasure_prob

def treasure_prob

n = treasure_prob_KGC_BattleDifficulty

if n < 100

n *= Difficulty.get[6]

return [n / 100, 100].min

else

return n

end

end

end