#============================================================================== # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息 #============================================================================== #等级可无限提升 #パラメータの算出が適当すぎるので、各自修正が必要かと。 BASE_FINAL_LEVEL = 9999 #上限レベル(あんまり大きな値を設定するとハングします) MAXHP_LIMIT = 99999999 #HP限界値 MAXSP_LIMIT = 99999999 #SP限界値 STR_LIMIT = 999999 #STR限界値 DEX_LIMIT = 999999 #DEX限界値 AGI_LIMIT = 999999 #AGI限界値 INT_LIMIT = 999999 #INT限界値 class Game_Actor < Game_Battler def new_final_level lv = BASE_FINAL_LEVEL #以下上限LV個別指定用 #case self.id #when 1 # lv = 255 #when 2 # lv = 999 #when 8 # lv = 15600 #end return lv end #-------------------------------------------------------------------------- # ● EXP 計算 #-------------------------------------------------------------------------- def make_exp_list actor = $data_actors[@actor_id] @exp_list = Array.new(new_final_level + 2) @exp_list[1] = 0 pow_i = 2.4 + actor.exp_inflation / 100.0 for i in 2..new_final_level + 1 if i > new_final_level @exp_list[i] = 0 else n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i) @exp_list[i] = @exp_list[i-1] + Integer(n) end end end #-------------------------------------------------------------------------- # ● MaxSP の取得 #-------------------------------------------------------------------------- def maxsp n = [[base_maxsp + @maxsp_plus, 0].max, MAXSP_LIMIT].min for i in @states n *= $data_states[i].maxsp_rate / 100.0 end n = [[Integer(n), 0].max, MAXSP_LIMIT].min return n end # ● MaxHP の取得 #-------------------------------------------------------------------------- def maxhp n = [[base_maxhp + @maxhp_plus, 1].max, MAXHP_LIMIT].min for i in @states n *= $data_states[i].maxhp_rate / 100.0 end n = [[Integer(n), 1].max, MAXHP_LIMIT].min return n end #-------------------------------------------------------------------------- # ● 基本 根骨 の取得 #-------------------------------------------------------------------------- def geigu gu1= 1 gu2 = 1 n = @level*gu1 + gu2 return n end #-------------------------------------------------------------------------- # ● 基本 minjie の取得 #-------------------------------------------------------------------------- def minjie m1= 1 m2 = 1 n = @level*m1 + m2 return n end # ● 基本 MaxHP の取得 #-------------------------------------------------------------------------- def base_maxhp gj = 0 hp1= $data_actors[@actor_id].parameters[0, 1] hp2 = $data_actors[@actor_id].parameters[0, 2] n = @level*hp1 + hp2 if @actor_id == $game_party.actors[0].id gj=$game_variables[30][1] end if $game_party.actors[1] != nil if @actor_id == $game_party.actors[1].id and $cong_zan != nil and $cong_zan != 0 gj=$game_variables[29][$cong_zan][1] end end return n + gj end #-------------------------------------------------------------------------- # ● 基本 MaxSP の取得 #-------------------------------------------------------------------------- def base_maxsp gj = 0 mp1 = $data_actors[@actor_id].parameters[1, 1] mp2 = $data_actors[@actor_id].parameters[1, 2] n = @level*mp1 + mp2 if @actor_id == $game_party.actors[0].id gj=$game_variables[30][2] end if $game_party.actors[1] != nil and $cong_zan != nil and $cong_zan != 0 if @actor_id == $game_party.actors[1].id gj=$game_variables[29][$cong_zan][2] end end return n + gj end #-------------------------------------------------------------------------- # ● 基本腕力の取得 #-------------------------------------------------------------------------- def base_str str1 = $data_actors[@actor_id].parameters[2, 1] str2 = $data_actors[@actor_id].parameters[2, 2] n = @level*str1 + str2 weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.str_plus : 0 n += armor1 != nil ? armor1.str_plus : 0 n += armor2 != nil ? armor2.str_plus : 0 n += armor3 != nil ? armor3.str_plus : 0 n += armor4 != nil ? armor4.str_plus : 0 return [[n, 1].max, STR_LIMIT].min end #-------------------------------------------------------------------------- # ● 基本器用さの取得 #-------------------------------------------------------------------------- def base_dex dex1 = $data_actors[@actor_id].parameters[3, 1] dex2 = $data_actors[@actor_id].parameters[3, 2] n = @level*dex1 + dex2 weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.dex_plus : 0 n += armor1 != nil ? armor1.dex_plus : 0 n += armor2 != nil ? armor2.dex_plus : 0 n += armor3 != nil ? armor3.dex_plus : 0 n += armor4 != nil ? armor4.dex_plus : 0 return [[n, 1].max, DEX_LIMIT].min end #-------------------------------------------------------------------------- # ● 基本速度さの取得 #-------------------------------------------------------------------------- def base_agi agi1 = $data_actors[@actor_id].parameters[4,1] agi2 = $data_actors[@actor_id].parameters[4,2] n = @level*agi1 + agi2 weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.agi_plus : 0 n += armor1 != nil ? armor1.agi_plus : 0 n += armor2 != nil ? armor2.agi_plus : 0 n += armor3 != nil ? armor3.agi_plus : 0 n += armor4 != nil ? armor4.agi_plus : 0 if @actor_id == $game_party.actors[0].id gj=$game_variables[30][4] end if $game_party.actors[1] != nil and $cong_zan != nil and $cong_zan != 0 if @actor_id == $game_party.actors[1].id gj=$game_variables[29][$cong_zan][4] end end return [[n, 1].max, AGI_LIMIT].min + gj end #-------------------------------------------------------------------------- # ● 基本魔力の取得 #-------------------------------------------------------------------------- def base_int int1 = $data_actors[@actor_id].parameters[5,1] int2 = $data_actors[@actor_id].parameters[5,2] n = @level*int1 + int2 weapon = $data_weapons[@weapon_id] armor1 = $data_armors[@armor1_id] armor2 = $data_armors[@armor2_id] armor3 = $data_armors[@armor3_id] armor4 = $data_armors[@armor4_id] n += weapon != nil ? weapon.int_plus : 0 n += armor1 != nil ? armor1.int_plus : 0 n += armor2 != nil ? armor2.int_plus : 0 n += armor3 != nil ? armor3.int_plus : 0 n += armor4 != nil ? armor4.int_plus : 0 return [[n, 1].max, INT_LIMIT].min end #-------------------------------------------------------------------------- # ● EXP の変更 # exp : 新しい EXP #-------------------------------------------------------------------------- def exp=(exp) # ★EXPの上限チェックを解除 @exp = [exp, 0].max # レベルアップ while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0 @level += 1 @hp = maxhp #补血法 @sp = maxsp #血法 # スキル習得 for j in $data_classes[@class_id].learnings if j.level == @level learn_skill(j.skill_id) end end end # レベルダウン while @exp < @exp_list[@level] @level -= 1 end # 現在の HP と SP が最大値を超えていたら修正 @hp = [@hp, self.maxhp].min @sp = [@sp, self.maxsp].min end #-------------------------------------------------------------------------- # ● レベルの変更 # level : 新しいレベル #-------------------------------------------------------------------------- def level=(level) # 上下限チェック # ★LV上限をnew_final_levelでチェックするように変更 level = [[level, new_final_level].min, 1].max # EXP を変更 self.exp = @exp_list[level] end end class Game_Battler #-------------------------------------------------------------------------- # ● MaxSP の取得 #-------------------------------------------------------------------------- def maxsp n = [[base_maxsp + @maxsp_plus, 0].max, MAXSP_LIMIT].min for i in @states n *= $data_states[i].maxsp_rate / 100.0 end n = [[Integer(n), 0].max, MAXSP_LIMIT].min return n end #-------------------------------------------------------------------------- # ● 腕力の取得 #-------------------------------------------------------------------------- def str n = [[base_str + @str_plus, 1].max, STR_LIMIT].min for i in @states n *= $data_states[i].str_rate / 100.0 end n = [[Integer(n), 1].max, STR_LIMIT].min return n end #-------------------------------------------------------------------------- # ● 器用さの取得 #-------------------------------------------------------------------------- def dex n = [[base_dex + @dex_plus, 1].max, DEX_LIMIT].min for i in @states n *= $data_states[i].dex_rate / 100.0 end n = [[Integer(n), 1].max, DEX_LIMIT].min return n end #-------------------------------------------------------------------------- # ● 素早さの取得 #-------------------------------------------------------------------------- def agi n = [[base_agi + @agi_plus, 1].max, AGI_LIMIT].min for i in @states n *= $data_states[i].agi_rate / 100.0 end n = [[Integer(n), 1].max, AGI_LIMIT].min return n end #-------------------------------------------------------------------------- # ● 魔力の取得 #-------------------------------------------------------------------------- def int n = [[base_int + @int_plus, 1].max, INT_LIMIT].min for i in @states n *= $data_states[i].int_rate / 100.0 end n = [[Integer(n), 1].max, INT_LIMIT].min return n end #-------------------------------------------------------------------------- # ● MaxHP の設定 # maxhp : 新しい MaxHP #-------------------------------------------------------------------------- def maxhp=(maxhp) @maxhp_plus += maxhp - self.maxhp @maxhp_plus = [[@maxhp_plus, -MAXHP_LIMIT].max, MAXHP_LIMIT].min @hp = [@hp, self.maxhp].min end #-------------------------------------------------------------------------- # ● MaxSP の設定 # maxsp : 新しい MaxSP #-------------------------------------------------------------------------- def maxsp=(maxsp) @maxsp_plus += maxsp - self.maxsp @maxsp_plus = [[@maxsp_plus, -MAXSP_LIMIT].max, MAXSP_LIMIT].min @sp = [@sp, self.maxsp].min end #-------------------------------------------------------------------------- # ● 腕力の設定 # str : 新しい腕力 #-------------------------------------------------------------------------- def str=(str) @str_plus += str - self.str @str_plus = [[@str_plus, -STR_LIMIT].max, STR_LIMIT].min end #-------------------------------------------------------------------------- # ● 器用さの設定 # dex : 新しい器用さ #-------------------------------------------------------------------------- def dex=(dex) @dex_plus += dex - self.dex @dex_plus = [[@dex_plus, -DEX_LIMIT].max, DEX_LIMIT].min end #-------------------------------------------------------------------------- # ● 素早さの設定 # agi : 新しい素早さ #-------------------------------------------------------------------------- def agi=(agi) @agi_plus += agi - self.agi @agi_plus = [[@agi_plus, -AGI_LIMIT].max, AGI_LIMIT].min end #-------------------------------------------------------------------------- # ● 魔力の設定 # int : 新しい魔力 #-------------------------------------------------------------------------- def int=(int) @int_plus += int - self.int @int_plus = [[@int_plus, -INT_LIMIT].max, INT_LIMIT].min end end #============================================================================== # 本脚本来自[url]www.66RPG.com[/url],使用和转载请保留此信息 #==============================================================================
360截图20161030140407366.jpg (22.02 KB, 下载次数: 0)
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |