幻想森林

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 2583|回复: 1

[已解决] LV破限有问题啊

[复制链接]

30

主题

154

帖子

1552

积分

⑥精研

积分
1552
发表于 2016-5-21 16:48:50 | 显示全部楼层 |阅读模式
你好啊,这个破限有个问题,我初期男主角的血是300多,但是进游戏一看是700多,怎么回事?能改回去么
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================
  4. #等级可无限提升
  5. #パラメータの算出が適当すぎるので、各自修正が必要かと。
  6.   BASE_FINAL_LEVEL = 9999   #上限レベル(あんまり大きな値を設定するとハングします)
  7.   MAXHP_LIMIT = 99999999    #HP限界値
  8.   MAXSP_LIMIT = 99999999    #SP限界値
  9.   STR_LIMIT   = 999999      #STR限界値
  10.   DEX_LIMIT   = 999999      #DEX限界値
  11.   AGI_LIMIT   = 999999      #AGI限界値
  12.   INT_LIMIT   = 999999      #INT限界値
  13.   NEW_LIMIT_ACTOR = [1,3,5,7]############bearrpg  突破上限的角色
  14. #######################################################这里是敌人类,没影响但是不能没有。
  15. class Game_Enemy < Game_Battler
  16.   def nla_id?
  17.       return  NEW_LIMIT_ACTOR.include?(self.id)
  18.    end
  19.  def nla_v(p)
  20.    case p
  21.     when 0
  22.       return lv = nla_id? ? BASE_FINAL_LEVEL : 99
  23.     when 1
  24.       return hp = nla_id? ? MAXHP_LIMIT : 99999999
  25.     when 2
  26.       return sp = nla_id? ? MAXSP_LIMIT : 99999999
  27.     when 3
  28.       return str = nla_id? ? STR_LIMIT : 999
  29.     when 4
  30.       return dex = nla_id? ? DEX_LIMIT : 999
  31.     when 5
  32.       return agi = nla_id? ? AGI_LIMIT : 999
  33.     when 6
  34.       return int = nla_id? ? INT_LIMIT : 999
  35.    end
  36.  end
  37. end
  38. ####################################################################
  39. class Game_Actor < Game_Battler
  40.   def new_final_level
  41.     lv = BASE_FINAL_LEVEL
  42.     #以下上限LV個別指定用
  43.    # case self.id
  44.    # when 1
  45.    #   lv = 255
  46.    # when 2
  47.    #   lv = 999
  48.    # when 8
  49.    #   lv = 15600
  50.    #end
  51.     return lv
  52.  end
  53. #######################################################################
  54.  def nla_id?
  55.       return  NEW_LIMIT_ACTOR.include?(self.id)
  56.    end
  57.  def nla_v(p)
  58.    case p
  59.     when 0
  60.       return lv = nla_id? ? BASE_FINAL_LEVEL : 99
  61.     when 1
  62.       return hp = nla_id? ? MAXHP_LIMIT : 9999
  63.     when 2
  64.       return sp = nla_id? ? MAXSP_LIMIT : 9999
  65.     when 3
  66.       return str = nla_id? ? STR_LIMIT : 999
  67.     when 4
  68.       return dex = nla_id? ? DEX_LIMIT : 999
  69.     when 5
  70.       return agi = nla_id? ? AGI_LIMIT : 999
  71.     when 6
  72.       return int = nla_id? ? INT_LIMIT : 999
  73.    end
  74.  end
  75. #######################################################################
  76.   #--------------------------------------------------------------------------
  77.   # ● EXP 計算
  78.   #--------------------------------------------------------------------------
  79.   def make_exp_list
  80.     actor = $data_actors[@actor_id]
  81.     @exp_list = Array.new(nla_v(0) + 2)
  82.     @exp_list[1] = 0
  83.     pow_i = 2.4 + actor.exp_inflation / 100.0
  84.     for i in 2..nla_v(0) + 1
  85.       if i > nla_v(0)
  86.         @exp_list = 0
  87.       else
  88.         n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
  89.         @exp_list = @exp_list[i-1] + Integer(n)
  90.       end
  91.     end
  92.   end
  93.   #--------------------------------------------------------------------------
  94.   # ● MaxHP の取得
  95.   #--------------------------------------------------------------------------
  96.   def maxhp
  97.     nhl =
  98.     n = [[base_maxhp + @maxhp_plus, 1].max, nla_v(1)].min
  99.     for i in @states
  100.       n *= $data_states.maxhp_rate / 100.0
  101.     end
  102.     n = [[Integer(n), 1].max, nla_v(1)].min
  103.     return n
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # ● 基本 MaxHP の取得
  107.   #--------------------------------------------------------------------------
  108.   def base_maxhp
  109.     n = $data_actors[@actor_id].parameters[0, 1]
  110.     n += $data_actors[@actor_id].parameters[0, 2] * @level
  111.     return n
  112.   end
  113.   #--------------------------------------------------------------------------
  114.   # ● 基本 MaxSP の取得
  115.   #--------------------------------------------------------------------------
  116.   def base_maxsp
  117.     n = $data_actors[@actor_id].parameters[1, 1]
  118.     n += $data_actors[@actor_id].parameters[1, 2] * @level
  119.     return n
  120.   end
  121.   #--------------------------------------------------------------------------
  122.   # ● 基本腕力の取得
  123.   #--------------------------------------------------------------------------
  124.   def base_str
  125.     n = $data_actors[@actor_id].parameters[2, 1]
  126.     n += $data_actors[@actor_id].parameters[2, 2] * @level
  127.     weapon = $data_weapons[@weapon_id]
  128.     armor1 = $data_armors[@armor1_id]
  129.     armor2 = $data_armors[@armor2_id]
  130.     armor3 = $data_armors[@armor3_id]
  131.     armor4 = $data_armors[@armor4_id]
  132.     n += weapon != nil ? weapon.str_plus : 0
  133.     n += armor1 != nil ? armor1.str_plus : 0
  134.     n += armor2 != nil ? armor2.str_plus : 0
  135.     n += armor3 != nil ? armor3.str_plus : 0
  136.     n += armor4 != nil ? armor4.str_plus : 0
  137.     return [[n, 1].max, nla_v(3)].min
  138.   end
  139.   #--------------------------------------------------------------------------
  140.   # ● 基本器用さの取得
  141.   #--------------------------------------------------------------------------
  142.   def base_dex
  143.     n = $data_actors[@actor_id].parameters[3, 1]
  144.     n += $data_actors[@actor_id].parameters[3, 2] * @level
  145.     weapon = $data_weapons[@weapon_id]
  146.     armor1 = $data_armors[@armor1_id]
  147.     armor2 = $data_armors[@armor2_id]
  148.     armor3 = $data_armors[@armor3_id]
  149.     armor4 = $data_armors[@armor4_id]
  150.     n += weapon != nil ? weapon.dex_plus : 0
  151.     n += armor1 != nil ? armor1.dex_plus : 0
  152.     n += armor2 != nil ? armor2.dex_plus : 0
  153.     n += armor3 != nil ? armor3.dex_plus : 0
  154.     n += armor4 != nil ? armor4.dex_plus : 0
  155.     return [[n, 1].max, nla_v(3)].min
  156.   end
  157.   #--------------------------------------------------------------------------
  158.   # ● 基本素早さの取得
  159.   #--------------------------------------------------------------------------
  160.   def base_agi
  161.     n = $data_actors[@actor_id].parameters[4, 1]
  162.     n += $data_actors[@actor_id].parameters[4, 2] * @level
  163.     weapon = $data_weapons[@weapon_id]
  164.     armor1 = $data_armors[@armor1_id]
  165.     armor2 = $data_armors[@armor2_id]
  166.     armor3 = $data_armors[@armor3_id]
  167.     armor4 = $data_armors[@armor4_id]
  168.     n += weapon != nil ? weapon.agi_plus : 0
  169.     n += armor1 != nil ? armor1.agi_plus : 0
  170.     n += armor2 != nil ? armor2.agi_plus : 0
  171.     n += armor3 != nil ? armor3.agi_plus : 0
  172.     n += armor4 != nil ? armor4.agi_plus : 0
  173.     return [[n, 1].max, nla_v(3)].min
  174.   end
  175.   #--------------------------------------------------------------------------
  176.   # ● 基本魔力の取得
  177.   #--------------------------------------------------------------------------
  178.   def base_int
  179.     n = $data_actors[@actor_id].parameters[5, 1]
  180.     n += $data_actors[@actor_id].parameters[5, 2] * @level
  181.     weapon = $data_weapons[@weapon_id]
  182.     armor1 = $data_armors[@armor1_id]
  183.     armor2 = $data_armors[@armor2_id]
  184.     armor3 = $data_armors[@armor3_id]
  185.     armor4 = $data_armors[@armor4_id]
  186.     n += weapon != nil ? weapon.int_plus : 0
  187.     n += armor1 != nil ? armor1.int_plus : 0
  188.     n += armor2 != nil ? armor2.int_plus : 0
  189.     n += armor3 != nil ? armor3.int_plus : 0
  190.     n += armor4 != nil ? armor4.int_plus : 0
  191.     return [[n, 1].max, nla_v(3)].min
  192.   end
  193.   #--------------------------------------------------------------------------
  194.   # ● EXP の変更
  195.   #     exp : 新しい EXP
  196.   #--------------------------------------------------------------------------
  197.   def exp=(exp)
  198.     # ★EXPの上限チェックを解除
  199.     @exp = [exp, 0].max
  200.     # レベルアップ
  201.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  202.       @level += 1
  203.       # スキル習得
  204.       for j in $data_classes[@class_id].learnings
  205.         if j.level == @level
  206.           learn_skill(j.skill_id)
  207.         end
  208.       end
  209.     end
  210.     # レベルダウン
  211.     while @exp < @exp_list[@level]
  212.       @level -= 1
  213.     end
  214.     # 現在の HP と SP が最大値を超えていたら修正
  215.     @hp = [@hp, self.maxhp].min
  216.     @sp = [@sp, self.maxsp].min
  217.   end
  218.   #--------------------------------------------------------------------------
  219.   # ● レベルの変更
  220.   #     level : 新しいレベル
  221.   #--------------------------------------------------------------------------
  222.   def level=(level)
  223.     # 上下限チェック
  224.     # ★LV上限をnla_v(0)でチェックするように変更
  225.     level = [[level, nla_v(0)].min, 1].max
  226.     # EXP を変更
  227.     self.exp = @exp_list[level]
  228.   end
  229. end
  230.  
  231.  
  232. class Game_Battler
  233.   #--------------------------------------------------------------------------
  234.   # ● MaxSP の取得
  235.   #--------------------------------------------------------------------------
  236.   def maxsp
  237.     n = [[base_maxsp + @maxsp_plus, 0].max, nla_v(2)].min
  238.     for i in @states
  239.       n *= $data_states.maxsp_rate / 100.0
  240.     end
  241.     n = [[Integer(n), 0].max, nla_v(2)].min
  242.     return n
  243.   end
  244.   #--------------------------------------------------------------------------
  245.   # ● 腕力の取得
  246.   #--------------------------------------------------------------------------
  247.   def str
  248.     n = [[base_str + @str_plus, 1].max, nla_v(3)].min
  249.     for i in @states
  250.       n *= $data_states.str_rate / 100.0
  251.     end
  252.     n = [[Integer(n), 1].max, nla_v(3)].min
  253.     return n
  254.   end
  255.   #--------------------------------------------------------------------------
  256.   # ● 器用さの取得
  257.   #--------------------------------------------------------------------------
  258.   def dex
  259.     n = [[base_dex + @dex_plus, 1].max, nla_v(3)].min
  260.     for i in @states
  261.       n *= $data_states.dex_rate / 100.0
  262.     end
  263.     n = [[Integer(n), 1].max, nla_v(3)].min
  264.     return n
  265.   end
  266.   #--------------------------------------------------------------------------
  267.   # ● 素早さの取得
  268.   #--------------------------------------------------------------------------
  269.   def agi
  270.     n = [[base_agi + @agi_plus, 1].max, nla_v(3)].min
  271.     for i in @states
  272.       n *= $data_states.agi_rate / 100.0
  273.     end
  274.     n = [[Integer(n), 1].max, nla_v(3)].min
  275.     return n
  276.   end
  277.   #--------------------------------------------------------------------------
  278.   # ● 魔力の取得
  279.   #--------------------------------------------------------------------------
  280.   def int
  281.     n = [[base_int + @int_plus, 1].max, nla_v(3)].min
  282.     for i in @states
  283.       n *= $data_states.int_rate / 100.0
  284.     end
  285.     n = [[Integer(n), 1].max, nla_v(3)].min
  286.     return n
  287.   end
  288.   #--------------------------------------------------------------------------
  289.   # ● MaxHP の設定
  290.   #     maxhp : 新しい MaxHP
  291.   #--------------------------------------------------------------------------
  292.   def maxhp=(maxhp)
  293.     @maxhp_plus += maxhp - self.maxhp
  294.     @maxhp_plus = [[@maxhp_plus, -nla_v(1)].max, nla_v(1)].min
  295.     @hp = [@hp, self.maxhp].min
  296.   end
  297.   #--------------------------------------------------------------------------
  298.   # ● MaxSP の設定
  299.   #     maxsp : 新しい MaxSP
  300.   #--------------------------------------------------------------------------
  301.   def maxsp=(maxsp)
  302.     @maxsp_plus += maxsp - self.maxsp
  303.     @maxsp_plus = [[@maxsp_plus, -nla_v(2)].max, nla_v(2)].min
  304.     @sp = [@sp, self.maxsp].min
  305.   end
  306.   #--------------------------------------------------------------------------
  307.   # ● 腕力の設定
  308.   #     str : 新しい腕力
  309.   #--------------------------------------------------------------------------
  310.   def str=(str)
  311.     @str_plus += str - self.str
  312.     @str_plus = [[@str_plus, -nla_v(3)].max, nla_v(3)].min
  313.   end
  314.   #--------------------------------------------------------------------------
  315.   # ● 器用さの設定
  316.   #     dex : 新しい器用さ
  317.   #--------------------------------------------------------------------------
  318.   def dex=(dex)
  319.     @dex_plus += dex - self.dex
  320.     @dex_plus = [[@dex_plus, -nla_v(3)].max, nla_v(3)].min
  321.   end
  322.   #--------------------------------------------------------------------------
  323.   # ● 素早さの設定
  324.   #     agi : 新しい素早さ
  325.   #--------------------------------------------------------------------------
  326.   def agi=(agi)
  327.     @agi_plus += agi - self.agi
  328.     @agi_plus = [[@agi_plus, -nla_v(3)].max, nla_v(3)].min
  329.   end
  330.   #--------------------------------------------------------------------------
  331.   # ● 魔力の設定
  332.   #     int : 新しい魔力
  333.   #--------------------------------------------------------------------------
  334.   def int=(int)
  335.     @int_plus += int - self.int
  336.     @int_plus = [[@int_plus, -nla_v(3)].max, nla_v(3)].min
  337.   end
  338. end
  339. #==============================================================================
  340. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  341. #==============================================================================
复制代码

代码在这,改哪里捏?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
给游戏制作者空间,还你一个乐趣无穷的网络。
回复

使用道具 举报

550

主题

9116

帖子

214748万

积分

超级版主

如同神一般的存在,腿神!拖后腿的神~~

Rank: 8Rank: 8

积分
2147483647
发表于 2016-5-21 22:51:20 | 显示全部楼层
因为 base_maxhp 和  base_maxsp 改变了啊。。。

改成原来的就好了

另外 def maxhp 的第一行

nxx =

可以删掉。
我就是你们的神,庶民们,追随我吧!跟着我一起拖后腿!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|幻想森林

GMT+8, 2024-4-18 15:59 , Processed in 0.020470 second(s), 21 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表