#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/ ?????? ? KGC_BattleDifficulty?
#_/----------------------------------------------------------------------------
#_/ ?????????????????
#_/ (?????????????[MenuAlter][TitleOption]??)
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#==============================================================================
# ? ???????? ?
#==============================================================================
module KGC
# ??????
# ?"??", HP, SP, ????, EXP, ????, ?????????
# ?????????(???)?
BD_DIFFICULTY_LIST = [
["Rookie", 60, 50, 60, 100, 100, 100], #set like this; ["Name", HP, SP, ***, EXP, ***,***]
["Easy", 80, 80, 70, 100, 100, 100],
["Normal", 100, 100, 100, 100, 100, 100],
["Hard", 150, 130, 120, 100, 100, 100],
["Mania", 200, 180, 150, 100, 100, 100],
["Unknown", 300, 260, 200, 100, 100, 100],
["Divine", 500, 400, 300, 100, 100, 100]
]
# ??????
# BD_DIFFICULTY_LIST ????????
BD_INITIAL_DIFFICULTY = 2 #Difficulty if none is chosen
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
#===================================================
#Scene_difficult_menu by panchokoster
#===================================================
module DIFFICULT
SPRITESET_TYPE = 1 #choose spriteset type, 1=>title screen, 2=>picture, 3+map
PICTURE_NAME = "picture name" #choose spriteset type 2 to use, put the image in yours pictures folder
end
class Scene_Title
alias old_command_new_game command_new_game
def command_new_game
old_command_new_game
$scene = Scene_select_yes_no.new
end
end
class Scene_select_yes_no
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
case DIFFICULT::SPRITESET_TYPE
when 1
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
when 2
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.picture(DIFFICULT::PICTURE_NAME)
when 3
@spriteset = Spriteset_Map.new
end
@window_q=Window_question.new
@window_q.x = 200
@window_q.y = 220-64
s1 = "yes"
s2 = "not right now"
@window_yes_no = Window_Command.new(200, [s1,s2])
@window_yes_no.y = 220
@window_yes_no.x = 220
@window_yes_no.index = @menu_index
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
Graphics.freeze
@window_yes_no.dispose
@window_q.dispose
case DIFFICULT::SPRITESET_TYPE
when 1..2
@sprite.bitmap.dispose
@sprite.dispose
when 3
@spriteset.dispose
end
end
def update
@window_yes_no.update
if Input.trigger?(Input::C)
case @window_yes_no.index
when 0
yes
when 1
no
end
end
end
def yes
$game_system.se_play($data_system.decision_se)
$scene = Scene_difficult_menu.new
end
def no
$game_system.se_play($data_system.decision_se)
Difficulty.set(2)
$scene = Scene_Map.new
end
end
#===================================================
#Scene_difficult_menu
#===================================================
class Scene_difficult_menu
def initialize(menu_index = 0)
@menu_index = menu_index
end
def main
case DIFFICULT::SPRITESET_TYPE
when 1
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.title($data_system.title_name)
when 2
@sprite = Sprite.new
@sprite.bitmap = RPG::Cache.picture(DIFFICULT::PICTURE_NAME)
when 3
@spriteset = Spriteset_Map.new
end
@window_q2 = Window_question2.new
@window_q2.x = 50
@window_q2.y = 125-64
@window_help = Window_Help_dif_menu.new
@window_help.update(" ")
s1 = "Rookie"
s2 = "Easy"
s3 = "Normal"
s4 = "Hard"
s5 = "Mania"
s6 = "Unknown"
s7 = "Divine"
@window_help.x = 50
@window_help.y = 125
@window_command_dif = Window_Command.new(200, [s1,s2,s3,s4,s5,s6,s7])
@window_command_dif.y = 114+75
@window_command_dif.x = 220
@window_command_dif.index = @menu_index
Graphics.transition
loop do
Graphics.update
Input.update
update
if $scene != self
break
end
end
#Execute when exiting the scene:
Graphics.freeze
@window_command_dif.dispose
@window_help.dispose
@window_q2.dispose
case DIFFICULT::SPRITESET_TYPE
when 1..2
@sprite.bitmap.dispose
@sprite.dispose
when 3
@spriteset.dispose
end
end
#--------------------------------------------------------------------------------------------------------
def update
@window_command_dif.update
case @window_command_dif.index
when 0
@window_help.update("The minimal difficulty only for losers") #"Rookie"
when 1
@window_help.update("An easy difficulty level for kids") #"Easy"
when 2
@window_help.update("The default game difficluty") #"Normal"
when 3
@window_help.update("Start fighting stronger monsters") #"Hard"
when 4
@window_help.update("Maniac difficult level, only for advanced gamers") #"Mania"
when 5
@window_help.update("????")#"Unknown"
when 6
@window_help.update("Master the game fighting the strongest monsters")#"Divine"
end
#THIS IS FOR THE OPTION FUNCTIONS:
if Input.trigger?(Input::C)
case @window_command_dif.index
when 0
rookie
when 1
easy
when 2
normal
when 3
hard
when 4
mania
when 5
unknown
when 6
divine
end
end
end
def rookie #s1
$game_system.se_play($data_system.decision_se)
Difficulty.set(0)
$scene = Scene_Map.new
end
def easy #s2
$game_system.se_play($data_system.decision_se)
Difficulty.set(1)
$scene = Scene_Map.new
end
def normal #s3
$game_system.se_play($data_system.decision_se)
Difficulty.set(2)
$scene = Scene_Map.new
end
def hard #s4
$game_system.se_play($data_system.decision_se)
Difficulty.set(3)
$scene = Scene_Map.new
end
def mania #s5
$game_system.se_play($data_system.decision_se)
Difficulty.set(4)
$scene = Scene_Map.new
end
def unknown #s6
$game_system.se_play($data_system.decision_se)
Difficulty.set(5)
$scene = Scene_Map.new
end
def divine #s7
$game_system.se_play($data_system.decision_se)
Difficulty.set(6)
$scene = Scene_Map.new
end
end #of the Scene
#===================================================
#Window_Help_dif_menu
#===================================================
class Window_Help_dif_menu < Window_Base
def initialize
super(0, 0, 540,64)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $fontface
self.contents.font.size = 20
end
def update(help_text)
self.contents.clear
self.contents.draw_text(0, 0, 440, 32, help_text)
end
end
class Window_question < Window_Base
def initialize
super(0, 0, 240,64)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $fontface
self.contents.font.size = 20
self.contents.draw_text(0, 0, 210, 32, " Change game difficulty?")
end
end
class Window_question2 < Window_Base
def initialize
super(0, 0, 240,64)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.name = $fontface
self.contents.font.size = 20
self.contents.draw_text(0, 0, 210, 32, "Choose the difficult Level... ")
end
end