设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1551|回复: 6
打印 上一主题 下一主题

[已经解决] 定义角色新属性遇到的问题

[复制链接]

Lv2.观梦者

梦石
0
星屑
596
在线时间
797 小时
注册时间
2014-7-1
帖子
578

开拓者

跳转到指定楼层
1
发表于 2016-7-22 07:20:33 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

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

x
本帖最后由 jiushiainilip19 于 2016-7-22 07:40 编辑

这是我自己添加的角色新属性  可是这个只能在战斗中调用 无法在其他界面调用

比如在一些加点的界面用@actor.crt就会报错


这个该用什么样的方法去解决呢?

实在是不想用到那么多变量来给角色加属性!
RUBY 代码复制
  1. class Game_Actor < Game_Battler
  2.   attr_reader :crt                        # 暴击几率
  3.   attr_reader :maxcrts                    # 暴击增益
  4.   attr_reader :lucks                      # 运气
  5.   attr_reader :neictl                        # 内部穿透力
  6.   attr_reader :waictl                        # 外部穿透力
  7.   attr_reader :xihp                        # 吸血
  8.   attr_reader :xisp                        # 吸气
  9.  
  10.   alias mohuaiyuan201676_setup setup
  11.   def setup(actor_id)
  12.     mohuaiyuan201676_setup(actor_id)
  13.     @crt = 0
  14.     @maxcrts = 0
  15.     @lucks = 0
  16.     @neictl = 0
  17.     @waictl = 0
  18.     @xihp = 0
  19.     @xisp = 0
  20.   end
  21.   #● 定义暴击率
  22. def crt
  23.   n = str/2000+dex/2000+$game_variables[@actor_id+4850]
  24.   #天赋效果增加暴击率
  25.     case self.id
  26.      when 20 #玄霄
  27.        if self.battle_skill.include?(20) ; n += 15 ;end #[A天赋]冰火之力
  28.      when 13 #赵云
  29.        if self.battle_skill.include?(13) ; n += 10 ;end #[A天赋]勇冠三军
  30.      when 16 #步惊云
  31.        if self.battle_skill.include?(16) ; n += 30 ;end #[A天赋]火麒麟臂
  32.      end
  33.  
  34.     case @weapon_id
  35.      when 1..999
  36.       weapon = $data_weapons[@weapon_id]
  37.       n += weapon != nil ? weapon.str_plus/10 : 0
  38.     end
  39.     #一些装备下的状态增加暴击率
  40.     for i in @states
  41.     case i
  42.     when 124..125 ; n += 20  #万寿套 和 五彩套
  43.     when 133 ; n += 5   #不败套1
  44.     when 134 ; n += 10  #不败套2
  45.     when 135 ; n += 15  #不败套3
  46.     when 136 ; n += 20  #不败套4
  47.     when 137 ; n += 25  #不败套5 161 165
  48.     when 161 ; n += 5   #凌霄套1
  49.     when 162 ; n += 10  #凌霄套2
  50.     when 163 ; n += 15  #凌霄套3
  51.     when 164 ; n += 20  #凌霄套4
  52.     when 165 ; n += 25  #凌霄套5
  53.     when 698 ; n += 15  #幻彩金光石
  54.     when 697 ; n += 10 #碧玉海星石
  55.     when 284 ; n += $game_variables[3674] #内功葵花宝典
  56.     when 269 ; n += $game_variables[3672] #内功招臻无招
  57.     end;end
  58.       return [[n, 1].max, 300].min
  59.     end
  60.  
  61.  
  62.  
  63.  
  64.   #● 定义暴伤
  65.     def maxcrts
  66.       n = 100+str/100+dex/100+$game_variables[@actor_id+4825]
  67.  
  68. #星级附加效果增益
  69.   case $game_variables[3456]  #$墨星级
  70.     when 1;n+=10
  71.     when 2;n+=20
  72.     when 3;n+=40
  73.     when 4;n+=100
  74.     end
  75.  
  76.  
  77.   #天赋效果增加爆伤
  78.     case self.id
  79.      when 20 #玄霄
  80.        if self.battle_skill.include?(20) ; n += 20 ;end #[A天赋]冰火之力
  81.      when 15 #陆雪琪
  82.        if self.battle_skill.include?(15) ; n += 30 ;end #[A天赋]天地不仁
  83.      when 21 #墨鸭
  84.        if self.battle_skill.include?(25) ; n += 25 ;end #[A天赋]火麒麟臂
  85.      when 17 #聂风
  86.        if self.battle_skill.include?(17) ; n += 35 ;end #[A天赋]魔血爆发
  87.      end
  88.  
  89.      #专属武器每5点元神+1%暴击率!
  90.     case @weapon_id
  91.      when 1..999
  92.       weapon = $data_weapons[@weapon_id]
  93.       n += weapon != nil ? weapon.dex_plus/5 : 0
  94.     end
  95.     #一些装备下的状态增加暴击率
  96.       for i in @states
  97.        case i
  98.         when 124..125 ; n += 20 #万寿套 和 五彩套
  99.         when 133 ; n += 30 #不败套1
  100.         when 134 ; n += 40 #不败套2
  101.         when 135 ; n += 50 #不败套3
  102.         when 136 ; n += 60 #不败套4
  103.         when 137 ; n += 70#不败套5 161 165
  104.         when 161 ; n += 30 #凌霄套1
  105.         when 162 ; n += 40#凌霄套2
  106.         when 163 ; n += 50#凌霄套3
  107.         when 164 ; n += 60 #凌霄套4
  108.         when 165 ; n += 70 #凌霄套5
  109.         when 699 ; n += 30 #无上黑玄石
  110.         when 697 ; n += 10#碧玉海星石 696
  111.         when 275 ; n += [$game_variables[3678]*4,60].min#内功擒龙功
  112.         end;end
  113.       return [[n, 1].max, 500].min
  114.     end
  115.  
  116.  
  117.  
  118.  
  119.   #● 定义运气
  120.     def lucks
  121.       n = 1+$game_variables[@actor_id+4800]
  122.  
  123.   #天赋效果增加爆伤
  124.     case self.id
  125.      when 6 #赵灵儿
  126.        if self.battle_skill.include?(6) ; n += 10 ;end
  127.      when 12 #张良
  128.        if self.battle_skill.include?(12) ; n += 8 ;end
  129.      when 18 #宇文括
  130.        if self.battle_skill.include?(18) ; n += 7 ;end
  131.      when 23 #柳梦璃
  132.        if self.battle_skill.include?(27) ; n += 3 ;end
  133.      end
  134.  
  135.  
  136.     case @weapon_id
  137.      when 1..999
  138.       weapon = $data_weapons[@weapon_id]
  139.       n += weapon != nil ? weapon.agi_plus/30 : 0
  140.     end
  141.     #一些装备下的状态增加暴击率
  142.      for i in @states
  143.        case i
  144.         when 696 ; n += 10#第尊石
  145.         when 112 ; n += 2 #太乙1
  146.         when 113 ; n += 4 #太乙2
  147.         when 114 ; n += 6 #太乙3
  148.         when 115 ; n += 8 #太乙4
  149.         when 116 ; n += 10 #太乙5
  150.         when 118 ; n += 2 #乌光1
  151.         when 119 ; n += 4 #乌光2
  152.         when 120 ; n += 6 #乌光3
  153.         when 121 ; n += 8 #乌光4
  154.         when 122 ; n += 10 #乌光5
  155.         when 273 ; n += [$game_variables[3680],15].min#内功九阳神功
  156.        end
  157.      end
  158.       return [[n, 1].max, 100].min
  159.     end
  160.  
  161.  
  162.  
  163.  
  164.  
  165.   #● 定义内穿
  166.     def neictl
  167.       n = 1+$game_variables[@actor_id+4875]
  168.  
  169. #星级附加效果增益
  170.   case $game_variables[186]  #$陆星级
  171.     when 1;n+=20
  172.     when 2;n+=40
  173.     when 3;n+=60
  174.     when 4;n+=100
  175.     end
  176.   case $game_variables[3440]  #$玄星级
  177.     when 1;n+=20
  178.     when 2;n+=40
  179.     when 3;n+=60
  180.     when 4;n+=100
  181.     end
  182.  
  183.  
  184.   #天赋效果增加内穿
  185.     case self.id
  186.      when 14 #高月
  187.        if self.battle_skill.include?(14) ; n += 10 ;end
  188.      when 8 #大司命
  189.        if self.battle_skill.include?(8) ; n += 10 ;end
  190.      when 2 #少司命
  191.        if self.battle_skill.include?(2) ; n += 10 ;end
  192.      end
  193.  
  194.  
  195.     case @weapon_id
  196.      when 1..999
  197.       weapon = $data_weapons[@weapon_id]
  198.       n += weapon != nil ? weapon.int_plus/2 : 0
  199.     end
  200.  
  201.     #一些装备下的状态增加内穿
  202.      for i in @states
  203.        case i
  204.         when 143 ; n += 30  #天子3
  205.         when 144 ; n += 60  #天子4
  206.         when 145 ; n += 100 #天子5
  207.         when 272 ; n += $game_variables[3682] #太极心法
  208.         when 284 ; n += $game_variables[3674]*2 #内功葵花宝典
  209.         end;end
  210.  
  211.       return [[n, 1].max, 500].min
  212.     end
  213.  
  214.  
  215.  
  216.  
  217.  
  218.   #● 定义外穿
  219.     def waictl
  220.       n = 1+$game_variables[@actor_id+4900]
  221.  
  222. #星级附加效果增益
  223.   case $game_variables[90]  #$卫星级
  224.     when 1;n+=20
  225.     when 2;n+=40
  226.     when 3;n+=60
  227.     when 4;n+=100
  228.     end
  229.   case $game_variables[180] #$赵星级
  230.     when 1;n+=20
  231.     when 2;n+=40
  232.     when 3;n+=60
  233.     when 4;n+=100
  234.     end
  235.  
  236.  
  237.  
  238.   #天赋效果增加外穿
  239.     case self.id
  240.      when 10 #吕布
  241.        if self.battle_skill.include?(10) ; n += 10 ;end
  242.      when 1 #卫庄
  243.        if self.battle_skill.include?(1) ; n += 10 ;end
  244.      when 19 #夏侯仪
  245.        if self.battle_skill.include?(19) ; n += 10 ;end
  246.        end
  247.  
  248.  
  249.     case @weapon_id
  250.      when 1..999
  251.       weapon = $data_weapons[@weapon_id]
  252.       n += weapon != nil ? weapon.int_plus/2 : 0
  253.     end
  254.  
  255.     #一些装备下的状态增加外穿
  256.      for i in @states
  257.        case i
  258.         when 139 ; n += 30 #苍云3
  259.         when 140 ; n += 60 #苍云4
  260.         when 141 ; n += 100 #苍云5
  261.         when 284 ; n += $game_variables[3674]*2#内功葵花宝典
  262.         when 400 ; n += $data_states[400].pdef_rate
  263.         end;end   
  264.       return [[n, 1].max, 500].min
  265.     end
  266.  
  267.  
  268.  
  269.   #● 定义吸血
  270.     def xihp
  271.       n = $game_variables[3692]+$game_variables[@actor_id+4925]
  272.  
  273. #星级附加效果增益
  274.   case $game_variables[173]  #$燕星级
  275.     when 1;n+=2
  276.     when 2;n+=3
  277.     when 3;n+=4
  278.     when 4;n+=5
  279.     end
  280.   case $game_variables[3463]  #$慕容紫英
  281.     when 1;n+=2
  282.     when 2;n+=3
  283.     when 3;n+=4
  284.     when 4;n+=5
  285.     end
  286.  
  287.   #天赋效果增加吸血
  288.     case self.id
  289.      when 11 #燕丹
  290.        if self.battle_skill.include?(11) ; n += 10 ;end
  291.      when 4 #盖聂
  292.        if self.battle_skill.include?(4) ; n += 10 ;end
  293.      when 5 #天明
  294.        if self.battle_skill.include?(5) ; n += 10 ;end
  295.      when 22 #慕容紫英
  296.        if self.battle_skill.include?(26) ; n += 5 ;end
  297.        end
  298.  
  299.  
  300.     case @weapon_id
  301.      when 1..999
  302.       weapon = $data_weapons[@weapon_id]
  303.       n += weapon != nil ? weapon.atk/30: 0
  304.     end
  305.  
  306.     #一些装备下的状态增加吸血
  307.      for i in @states
  308.        case i
  309.         when 139 ; n +=  5 #苍云3
  310.         when 140 ; n +=  8 #苍云4
  311.         when 141 ; n += 10 #苍云5
  312.         when 695 ; n += 15 #九玄破空石
  313.         when 693 ; n += 10 #字母阴阳石
  314.         when 276 ; n += $game_variables[3676] #内功九阴真经全本
  315.         when 284 ; n += $game_variables[3674] #内功葵花宝典
  316.         end;end
  317.  
  318.       return [[n, 1].max, 150].min
  319.     end
  320.   #● 定义吸真
  321.     def xisp
  322.       n = $game_variables[3691]+$game_variables[@actor_id+4950]
  323.  
  324.  
  325. #星级附加效果增益
  326.   case $game_variables[183]  #$高星级
  327.     when 1;n+=2
  328.     when 2;n+=3
  329.     when 3;n+=4
  330.     when 4;n+=5
  331.     end
  332.   case $game_variables[3470]  #$柳梦璃星级
  333.     when 1;n+=2
  334.     when 2;n+=3
  335.     when 3;n+=4
  336.     when 4;n+=5
  337.     end
  338.  
  339.   #天赋效果增加吸真
  340.     case self.id
  341.      when 7 #李逍遥
  342.        if self.battle_skill.include?(7) ; n += 10 ;end
  343.      when 3 #冰雪莲
  344.        if self.battle_skill.include?(3) ; n += 10 ;end
  345.        end
  346.  
  347.      for i in @states
  348.        case i
  349.         when 143 ; n +=  5  #天子3
  350.         when 144 ; n +=  8  #天子4
  351.         when 145 ; n += 10  #天子5
  352.         when 694 ; n += 15#五彩斑斓石
  353.         when 693 ; n += 10# #字母阴阳石
  354.         when 276 ; n += $game_variables[3676]#内功九阴真经全本
  355.         when 284 ; n += $game_variables[3674]#内功葵花宝典
  356.         end;end
  357.  
  358.       weapon = $data_weapons[@weapon_id]
  359.       n += weapon != nil ? weapon.atk/30: 0
  360.  
  361.       return [[n, 1].max, 150].min
  362.     end
  363.  
  364.   #---------------------------------------------------------------------------
  365.   #● 最大威力成长属性
  366.   #---------------------------------------------------------------------------
  367.   def zmax
  368.     n = 500+$game_variables[$威力[0+@actor.id]]*1000
  369.     n += (str + dex + agi)/ 20
  370.     return [[n, 1].max, 10000].min
  371.   end
  372.   #---------------------------------------------------------------------------
  373.   #● 角色战斗力
  374.   #---------------------------------------------------------------------------
  375.   def ce
  376.      n = str + dex + (atk * 10) + (int * 10) + $game_variables[99]
  377.  
  378. #星级附加效果增益
  379.   case $game_variables[164]  #$大星级
  380.     when 1;n+=300
  381.     when 2;n+=500
  382.     when 3;n+=800
  383.     when 4;n+=1000
  384.     end
  385.   case $game_variables[3432] #$夏星级
  386.     when 1;n+=300
  387.     when 2;n+=500
  388.     when 3;n+=800
  389.     when 4;n+=1000
  390.     end
  391.  
  392.  
  393.      for i in @states
  394.       case i
  395.        when 401 ; n += n * 50 /100
  396.        end
  397.      end
  398.      return [[n, 1].max, 65535].min
  399.   end
  400.  
  401.   #---------------------------------------------------------------------------
  402.   #● 定义个人回合
  403.   #---------------------------------------------------------------------------
  404.   def yxtr
  405.     n = 0
  406.     n += $game_variables[self.id + 187]
  407.     return n
  408.   end
  409. end
  410.  
  411. #==============================================================================
  412. class Window_Base < Window
  413.   #---------------------------------------------------------------------------
  414.   #● 战斗力描绘
  415.   #---------------------------------------------------------------------------
  416.   def draw_actor_ce(actor, x, y)
  417.     self.contents.font.color = system_color
  418.     self.contents.font.color = normal_color
  419.     self.contents.draw_text(x, y, 164, 80, "战斗力:"+actor.ce.to_s)
  420.   end
  421.   def draw_actor_crt(actor, x, y)
  422.     self.contents.font.color = system_color
  423.     self.contents.font.color = normal_color
  424.     self.contents.draw_text(x + 94, y, 164, 80, actor.crt.to_s+"%")
  425.   end  
  426.   def draw_actor_maxcrts(actor, x, y)  
  427.     self.contents.font.color = system_color
  428.     self.contents.font.color = normal_color
  429.     self.contents.draw_text(x + 94, y, 164, 80, actor.maxcrts.to_s+"%")
  430.   end  
  431.   def draw_actor_lucks(actor, x, y)  
  432.     self.contents.font.color = system_color
  433.     self.contents.font.color = normal_color
  434.     self.contents.draw_text(x + 94, y, 164, 80, actor.lucks.to_s+"%")
  435.   end  
  436.   def draw_actor_neictl(actor, x, y)  
  437.     self.contents.font.color = system_color
  438.     self.contents.font.color = normal_color
  439.     self.contents.draw_text(x + 94, y, 164, 80, actor.neictl.to_s)
  440.   end  
  441.   def draw_actor_waictl(actor, x, y)  
  442.     self.contents.font.color = system_color
  443.     self.contents.font.color = normal_color
  444.     self.contents.draw_text(x + 94, y, 164, 80, actor.waictl.to_s)
  445.   end  
  446.   def draw_actor_xihp(actor, x, y)  
  447.     self.contents.font.color = system_color
  448.     self.contents.font.color = normal_color
  449.     self.contents.draw_text(x + 94, y, 164, 80, actor.xihp.to_s+"%")
  450.   end  
  451.   def draw_actor_xisp(actor, x, y)  
  452.     self.contents.font.color = system_color
  453.     self.contents.font.color = normal_color
  454.     self.contents.draw_text(x + 94, y, 164, 80, actor.xisp.to_s+"%")
  455.   end  
  456.   def draw_actor_zmax(actor, x, y)  
  457.     self.contents.font.color = system_color
  458.     self.contents.font.color = normal_color
  459.     self.contents.draw_text(x + 94, y, 164, 80, actor.zmax.to_s+"点")
  460.   end  
  461.   end  
  462. end


RUBY 代码复制
  1. class Scene_Mstarlevel
  2.   #--------------------------------------------------------------------------
  3.   # ● 初始化对像$scene = Scene_Mstarlevel.new
  4.   #     actor_index : 角色索引  Scene_Mstarlevel
  5.   #--------------------------------------------------------------------------
  6.   def initialize(actor_index = 0, menu_index = 0)
  7.     @actor_index = actor_index
  8.     @menu_index = menu_index
  9.   end
  10.   #--------------------------------------------------------------------------
  11.   # ● 主处理
  12.   #--------------------------------------------------------------------------
  13.   def main
  14.     # 获取角色
  15.     @actor = $game_party.actors[@actor_index]
  16.     s1 = "暴击概率+"
  17.     s2 = "暴击增益+"
  18.     s3 = "江湖运气+"
  19.     s4 = "内招穿透+"
  20.     s5 = "外招穿透+"
  21.     s6 = "外招吸血+"
  22.     s7 = "内招吸真+"
  23.     @commandy_window = Window_Command.new(180, [s1,s2,s3,s4,s5,s6,s7])
  24.     @commandy_window.index = @menu_index
  25.     @commandy_window.back_opacity = 255
  26.     @commandy_window.active = false
  27.     #@command_window.visible = false
  28.     @commandy_window.x+=450
  29.     @commandy_window.y+=60
  30.  
  31.     # 生成状态窗口
  32.     @status_window = Window_Mstar.new(@actor)
  33.     @status_window.y =65
  34.     @help_window = Window_Mstar_Help.new   
  35.     @help_window.y =360
  36.     #选择窗口
  37.     @command_window = Window_MstarCommand.new
  38.     @command_window.y=0
  39.     # 执行过渡
  40.     Graphics.transition
  41.     # 主循环
  42.     loop do
  43.       # 刷新游戏画面
  44.       Graphics.update
  45.       # 刷新输入信息
  46.       Input.update
  47.       # 刷新画面
  48.       update
  49.       # 如果画面被切换的话就中断循环
  50.       if $scene != self
  51.         break
  52.       end
  53.     end
  54.     # 准备过渡
  55.     Graphics.freeze
  56.     # 释放窗口
  57.     @status_window.dispose
  58.     @help_window.dispose
  59.     @command_window.dispose
  60.     @commandy_window.dispose
  61.   end
  62.   #--------------------------------------------------------------------------
  63.   # ● 定义第二属性境界提升操作
  64.   #--------------------------------------------------------------------------
  65.   def update_commandy
  66.     if Input.trigger?(Input::B)
  67.       # 演奏取消 SE
  68.       $game_system.se_play($data_system.cancel_se)
  69.       @commandy_window.active = false
  70.       @command_window.active = true
  71.       # 切换到菜单画面
  72.       return
  73.     end
  74.     if Input.repeat?(Input::C)
  75.       $game_system.se_play($data_system.decision_se)
  76.       @actor = $game_party.actors[@actor_index]
  77.       case @commandy_window.index
  78.        when 0 #暴击概率 max30 #要石头防具
  79.          @actor.crt+=1
  80.          if $game_variables[@actor.id+4775]<30
  81.           if $game_party.armor_number($宝石[0+$game_variables[@actor.id+4775]])>=1
  82.              $game_variables[@actor.id+4850]+=1 #暴击概率
  83.              $game_variables[@actor.id+4775]+=1 #等级!
  84.              $game_party.lose_armor($宝石[0+$game_variables[@actor.id+4775]],1)
  85.              @status_window.refresh
  86.            else
  87.              $game_system.se_play($data_system.cancel_se)
  88.            end
  89.          end
  90.        when 1 #暴击增益 max100 4750 #绿色仙魂
  91.          if $game_variables[@actor.id+4750]<100
  92.            if $game_party.item_number(956)>=1
  93.               $game_variables[@actor.id+4825]+=1 #暴击增益
  94.               $game_variables[@actor.id+4750]+=1 #等级!
  95.               $game_party.lose_item(956,1)
  96.               @status_window.refresh
  97.             else
  98.              $game_system.se_play($data_system.cancel_se)
  99.            end
  100.          end
  101.        when 2 #江湖运气 max20 #金色仙魂
  102.          if $game_variables[@actor.id+4725]<20
  103.            if $game_party.item_number(960)>=1
  104.              $game_variables[@actor.id+4800]+=1
  105.              $game_variables[@actor.id+4725]+=1 #等级!
  106.              $game_party.lose_item(960,1)
  107.              @status_window.refresh
  108.            else
  109.              $game_system.se_play($data_system.cancel_se)
  110.            end
  111.          end
  112.  
  113.        when 3 #内招穿透 max100 #蓝色仙魂
  114.          if $game_variables[@actor.id+4700]<100
  115.            if $game_party.item_number(957)>=1
  116.               $game_variables[@actor.id+4875]+=1
  117.               $game_variables[@actor.id+4700]+=1 #等级!
  118.               $game_party.lose_item(957,1)
  119.               @status_window.refresh
  120.            else
  121.              $game_system.se_play($data_system.cancel_se)
  122.            end
  123.          end
  124.        when 4 #外招穿透 max100 #橙色仙魂
  125.          if $game_variables[@actor.id+4675]<100
  126.            if $game_party.item_number(958)>=1
  127.               $game_variables[@actor.id+4900]+=1
  128.               $game_variables[@actor.id+4675]+=1 #等级!
  129.               $game_party.lose_item(958,1)
  130.               @status_window.refresh
  131.            else
  132.              $game_system.se_play($data_system.cancel_se)
  133.            end
  134.          end
  135.        when 5 #吸血 max200% 紫色仙魂
  136.          if $game_variables[@actor.id+4650]<20
  137.            if $game_party.item_number(959)>=1
  138.               $game_variables[@actor.id+4925]+=1
  139.               $game_variables[@actor.id+4650]+=1 #等级!
  140.               $game_party.lose_item(959,1)
  141.               @status_window.refresh
  142.            else
  143.              $game_system.se_play($data_system.cancel_se)
  144.            end
  145.          end
  146.        when 6 #吸真 max200%
  147.          if $game_variables[@actor.id+4625]<20
  148.            if $game_party.item_number(959)>=1
  149.               $game_variables[@actor.id+4950]+=1
  150.               $game_variables[@actor.id+4625]+=1 #等级!
  151.               $game_party.lose_item(959,1)
  152.               @status_window.refresh
  153.            else
  154.              $game_system.se_play($data_system.cancel_se)
  155.            end
  156.          end
  157.  
  158.       end
  159.     end  
  160.     case @commandy_window.index
  161.       when 0 #暴击概率
  162.         if $game_variables[@actor.id+4775]<30
  163.            @text_1 = "目前需求吞噬:【"+$data_armors[$宝石[0+$game_variables[@actor.id+4775]]].name+"】"
  164.            @text_1_s1 = "拥有:【"+$game_party.armor_number($宝石[0+$game_variables[@actor.id+4775]]).to_s+"】个"
  165.            @text_1_s2 = "当前次数:"+$game_variables[@actor.id+4775].to_s+"次"
  166.            @help_window.mstar_help_text(@text_1,@text_1_s1,@text_1_s2)
  167.          else
  168.            @text_1 = "已经是最高级的了"
  169.            @help_window.mstar_help_text(@text_1)
  170.          end
  171.       when 1 #暴击增益
  172.         if $game_variables[@actor.id+4750]<100
  173.            @text_1 = "需求【绿色仙魂】一个:目前【"+$game_party.item_number(956).to_s+"】个"
  174.            @text_1_s2 = "目前进行了"+$game_variables[@actor.id+4750].to_s+"次提升"
  175.            @help_window.mstar_help_text(@text_1,@text_1_s2)
  176.          else
  177.            @text_1 = "已经是最高级的了"
  178.            @help_window.mstar_help_text(@text_1)
  179.          end
  180.       when 2 #运气
  181.         if $game_variables[@actor.id+4725]<20
  182.            @text_1 = "需求【金色仙魂】一个:目前【"+$game_party.item_number(960).to_s+"】个"
  183.            @text_1_s2 = "目前进行了"+$game_variables[@actor.id+4725].to_s+"次提升"
  184.            @help_window.mstar_help_text(@text_1,@text_1_s2)
  185.          else
  186.            @text_1 = "已经是最高级的了"
  187.            @help_window.mstar_help_text(@text_1)
  188.         end
  189.       when 3 #内穿
  190.         if $game_variables[@actor.id+4700]<100
  191.            @text_1 = "需求【蓝色仙魂】一个:目前【"+$game_party.item_number(957).to_s+"】个"
  192.            @text_1_s2 = "目前进行了"+$game_variables[@actor.id+4700].to_s+"次提升"
  193.            @help_window.mstar_help_text(@text_1,@text_1_s2)
  194.          else
  195.            @text_1 = "已经是最高级的了"
  196.            @help_window.mstar_help_text(@text_1)
  197.         end
  198.       when 4 #外穿
  199.         if $game_variables[@actor.id+4675]<100
  200.            @text_1 = "需求【橙色仙魂】一个:目前【"+$game_party.item_number(958).to_s+"】个"
  201.            @text_1_s2 = "目前进行了"+$game_variables[@actor.id+4675].to_s+"次提升"
  202.            @help_window.mstar_help_text(@text_1,@text_1_s2)
  203.          else
  204.            @text_1 = "已经是最高级的了"
  205.            @help_window.mstar_help_text(@text_1)
  206.         end
  207.       when 5 #吸血
  208.         if $game_variables[@actor.id+4650]<10000
  209.            @text_1 = "需求【紫色仙魂】一个:目前【"+$game_party.item_number(959).to_s+"】个"
  210.            @text_1_s2 = "目前进行了"+$game_variables[@actor.id+4650].to_s+"次提升"
  211.            @help_window.mstar_help_text(@text_1,@text_1_s2)
  212.          else
  213.            @text_1 = "已经是最高级的了"
  214.            @help_window.mstar_help_text(@text_1)
  215.         end
  216.       when 6 #吸真
  217.         if $game_variables[@actor.id+4625]<10000
  218.            @text_1 = "也需求【紫色仙魂】一个:目前【"+$game_party.item_number(959).to_s+"】个"
  219.            @text_1_s2 = "目前进行了"+$game_variables[@actor.id+4625].to_s+"次提升"
  220.            @help_window.mstar_help_text(@text_1,@text_1_s2)
  221.          else
  222.            @text_1 = "已经是最高级的了"
  223.            @help_window.mstar_help_text(@text_1)
  224.         end
  225.          return
  226.        end
  227.      end
  228.  
  229.  
  230.  
  231.  
  232.   #--------------------------------------------------------------------------
  233.   # ● 刷新画面 Scene_Mstarlevel $scene = Scene_Mstarlevel.new
  234.   #--------------------------------------------------------------------------
  235.   def update
  236.     @status_window.update
  237.     @help_window.update
  238.     @command_window.update
  239.     @commandy_window.update
  240.  
  241.     if @commandy_window.active
  242.       update_commandy
  243.       return
  244.     end
  245.  
  246.  
  247.     # 按下 B 键的情况下
  248.     if Input.trigger?(Input::B)
  249.       # 演奏取消 SE
  250.       $game_system.se_play($data_system.cancel_se)
  251.       # 切换到菜单画面
  252.       $scene = Scene_Menu.new(7)
  253.       return
  254.     end
  255. #=============================================================
  256. # 按下 C 键的情况下   $game_variables[27]=魂力 57 = 声望
  257. #=============================================================
  258.   if Input.trigger?(Input::C)
  259.    case @command_window.index
  260.      when 1 #角色升星 #最大2 也就是3星
  261.       case @actor.id
  262.         when 1 #卫庄
  263.           if $game_variables[90]<4 #8
  264.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[90]] &&
  265.                 $game_party.gold>=$灵魂递增[0+$game_variables[90]] &&
  266.                 $game_variables[27]>=$灵魂递增[0+$game_variables[90]] &&
  267.               #得出数值消耗结果
  268.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[90]])
  269.                 $game_party.lose_gold($灵魂递增[0+$game_variables[90]])
  270.                 $game_variables[27]-=$灵魂递增[0+$game_variables[90]]
  271.                 #记录消耗值 用于解散英雄之用
  272.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[90]]
  273.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[90]]
  274.                #得出星级提升结果
  275.                 for i in 3001..3007
  276.                   $game_variables[i]+=1
  277.                 end
  278.                 $game_variables[90]+=1
  279.                 $game_system.se_play($data_system.battle_start_se)
  280.                 $卫庄名字=["卫庄","仙-卫庄","神-卫庄","玄-卫庄","真-卫庄","圣-卫庄","极-卫庄","元-卫庄","上清-卫庄"]
  281.                 $game_actors[1].name = $卫庄名字[0+$game_variables[90]]              
  282.                 @status_window.refresh
  283.               else
  284.                 $game_system.se_play($data_system.cancel_se)
  285.               end
  286.             end
  287. #=======================卫庄结束======================
  288.         when 2 #少司命
  289.           if $game_variables[93]<4
  290.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[93]] &&
  291.                 $game_party.gold>=$灵魂递增[0+$game_variables[93]] &&
  292.                 $game_variables[27]>=$灵魂递增[0+$game_variables[93]] &&
  293.               #得出数值消耗结果
  294.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[93]])
  295.                 $game_party.lose_gold($灵魂递增[0+$game_variables[93]])
  296.                 $game_variables[27]-=$灵魂递增[0+$game_variables[93]]
  297.                 #记录消耗值 用于解散英雄之用
  298.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[93]]
  299.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[93]]
  300.               #得出星级提升结果
  301.                 for i in 3008..3014
  302.                   $game_variables[i]+=1
  303.                 end
  304.                 $game_variables[93]+=1
  305.                 $game_system.se_play($data_system.battle_start_se)
  306.                 $少司命名字=["少司命","仙-少司命","神-少司命","玄-少司命","真-少司命","圣-少司命","极-少司命","元-少司命","上清-少司命"]
  307.                 $game_actors[2].name = $少司命名字[0+$game_variables[93]]              
  308.                 @status_window.refresh
  309.               else
  310.                 $game_system.se_play($data_system.cancel_se)
  311.               end
  312.             end
  313. #=======================少司命结束======================
  314.         when 3 #冰雪莲
  315.           if $game_variables[96]<4
  316.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[96]] &&
  317.                 $game_party.gold>=$灵魂递增[0+$game_variables[96]] &&
  318.                 $game_variables[27]>=$灵魂递增[0+$game_variables[96]] &&
  319.               #得出数值消耗结果
  320.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[96]])
  321.                 $game_party.lose_gold($灵魂递增[0+$game_variables[96]])
  322.                 $game_variables[27]-=$灵魂递增[0+$game_variables[96]]
  323.                 #记录消耗值 用于解散英雄之用
  324.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[96]]
  325.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[96]]
  326.               #得出星级提升结果
  327.                 for i in 3015..3021
  328.                   $game_variables[i]+=1
  329.                 end
  330.                 $game_variables[96]+=1
  331.                 $game_system.se_play($data_system.battle_start_se)
  332.                 $冰雪莲名字=["冰雪莲","仙-冰雪莲","神-冰雪莲","玄-冰雪莲","真-冰雪莲","圣-冰雪莲","极-冰雪莲","元-冰雪莲","上清-冰雪莲"]
  333.                 $game_actors[3].name = $冰雪莲名字[0+$game_variables[96]]              
  334.                 @status_window.refresh
  335.               else
  336.                 $game_system.se_play($data_system.cancel_se)
  337.               end
  338.             end
  339. #=======================冰雪莲结束======================
  340.         when 4 #盖聂
  341.           if $game_variables[152]<4
  342.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[152]] &&
  343.                 $game_party.gold>=$灵魂递增[0+$game_variables[152]] &&
  344.                 $game_variables[27]>=$灵魂递增[0+$game_variables[152]] &&
  345.               #得出数值消耗结果
  346.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[152]])
  347.                 $game_party.lose_gold($灵魂递增[0+$game_variables[152]])
  348.                 $game_variables[27]-=$灵魂递增[0+$game_variables[152]]
  349.                 #记录消耗值 用于解散英雄之用
  350.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[152]]
  351.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[152]]
  352.               #得出星级提升结果
  353.                 for i in 3022..3028
  354.                   $game_variables[i]+=1
  355.                 end
  356.                 $game_variables[152]+=1
  357.                 $game_system.se_play($data_system.battle_start_se)
  358.                 $盖聂名字=["盖聂","仙-盖聂","神-盖聂","玄-盖聂","真-盖聂","圣-盖聂","极-盖聂","元-盖聂","上清-盖聂"]
  359.                 $game_actors[4].name = $盖聂名字[0+$game_variables[152]]              
  360.                 @status_window.refresh
  361.               else
  362.                 $game_system.se_play($data_system.cancel_se)
  363.               end
  364.             end
  365. #=======================盖聂结束======================
  366.         when 5 #天明
  367.           if $game_variables[155]<4
  368.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[155]] &&
  369.                 $game_party.gold>=$灵魂递增[0+$game_variables[155]] &&
  370.                 $game_variables[27]>=$灵魂递增[0+$game_variables[155]] &&
  371.               #得出数值消耗结果
  372.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[155]])
  373.                 $game_party.lose_gold($灵魂递增[0+$game_variables[155]])
  374.                 $game_variables[27]-=$灵魂递增[0+$game_variables[155]]
  375.                 #记录消耗值 用于解散英雄之用
  376.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[155]]
  377.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[155]]
  378.               #得出星级提升结果
  379.                 for i in 3029..3035
  380.                   $game_variables[i]+=1
  381.                 end
  382.                 $game_variables[155]+=1
  383.                 $game_system.se_play($data_system.battle_start_se)
  384.                 $天明名字=["玉煞天明","仙-玉煞天明","神-玉煞天明","玄-玉煞天明","真-天明","圣-天明","极-天明","元-天明","上清-天明"]
  385.                 $game_actors[5].name = $天明名字[0+$game_variables[155]]              
  386.                 @status_window.refresh
  387.               else
  388.                 $game_system.se_play($data_system.cancel_se)
  389.               end
  390.             end
  391. #=======================天明结束======================
  392.         when 6 #赵灵儿
  393.           if $game_variables[158]<4
  394.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[158]] &&
  395.                 $game_party.gold>=$灵魂递增[0+$game_variables[158]] &&
  396.                 $game_variables[27]>=$灵魂递增[0+$game_variables[158]] &&
  397.               #得出数值消耗结果
  398.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[158]])
  399.                 $game_party.lose_gold($灵魂递增[0+$game_variables[158]])
  400.                 $game_variables[27]-=$灵魂递增[0+$game_variables[158]]
  401.                 #记录消耗值 用于解散英雄之用
  402.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[158]]
  403.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[158]]
  404.               #得出星级提升结果
  405.                 for i in 3036..3042
  406.                   $game_variables[i]+=1
  407.                 end
  408.                 $game_variables[158]+=1
  409.                 $game_system.se_play($data_system.battle_start_se)
  410.                 $赵灵儿名字=["赵灵儿","仙-赵灵儿","神-赵灵儿","玄-赵灵儿","真-赵灵儿","圣-赵灵儿","极-赵灵儿","元-赵灵儿","上清-赵灵儿"]
  411.                 $game_actors[6].name = $赵灵儿名字[0+$game_variables[158]]              
  412.                 @status_window.refresh
  413.               else
  414.                 $game_system.se_play($data_system.cancel_se)
  415.               end
  416.             end
  417. #=======================赵灵儿结束======================
  418.         when 7 #李逍遥
  419.           if $game_variables[161]<4
  420.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[161]] &&
  421.                 $game_party.gold>=$灵魂递增[0+$game_variables[161]] &&
  422.                 $game_variables[27]>=$灵魂递增[0+$game_variables[161]] &&
  423.               #得出数值消耗结果
  424.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[161]])
  425.                 $game_party.lose_gold($灵魂递增[0+$game_variables[161]])
  426.                 $game_variables[27]-=$灵魂递增[0+$game_variables[161]]
  427.                 #记录消耗值 用于解散英雄之用
  428.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[161]]
  429.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[161]]
  430.               #得出星级提升结果
  431.                 for i in 3043..3049
  432.                   $game_variables[i]+=1
  433.                 end
  434.                 $game_variables[161]+=1
  435.                 $game_system.se_play($data_system.battle_start_se)
  436.                 $李逍遥名字=["李逍遥","仙-李逍遥","神-李逍遥","玄-李逍遥","真-李逍遥","圣-李逍遥","极-李逍遥","元-李逍遥","上清-李逍遥"]
  437.                 $game_actors[7].name = $李逍遥名字[0+$game_variables[161]]              
  438.                 @status_window.refresh
  439.               else
  440.                 $game_system.se_play($data_system.cancel_se)
  441.               end
  442.             end
  443. #=======================李逍遥结束======================
  444.         when 8 #大司命
  445.           if $game_variables[164]<4
  446.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[164]] &&
  447.                 $game_party.gold>=$灵魂递增[0+$game_variables[164]] &&
  448.                 $game_variables[27]>=$灵魂递增[0+$game_variables[164]] &&
  449.               #得出数值消耗结果
  450.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[164]])
  451.                 $game_party.lose_gold($灵魂递增[0+$game_variables[164]])
  452.                 $game_variables[27]-=$灵魂递增[0+$game_variables[164]]
  453.                 #记录消耗值 用于解散英雄之用
  454.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[164]]
  455.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[164]]
  456.               #得出星级提升结果
  457.                 for i in 3050..3056
  458.                   $game_variables[i]+=1
  459.                 end
  460.                 $game_variables[164]+=1
  461.                 $game_system.se_play($data_system.battle_start_se)
  462.                 $大司命名字=["大司命","仙-大司命","神-大司命","玄-大司命","真-大司命","圣-大司命","极-大司命","元-大司命","上清-大司命"]
  463.                 $game_actors[8].name = $大司命名字[0+$game_variables[164]]              
  464.                 @status_window.refresh
  465.               else
  466.                 $game_system.se_play($data_system.cancel_se)
  467.               end
  468.             end
  469. #=======================大司命结束======================
  470.         when 9 #重楼
  471.           if $game_variables[167]<4
  472.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[167]] &&
  473.                 $game_party.gold>=$灵魂递增[0+$game_variables[167]] &&
  474.                 $game_variables[27]>=$灵魂递增[0+$game_variables[167]] &&
  475.               #得出数值消耗结果
  476.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[167]])
  477.                 $game_party.lose_gold($灵魂递增[0+$game_variables[167]])
  478.                 $game_variables[27]-=$灵魂递增[0+$game_variables[167]]
  479.                 #记录消耗值 用于解散英雄之用
  480.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[167]]
  481.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[167]]
  482.               #得出星级提升结果
  483.                 for i in 3057..3063
  484.                   $game_variables[i]+=1
  485.                 end
  486.                 $game_variables[167]+=1
  487.                 $game_system.se_play($data_system.battle_start_se)
  488.                 $重楼名字=["重楼","仙-重楼","神-重楼","玄-重楼","真-重楼","圣-重楼","极-重楼","元-重楼","上清-重楼"]
  489.                 $game_actors[9].name = $重楼名字[0+$game_variables[167]]              
  490.                 @status_window.refresh
  491.               else
  492.                 $game_system.se_play($data_system.cancel_se)
  493.               end
  494.             end
  495. #=======================重楼结束======================
  496.         when 10 #吕布
  497.           if $game_variables[170]<4
  498.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[170]] &&
  499.                 $game_party.gold>=$灵魂递增[0+$game_variables[170]] &&
  500.                 $game_variables[27]>=$灵魂递增[0+$game_variables[170]] &&
  501.               #得出数值消耗结果
  502.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[170]])
  503.                 $game_party.lose_gold($灵魂递增[0+$game_variables[170]])
  504.                 $game_variables[27]-=$灵魂递增[0+$game_variables[170]]
  505.                 #记录消耗值 用于解散英雄之用
  506.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[170]]
  507.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[170]]
  508.               #得出星级提升结果
  509.                 for i in 3064..3070
  510.                   $game_variables[i]+=1
  511.                 end
  512.                 $game_variables[170]+=1
  513.                 $game_system.se_play($data_system.battle_start_se)
  514.                 $吕布名字=["吕布","仙-吕布","神-吕布","玄-吕布","真-吕布","圣-吕布","极-吕布","元-吕布","上清-吕布"]
  515.                 $game_actors[10].name = $吕布名字[0+$game_variables[170]]              
  516.                 @status_window.refresh
  517.               else
  518.                 $game_system.se_play($data_system.cancel_se)
  519.               end
  520.             end
  521. #=======================吕布结束======================
  522.         when 11 #燕丹
  523.           if $game_variables[173]<4
  524.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[173]] &&
  525.                 $game_party.gold>=$灵魂递增[0+$game_variables[173]] &&
  526.                 $game_variables[27]>=$灵魂递增[0+$game_variables[173]] &&
  527.               #得出数值消耗结果
  528.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[173]])
  529.                 $game_party.lose_gold($灵魂递增[0+$game_variables[173]])
  530.                 $game_variables[27]-=$灵魂递增[0+$game_variables[173]]
  531.                 #记录消耗值 用于解散英雄之用
  532.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[173]]
  533.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[173]]
  534.               #得出星级提升结果
  535.                 for i in 3071..3077
  536.                   $game_variables[i]+=1
  537.                 end
  538.                 $game_variables[173]+=1
  539.                 $game_system.se_play($data_system.battle_start_se)
  540.                 $燕丹名字=["燕丹","仙-燕丹","神-燕丹","玄-燕丹","真-燕丹","圣-燕丹","极-燕丹","元-燕丹","上清-燕丹"]
  541.                 $game_actors[11].name = $燕丹名字[0+$game_variables[173]]              
  542.                 @status_window.refresh
  543.               else
  544.                 $game_system.se_play($data_system.cancel_se)
  545.               end
  546.             end
  547. #=======================燕丹结束======================
  548.         when 12 #张良
  549.           if $game_variables[177]<4
  550.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[177]] &&
  551.                 $game_party.gold>=$灵魂递增[0+$game_variables[177]] &&
  552.                 $game_variables[27]>=$灵魂递增[0+$game_variables[177]] &&
  553.               #得出数值消耗结果
  554.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[177]])
  555.                 $game_party.lose_gold($灵魂递增[0+$game_variables[177]])
  556.                 $game_variables[27]-=$灵魂递增[0+$game_variables[177]]
  557.                 #记录消耗值 用于解散英雄之用
  558.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[177]]
  559.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[177]]
  560.               #得出星级提升结果
  561.                 for i in 3078..3084
  562.                   $game_variables[i]+=1
  563.                 end
  564.                 $game_variables[177]+=1
  565.                 $game_system.se_play($data_system.battle_start_se)
  566.                 $张良名字=["张良","仙-张良","神-张良","玄-张良","真-张良","圣-张良","极-张良","元-张良","上清-张良"]
  567.                 $game_actors[12].name = $张良名字[0+$game_variables[177]]              
  568.                 @status_window.refresh
  569.               else
  570.                 $game_system.se_play($data_system.cancel_se)
  571.               end
  572.             end
  573. #=======================张良结束======================
  574.         when 13 #赵云
  575.           if $game_variables[180]<4
  576.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[180]] &&
  577.                 $game_party.gold>=$灵魂递增[0+$game_variables[180]] &&
  578.                 $game_variables[27]>=$灵魂递增[0+$game_variables[180]] &&
  579.               #得出数值消耗结果
  580.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[180]])
  581.                 $game_party.lose_gold($灵魂递增[0+$game_variables[180]])
  582.                 $game_variables[27]-=$灵魂递增[0+$game_variables[180]]
  583.                 #记录消耗值 用于解散英雄之用
  584.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[180]]
  585.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[180]]
  586.               #得出星级提升结果
  587.                 for i in 3085..3091
  588.                   $game_variables[i]+=1
  589.                 end
  590.                 $game_variables[180]+=1
  591.                 $game_system.se_play($data_system.battle_start_se)
  592.                 $赵云名字=["赵云","仙-赵云","神-赵云","玄-赵云","真-赵云","圣-赵云","极-赵云","元-赵云","上清-赵云"]
  593.                 $game_actors[13].name = $赵云名字[0+$game_variables[180]]              
  594.                 @status_window.refresh
  595.               else
  596.                 $game_system.se_play($data_system.cancel_se)
  597.               end
  598.             end
  599. #=======================赵云结束======================
  600.         when 14 #高月
  601.           if $game_variables[183]<4
  602.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[183]] &&
  603.                 $game_party.gold>=$灵魂递增[0+$game_variables[183]] &&
  604.                 $game_variables[27]>=$灵魂递增[0+$game_variables[183]] &&
  605.               #得出数值消耗结果
  606.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[183]])
  607.                 $game_party.lose_gold($灵魂递增[0+$game_variables[183]])
  608.                 $game_variables[27]-=$灵魂递增[0+$game_variables[183]]
  609.                 #记录消耗值 用于解散英雄之用
  610.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[183]]
  611.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[183]]
  612.               #得出星级提升结果
  613.                 for i in 3092..3098
  614.                   $game_variables[i]+=1
  615.                 end
  616.                 $game_variables[183]+=1
  617.                 $game_system.se_play($data_system.battle_start_se)
  618.                 $高月名字=["高月","仙-高月","神-高月","玄-高月","真-高月","圣-高月","极-高月","元-高月","上清-高月"]
  619.                 $game_actors[14].name = $高月名字[0+$game_variables[183]]              
  620.                 @status_window.refresh
  621.               else
  622.                 $game_system.se_play($data_system.cancel_se)
  623.               end
  624.             end
  625. #=======================高月结束======================
  626.         when 15 #陆雪琪
  627.           if $game_variables[186]<4
  628.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[186]] &&
  629.                 $game_party.gold>=$灵魂递增[0+$game_variables[186]] &&
  630.                 $game_variables[27]>=$灵魂递增[0+$game_variables[186]] &&
  631.               #得出数值消耗结果
  632.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[186]])
  633.                 $game_party.lose_gold($灵魂递增[0+$game_variables[186]])
  634.                 $game_variables[27]-=$灵魂递增[0+$game_variables[186]]
  635.                 #记录消耗值 用于解散英雄之用
  636.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[186]]
  637.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[186]]
  638.               #得出星级提升结果
  639.                 for i in 3099..3105
  640.                   $game_variables[i]+=1
  641.                 end
  642.                 $game_variables[186]+=1
  643.                 $game_system.se_play($data_system.battle_start_se)
  644.                 $陆雪琪名字=["陆雪琪","仙-陆雪琪","神-陆雪琪","玄-陆雪琪","真-陆雪琪","圣-陆雪琪","极-陆雪琪","元-陆雪琪","上清-陆雪琪"]
  645.                 $game_actors[15].name = $陆雪琪名字[0+$game_variables[186]]              
  646.                 @status_window.refresh
  647.               else
  648.                 $game_system.se_play($data_system.cancel_se)
  649.               end
  650.             end
  651. #=======================陆雪琪结束======================
  652.         when 16 #步惊云
  653.           if $game_variables[3429]<4
  654.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3429]] &&
  655.                 $game_party.gold>=$灵魂递增[0+$game_variables[3429]] &&
  656.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3429]] &&
  657.               #得出数值消耗结果
  658.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3429]])
  659.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3429]])
  660.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3429]]
  661.                 #记录消耗值 用于解散英雄之用
  662.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3429]]
  663.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3429]]
  664.               #得出星级提升结果
  665.                 for i in 3401..3407
  666.                   $game_variables[i]+=1
  667.                 end
  668.                 $game_variables[3429]+=1
  669.                 $game_system.se_play($data_system.battle_start_se)
  670.                 $步惊云名字=["步惊云","仙-步惊云","神-步惊云","玄-步惊云","真-步惊云","圣-步惊云","极-步惊云","元-步惊云","上清-步惊云"]
  671.                 $game_actors[16].name = $步惊云名字[0+$game_variables[3429]]              
  672.                 @status_window.refresh
  673.               else
  674.                 $game_system.se_play($data_system.cancel_se)
  675.               end
  676.             end
  677. #=======================步惊云结束======================
  678.         when 17 #聂风
  679.           if $game_variables[3430]<4
  680.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3430]] &&
  681.                 $game_party.gold>=$灵魂递增[0+$game_variables[3430]] &&
  682.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3430]] &&
  683.               #得出数值消耗结果
  684.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3430]])
  685.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3430]])
  686.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3430]]
  687.                 #记录消耗值 用于解散英雄之用
  688.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3430]]
  689.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3430]]
  690.               #得出星级提升结果
  691.                 for i in 3408..3414
  692.                   $game_variables[i]+=1
  693.                 end
  694.                 $game_variables[3430]+=1
  695.                 $game_system.se_play($data_system.battle_start_se)
  696.                 $聂风名字=["聂风","仙-聂风","神-聂风","玄-聂风","真-聂风","圣-聂风","极-聂风","元-聂风","上清-聂风"]
  697.                 $game_actors[17].name = $聂风名字[0+$game_variables[3430]]              
  698.                 @status_window.refresh
  699.               else
  700.                 $game_system.se_play($data_system.cancel_se)
  701.               end
  702.             end
  703. #=======================聂风结束======================
  704.         when 18 #宇文括
  705.           if $game_variables[3431]<4
  706.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3431]] &&
  707.                 $game_party.gold>=$灵魂递增[0+$game_variables[3431]] &&
  708.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3431]] &&
  709.               #得出数值消耗结果
  710.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3431]])
  711.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3431]])
  712.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3431]]
  713.                 #记录消耗值 用于解散英雄之用
  714.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3431]]
  715.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3431]]
  716.               #得出星级提升结果
  717.                 for i in 3415..3421
  718.                   $game_variables[i]+=1
  719.                 end
  720.                 $game_variables[3431]+=1
  721.                 $game_system.se_play($data_system.battle_start_se)
  722.                 $宇文括名字=["宇文括","仙-宇文括","神-宇文括","玄-宇文括","真-宇文括","圣-宇文括","极-宇文括","元-宇文括","上清-宇文括"]
  723.                 $game_actors[18].name = $宇文括名字[0+$game_variables[3431]]              
  724.                 @status_window.refresh
  725.               else
  726.                 $game_system.se_play($data_system.cancel_se)
  727.               end
  728.             end
  729. #=======================宇文括结束======================
  730.         when 19 #夏侯仪
  731.           if $game_variables[3432]<4
  732.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3432]] &&
  733.                 $game_party.gold>=$灵魂递增[0+$game_variables[3432]] &&
  734.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3432]] &&
  735.               #得出数值消耗结果
  736.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3432]])
  737.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3432]])
  738.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3432]]
  739.                 #记录消耗值 用于解散英雄之用
  740.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3432]]
  741.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3432]]
  742.               #得出星级提升结果
  743.                 for i in 3422..3428
  744.                   $game_variables[i]+=1
  745.                 end
  746.                 $game_variables[3432]+=1
  747.                 $game_system.se_play($data_system.battle_start_se)
  748.                 $夏侯仪名字=["夏侯仪","仙-夏侯仪","神-夏侯仪","玄-夏侯仪","真-夏侯仪","圣-夏侯仪","极-夏侯仪","元-夏侯仪","上清-夏侯仪"]
  749.                 $game_actors[19].name = $夏侯仪名字[0+$game_variables[3432]]              
  750.                 @status_window.refresh
  751.               else
  752.                 $game_system.se_play($data_system.cancel_se)
  753.               end
  754.             end
  755. #=======================夏侯仪结束======================
  756.         when 20 #玄霄
  757.           if $game_variables[3440]<4
  758.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3440]] &&
  759.                 $game_party.gold>=$灵魂递增[0+$game_variables[3440]] &&
  760.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3440]] &&
  761.               #得出数值消耗结果
  762.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3440]])
  763.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3440]])
  764.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3440]]
  765.                 #记录消耗值 用于解散英雄之用
  766.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3440]]
  767.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3440]]
  768.               #得出星级提升结果
  769.                 for i in 3433..3439
  770.                   $game_variables[i]+=1
  771.                 end
  772.                 $game_variables[3440]+=1
  773.                 $game_system.se_play($data_system.battle_start_se)
  774.                 $玄霄名字=["玄霄","仙-玄霄","神-玄霄","玄-玄霄","真-玄霄","圣-玄霄","极-玄霄","元-玄霄","上清-玄霄"]
  775.                 $game_actors[20].name = $玄霄名字[0+$game_variables[3440]]              
  776.                 @status_window.refresh
  777.               else
  778.                 $game_system.se_play($data_system.cancel_se)
  779.               end
  780.             end
  781. #=======================玄霄结束======================
  782.         when 21#墨鸭
  783.           if $game_variables[3456]<4
  784.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3456]] &&
  785.                 $game_party.gold>=$灵魂递增[0+$game_variables[3456]] &&
  786.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3456]] &&
  787.               #得出数值消耗结果
  788.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3456]])
  789.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3456]])
  790.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3456]]
  791.                 #记录消耗值 用于解散英雄之用
  792.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3456]]
  793.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3456]]
  794.               #得出星级提升结果
  795.                 for i in 3451..3455
  796.                   $game_variables[i]+=1
  797.                 end
  798.                 $game_variables[3456]+=1
  799.                 $game_system.se_play($data_system.battle_start_se)
  800.                 $墨鸦名字=["墨鸦","仙-墨鸦","神-墨鸦","玄-墨鸦","真-墨鸦","圣-墨鸦","极-墨鸦","元-墨鸦","上清-墨鸦"]
  801.                 $game_actors[21].name = $墨鸦名字[0+$game_variables[3456]]              
  802.                 @status_window.refresh
  803.               else
  804.                 $game_system.se_play($data_system.cancel_se)
  805.               end
  806.             end
  807. #=======================墨鸦结束======================
  808.         when 22#慕容紫英
  809.           if $game_variables[3463]<4
  810.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3463]] &&
  811.                 $game_party.gold>=$灵魂递增[0+$game_variables[3463]] &&
  812.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3463]] &&
  813.               #得出数值消耗结果
  814.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3463]])
  815.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3463]])
  816.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3463]]
  817.                 #记录消耗值 用于解散英雄之用
  818.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3463]]
  819.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3463]]
  820.               #得出星级提升结果
  821.                 for i in 3458..3462
  822.                   $game_variables[i]+=1
  823.                 end
  824.                 $game_variables[3463]+=1
  825.                 $game_system.se_play($data_system.battle_start_se)
  826.                 $慕容紫英名字=["慕容紫英","仙-慕容紫英","神-慕容紫英","玄-慕容紫英","真-慕容紫英","圣-慕容紫英","极-慕容紫英","元-慕容紫英","上清-慕容紫英"]
  827.                 $game_actors[22].name = $慕容紫英名字[0+$game_variables[3463]]              
  828.                 @status_window.refresh
  829.               else
  830.                 $game_system.se_play($data_system.cancel_se)
  831.               end
  832.             end
  833. #=======================慕容紫英结束======================
  834.         when 23#柳梦璃
  835.           if $game_variables[3470]<4
  836.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3470]] &&
  837.                 $game_party.gold>=$灵魂递增[0+$game_variables[3470]] &&
  838.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3470]] &&
  839.               #得出数值消耗结果
  840.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3470]])
  841.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3470]])
  842.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3470]]
  843.                 #记录消耗值 用于解散英雄之用
  844.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3470]]
  845.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3470]]
  846.               #得出星级提升结果
  847.                 for i in 3465..3469
  848.                   $game_variables[i]+=1
  849.                 end
  850.                 $game_variables[3470]+=1
  851.                 $game_system.se_play($data_system.battle_start_se)
  852.                 $柳梦璃名字=["柳梦璃","仙-柳梦璃","神-柳梦璃","玄-柳梦璃","真-柳梦璃","圣-柳梦璃","极-柳梦璃","元-柳梦璃","上清-柳梦璃"]
  853.                 $game_actors[23].name = $柳梦璃名字[0+$game_variables[3470]]              
  854.                 @status_window.refresh
  855.               else
  856.                 $game_system.se_play($data_system.cancel_se)
  857.               end
  858.             end
  859. #=======================慕容紫英结束======================
  860.  
  861.  
  862.  
  863.  
  864.           end
  865.       when 2
  866.           @commandy_window.active = true
  867.           @command_window.active = false
  868.           $game_system.se_play($data_system.battle_start_se)
  869.            return
  870. #=============================================================
  871.       when 3
  872.           if $game_party.item_number(969)>=1
  873.            if $game_variables[$威力[0+@actor.id]]==0
  874.                $game_system.se_play($data_system.cancel_se)
  875.              else
  876.                 #属性降低
  877.                 $game_variables[$体退[0+@actor.id]]=0
  878.                 $game_variables[$真退[0+@actor.id]]=0
  879.                 $game_variables[$力退[0+@actor.id]]=0
  880.                 $game_variables[$元退[0+@actor.id]]=0
  881.                 $game_variables[$速退[0+@actor.id]]=0
  882.                 #传承符-1
  883.                 $game_party.lose_item(969,1)
  884.                 #星级降低
  885.                 $game_variables[$威力[0+@actor.id]]=0
  886.                # $game_variables[717]=0
  887.                 $game_actors[@actor.id].name = $名退[0+@actor.id]
  888.                 #灵石返还
  889.                 $game_party.gain_gold($game_variables[@actor.id+4600])
  890.                 #魂力返还
  891.                $game_variables[27]+=$game_variables[@actor.id+4600]
  892.                 #返还星牌
  893.                 $game_party.gain_item(1,$game_variables[@actor.id+4550])
  894.                 #消耗记录归0
  895.                 $game_variables[@actor.id+4575]=0
  896.                 $game_variables[@actor.id+4600]=0
  897.                 $game_variables[@actor.id+4550]=0
  898.                 #修正退化后的血量
  899.                 @actor.hp = [@actor.hp, @actor.maxhp].min
  900.                 @actor.sp = [@actor.hp, @actor.maxsp].min
  901.  
  902.                 $game_system.se_play($data_system.battle_start_se)
  903.                 @status_window.refresh
  904.               end
  905.             end
  906.  
  907.       when 4
  908.           $scene = Scene_Map.new
  909.         end
  910.       end
  911.  
  912.  
  913. #=============================================================
  914. # 什么都没有按下的情况
  915. #=============================================================
  916.   case @command_window.index
  917.     when 0
  918.      @text_11 = "按空格换人,对应下面的要求来提升星级!"
  919.      @text_zm_1 = "条件满足则提升,不可后悔!切记切记!"
  920.      @help_window.mstar_help_text(@text_11,@text_zm_1)
  921.     when 1
  922.      case @actor.id
  923.        when  1..20
  924.          @text_1 = "炼星符:"+$星牌递增[0+$game_variables[$威力[0+@actor.id]]].to_s
  925.          @text_1_s1 = "魂力+灵石:"+$灵魂递增[0+$game_variables[$威力[0+@actor.id]]].to_s
  926.          @text_1_s2 = "消耗灵石魂力:"+$game_variables[@actor.id+4600].to_s+"消耗炼星符计数"+$game_variables[@actor.id+4550].to_s
  927.          @help_window.mstar_help_text(@text_1,@text_1_s1,@text_1_s2)
  928.        return
  929.      end
  930.     when 2
  931.      @text_11 = "境界提升依靠吞噬各种道具来完成!"
  932.      @help_window.mstar_help_text(@text_11)
  933.     when 3
  934.       if $game_variables[$威力[0+@actor.id]]==0
  935.          @text_11 = "已经是最低了 不能在退化了!"
  936.          @help_window.mstar_help_text(@text_11)
  937.         else
  938.          @text_11 = "星级归0 需:传承符!返还消耗资源(不包括星牌)"
  939.          @text_11_s1 = "返还灵石和魂力:"+$game_variables[@actor.id+4600].to_s
  940.          @text_11_s2 = "返还炼星符:"+$game_variables[@actor.id+4550].to_s
  941.          @help_window.mstar_help_text(@text_11,@text_11_s1,@text_11_s2)
  942.          return
  943.        end
  944.  
  945.     when 4
  946.      @text_11 = "退出升星界面"
  947.      @help_window.mstar_help_text(@text_11)
  948.     end
  949.     #=============================================================
  950.     # 转换角色
  951.     #=============================================================
  952.     # 按下 R 键的情况下
  953.     case @command_window.index
  954.       when 0  
  955.        if Input.trigger?(Input::C)
  956.       # 演奏光标 SE
  957.       $game_system.se_play($data_system.cursor_se)
  958.       # 移至下一位角色
  959.       @actor_index += 1
  960.       @actor_index %= $game_party.actors.size
  961.       # 切换到别的状态画面
  962.       $scene = Scene_Mstarlevel.new(@actor_index)
  963.       return
  964.     end
  965.   end
  966. end
  967. end

QQ截图20160722071952.png (5.39 KB, 下载次数: 5)

QQ截图20160722071952.png
学习使我疲劳,打工使我疲惫,恋爱使我伤身,吸烟伤我肺腑,饮酒损我形象,旅游使我破费,月底不见铜板,只有在论坛里面看看各种大佬才能使我进去

Lv3.寻梦者

梦石
0
星屑
4476
在线时间
1053 小时
注册时间
2013-3-28
帖子
390

开拓者

2
发表于 2016-7-22 09:45:56 | 只看该作者
本帖最后由 陈大帅帅帅哥 于 2016-7-22 09:48 编辑

RUBY 代码复制
  1. attr_reader :crt                        # 暴击几率
换成
RUBY 代码复制
  1. attr_accessor :crt                        # 暴击几率

点评

换成之后没报错,但是在界面也无法调用啊@actor.crt+=1没什么反应  发表于 2016-7-23 07:46

评分

参与人数 1星屑 +10 收起 理由
jiushiainilip19 + 10 塞糖

查看全部评分

回复 支持 反对

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
4476
在线时间
1053 小时
注册时间
2013-3-28
帖子
390

开拓者

3
发表于 2016-7-23 10:25:38 | 只看该作者
@jiushiainilip19
把attr_reader :crt                        # 暴击几率[/pre]换成attr_accessor :crt                     ...[/quote]

在什么界面,另外看一看那个界面的代表角色的变量是否为@actor

(ps:这不算连贴吧……)

点评

在努力做修改了!谢谢你的意见!  发表于 2016-7-24 09:19
回复 支持 反对

使用道具 举报

Lv4.逐梦者 (版主)

梦石
0
星屑
9532
在线时间
5073 小时
注册时间
2013-6-21
帖子
3580

开拓者贵宾剧作品鉴家

4
发表于 2016-7-23 12:41:34 | 只看该作者
你的属性定义有问题。
RUBY 代码复制
  1. #● 定义暴击率
  2. def crt
  3.   n = str/2000+dex/2000+$game_variables[@actor_id+4850]
  4.   #天赋效果增加暴击率
  5.     case self.id
  6.      when 20 #玄霄
  7.        if self.battle_skill.include?(20) ; n += 15 ;end #[A天赋]冰火之力
  8.      when 13 #赵云
  9.        if self.battle_skill.include?(13) ; n += 10 ;end #[A天赋]勇冠三军
  10.      when 16 #步惊云
  11.        if self.battle_skill.include?(16) ; n += 30 ;end #[A天赋]火麒麟臂
  12.      end
  13.  
  14.     case @weapon_id
  15.      when 1..999
  16.       weapon = $data_weapons[@weapon_id]
  17.       n += weapon != nil ? weapon.str_plus/10 : 0
  18.     end
  19.     #一些装备下的状态增加暴击率
  20.     for i in @states
  21.     case i
  22.     when 124..125 ; n += 20  #万寿套 和 五彩套
  23.     when 133 ; n += 5   #不败套1
  24.     when 134 ; n += 10  #不败套2
  25.     when 135 ; n += 15  #不败套3
  26.     when 136 ; n += 20  #不败套4
  27.     when 137 ; n += 25  #不败套5 161 165
  28.     when 161 ; n += 5   #凌霄套1
  29.     when 162 ; n += 10  #凌霄套2
  30.     when 163 ; n += 15  #凌霄套3
  31.     when 164 ; n += 20  #凌霄套4
  32.     when 165 ; n += 25  #凌霄套5
  33.     when 698 ; n += 15  #幻彩金光石
  34.     when 697 ; n += 10 #碧玉海星石
  35.     when 284 ; n += $game_variables[3674] #内功葵花宝典
  36.     when 269 ; n += $game_variables[3672] #内功招臻无招
  37.     end;end
  38.       return [[n, 1].max, 300].min
  39.     end

你仔细看这一段,你这一段是角色 crt 的定义,请问你的 crt 定义和变量 @crt 有什么关系?变量 @crt 根本就没在 crt 的定义里面出现。
RUBY 代码复制
  1. @actor.crt += 1

这句话的意思是让 @actor 对象的 @crt 变量 +1,但是获取 crt 方法根本就不会参考 @crt。因为你重新定义了Game_Actor#crt方法,因此你不能再认为@actor.crt就是返回 @crt 的值了啊。

不知道你的 @crt 变量是干啥用的。请看完我的解释之后自行修改。

评分

参与人数 1星屑 +20 收起 理由
jiushiainilip19 + 20 认可答案

查看全部评分

回复 支持 1 反对 0

使用道具 举报

Lv2.观梦者

梦石
0
星屑
596
在线时间
797 小时
注册时间
2014-7-1
帖子
578

开拓者

5
 楼主| 发表于 2016-7-24 09:19:22 | 只看该作者
本帖最后由 jiushiainilip19 于 2016-7-24 10:26 编辑

已经解决了!谢谢给与提出的意见!
学习使我疲劳,打工使我疲惫,恋爱使我伤身,吸烟伤我肺腑,饮酒损我形象,旅游使我破费,月底不见铜板,只有在论坛里面看看各种大佬才能使我进去
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-9-22 07:00

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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