额~,有点不一样哈,一共5个难度,变量值 0,1,2,3,4 分别对应 150%,125%,100%,75%,50%。
#============================================================================= # 设置难度的变量 ID HARDNESS_VAR = 1 #============================================================================ class Game_Battler #-------------------------------------------------------------------------- def maxhp n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min for i in @states n *= $data_states[i].maxhp_rate / 100.0 end n = [[Integer(n), 1].max, 999999].min i = (4 - $game_variables[HARDNESS_VAR]) * 25 return n / 2 + n * i / 100 end #-------------------------------------------------------------------------- def maxsp n = [[base_maxsp + @maxsp_plus, 0].max, 9999].min for i in @states n *= $data_states[i].maxsp_rate / 100.0 end n = [[Integer(n), 0].max, 9999].min i = (4 - $game_variables[HARDNESS_VAR]) * 25 return n / 2 + n * i / 100 end end class Game_Actor < Game_Battler #-------------------------------------------------------------------------- def maxhp n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min for i in @states n *= $data_states[i].maxhp_rate / 100.0 end n = [[Integer(n), 1].max, 9999].min i = (4 - $game_variables[HARDNESS_VAR]) * 25 return n / 2 + n * i / 100 end end
#=============================================================================
# 设置难度的变量 ID
HARDNESS_VAR = 1
#============================================================================
class Game_Battler
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 999999].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 999999].min
i = (4 - $game_variables[HARDNESS_VAR]) * 25
return n / 2 + n * i / 100
end
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, 9999].min
for i in @states
n *= $data_states[i].maxsp_rate / 100.0
end
n = [[Integer(n), 0].max, 9999].min
i = (4 - $game_variables[HARDNESS_VAR]) * 25
return n / 2 + n * i / 100
end
end
class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, 9999].min
for i in @states
n *= $data_states[i].maxhp_rate / 100.0
end
n = [[Integer(n), 1].max, 9999].min
i = (4 - $game_variables[HARDNESS_VAR]) * 25
return n / 2 + n * i / 100
end
end
|