查看: 2079|回复: 6

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

[复制链接]
梦石
0
星屑
606
在线时间
797 小时
注册时间
2014-7-1
回帖
501

开拓者

发表于 2016-7-22 07:20:33 | 显示全部楼层 |阅读模式

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

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

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

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

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


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

实在是不想用到那么多变量来给角色加属性!

  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.     def xihp
  270.       n = $game_variables[3692]+$game_variables[@actor_id+4925]
  271.       
  272. #星级附加效果增益
  273.   case $game_variables[173]  #$燕星级
  274.     when 1;n+=2
  275.     when 2;n+=3
  276.     when 3;n+=4
  277.     when 4;n+=5
  278.     end
  279.   case $game_variables[3463]  #$慕容紫英
  280.     when 1;n+=2
  281.     when 2;n+=3
  282.     when 3;n+=4
  283.     when 4;n+=5
  284.     end
  285.       
  286.   #天赋效果增加吸血
  287.     case self.id
  288.      when 11 #燕丹
  289.        if self.battle_skill.include?(11) ; n += 10 ;end
  290.      when 4 #盖聂
  291.        if self.battle_skill.include?(4) ; n += 10 ;end
  292.      when 5 #天明
  293.        if self.battle_skill.include?(5) ; n += 10 ;end
  294.      when 22 #慕容紫英
  295.        if self.battle_skill.include?(26) ; n += 5 ;end
  296.        end
  297.       
  298.    
  299.     case @weapon_id
  300.      when 1..999
  301.       weapon = $data_weapons[@weapon_id]
  302.       n += weapon != nil ? weapon.atk/30: 0
  303.     end
  304.       
  305.     #一些装备下的状态增加吸血
  306.      for i in @states
  307.        case i
  308.         when 139 ; n +=  5 #苍云3
  309.         when 140 ; n +=  8 #苍云4
  310.         when 141 ; n += 10 #苍云5
  311.         when 695 ; n += 15 #九玄破空石
  312.         when 693 ; n += 10 #字母阴阳石
  313.         when 276 ; n += $game_variables[3676] #内功九阴真经全本
  314.         when 284 ; n += $game_variables[3674] #内功葵花宝典
  315.         end;end
  316.             
  317.       return [[n, 1].max, 150].min
  318.     end
  319.   #● 定义吸真
  320.     def xisp
  321.       n = $game_variables[3691]+$game_variables[@actor_id+4950]
  322.       
  323.       
  324. #星级附加效果增益
  325.   case $game_variables[183]  #$高星级
  326.     when 1;n+=2
  327.     when 2;n+=3
  328.     when 3;n+=4
  329.     when 4;n+=5
  330.     end
  331.   case $game_variables[3470]  #$柳梦璃星级
  332.     when 1;n+=2
  333.     when 2;n+=3
  334.     when 3;n+=4
  335.     when 4;n+=5
  336.     end
  337.       
  338.   #天赋效果增加吸真
  339.     case self.id
  340.      when 7 #李逍遥
  341.        if self.battle_skill.include?(7) ; n += 10 ;end
  342.      when 3 #冰雪莲
  343.        if self.battle_skill.include?(3) ; n += 10 ;end
  344.        end

  345.      for i in @states
  346.        case i
  347.         when 143 ; n +=  5  #天子3
  348.         when 144 ; n +=  8  #天子4
  349.         when 145 ; n += 10  #天子5
  350.         when 694 ; n += 15#五彩斑斓石
  351.         when 693 ; n += 10# #字母阴阳石
  352.         when 276 ; n += $game_variables[3676]#内功九阴真经全本
  353.         when 284 ; n += $game_variables[3674]#内功葵花宝典
  354.         end;end
  355.       
  356.       weapon = $data_weapons[@weapon_id]
  357.       n += weapon != nil ? weapon.atk/30: 0
  358.         
  359.       return [[n, 1].max, 150].min
  360.     end
  361.   
  362.   #---------------------------------------------------------------------------
  363.   #● 最大威力成长属性
  364.   #---------------------------------------------------------------------------
  365.   def zmax
  366.     n = 500+$game_variables[$威力[0+@actor.id]]*1000
  367.     n += (str + dex + agi)/ 20
  368.     return [[n, 1].max, 10000].min
  369.   end
  370.   #---------------------------------------------------------------------------
  371.   #● 角色战斗力
  372.   #---------------------------------------------------------------------------
  373.   def ce
  374.      n = str + dex + (atk * 10) + (int * 10) + $game_variables[99]
  375.      
  376. #星级附加效果增益
  377.   case $game_variables[164]  #$大星级
  378.     when 1;n+=300
  379.     when 2;n+=500
  380.     when 3;n+=800
  381.     when 4;n+=1000
  382.     end
  383.   case $game_variables[3432] #$夏星级
  384.     when 1;n+=300
  385.     when 2;n+=500
  386.     when 3;n+=800
  387.     when 4;n+=1000
  388.     end
  389.      
  390.      
  391.      for i in @states
  392.       case i
  393.        when 401 ; n += n * 50 /100
  394.        end
  395.      end
  396.      return [[n, 1].max, 65535].min
  397.   end
  398.   
  399.   #---------------------------------------------------------------------------
  400.   #● 定义个人回合
  401.   #---------------------------------------------------------------------------
  402.   def yxtr
  403.     n = 0
  404.     n += $game_variables[self.id + 187]
  405.     return n
  406.   end
  407. end

  408. #==============================================================================
  409. class Window_Base < Window
  410.   #---------------------------------------------------------------------------
  411.   #● 战斗力描绘
  412.   #---------------------------------------------------------------------------
  413.   def draw_actor_ce(actor, x, y)
  414.     self.contents.font.color = system_color
  415.     self.contents.font.color = normal_color
  416.     self.contents.draw_text(x, y, 164, 80, "战斗力:"+actor.ce.to_s)
  417.   end
  418.   def draw_actor_crt(actor, x, y)
  419.     self.contents.font.color = system_color
  420.     self.contents.font.color = normal_color
  421.     self.contents.draw_text(x + 94, y, 164, 80, actor.crt.to_s+"%")
  422.   end  
  423.   def draw_actor_maxcrts(actor, x, y)  
  424.     self.contents.font.color = system_color
  425.     self.contents.font.color = normal_color
  426.     self.contents.draw_text(x + 94, y, 164, 80, actor.maxcrts.to_s+"%")
  427.   end  
  428.   def draw_actor_lucks(actor, x, y)  
  429.     self.contents.font.color = system_color
  430.     self.contents.font.color = normal_color
  431.     self.contents.draw_text(x + 94, y, 164, 80, actor.lucks.to_s+"%")
  432.   end  
  433.   def draw_actor_neictl(actor, x, y)  
  434.     self.contents.font.color = system_color
  435.     self.contents.font.color = normal_color
  436.     self.contents.draw_text(x + 94, y, 164, 80, actor.neictl.to_s)
  437.   end  
  438.   def draw_actor_waictl(actor, x, y)  
  439.     self.contents.font.color = system_color
  440.     self.contents.font.color = normal_color
  441.     self.contents.draw_text(x + 94, y, 164, 80, actor.waictl.to_s)
  442.   end  
  443.   def draw_actor_xihp(actor, x, y)  
  444.     self.contents.font.color = system_color
  445.     self.contents.font.color = normal_color
  446.     self.contents.draw_text(x + 94, y, 164, 80, actor.xihp.to_s+"%")
  447.   end  
  448.   def draw_actor_xisp(actor, x, y)  
  449.     self.contents.font.color = system_color
  450.     self.contents.font.color = normal_color
  451.     self.contents.draw_text(x + 94, y, 164, 80, actor.xisp.to_s+"%")
  452.   end  
  453.   def draw_actor_zmax(actor, x, y)  
  454.     self.contents.font.color = system_color
  455.     self.contents.font.color = normal_color
  456.     self.contents.draw_text(x + 94, y, 164, 80, actor.zmax.to_s+"点")
  457.   end  
  458.   end  
  459. end
复制代码


  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.   # ● 刷新画面 Scene_Mstarlevel $scene = Scene_Mstarlevel.new
  233.   #--------------------------------------------------------------------------
  234.   def update
  235.     @status_window.update
  236.     @help_window.update
  237.     @command_window.update
  238.     @commandy_window.update

  239.     if @commandy_window.active
  240.       update_commandy
  241.       return
  242.     end
  243.    
  244.    
  245.     # 按下 B 键的情况下
  246.     if Input.trigger?(Input::B)
  247.       # 演奏取消 SE
  248.       $game_system.se_play($data_system.cancel_se)
  249.       # 切换到菜单画面
  250.       $scene = Scene_Menu.new(7)
  251.       return
  252.     end
  253. #=============================================================
  254. # 按下 C 键的情况下   $game_variables[27]=魂力 57 = 声望
  255. #=============================================================
  256.   if Input.trigger?(Input::C)
  257.    case @command_window.index
  258.      when 1 #角色升星 #最大2 也就是3星
  259.       case @actor.id
  260.         when 1 #卫庄
  261.           if $game_variables[90]<4 #8
  262.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[90]] &&
  263.                 $game_party.gold>=$灵魂递增[0+$game_variables[90]] &&
  264.                 $game_variables[27]>=$灵魂递增[0+$game_variables[90]] &&
  265.               #得出数值消耗结果
  266.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[90]])
  267.                 $game_party.lose_gold($灵魂递增[0+$game_variables[90]])
  268.                 $game_variables[27]-=$灵魂递增[0+$game_variables[90]]
  269.                 #记录消耗值 用于解散英雄之用
  270.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[90]]
  271.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[90]]
  272.                #得出星级提升结果
  273.                 for i in 3001..3007
  274.                   $game_variables[i]+=1
  275.                 end
  276.                 $game_variables[90]+=1
  277.                 $game_system.se_play($data_system.battle_start_se)
  278.                 $卫庄名字=["卫庄","仙-卫庄","神-卫庄","玄-卫庄","真-卫庄","圣-卫庄","极-卫庄","元-卫庄","上清-卫庄"]
  279.                 $game_actors[1].name = $卫庄名字[0+$game_variables[90]]              
  280.                 @status_window.refresh
  281.               else
  282.                 $game_system.se_play($data_system.cancel_se)
  283.               end
  284.             end
  285. #=======================卫庄结束======================
  286.         when 2 #少司命
  287.           if $game_variables[93]<4
  288.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[93]] &&
  289.                 $game_party.gold>=$灵魂递增[0+$game_variables[93]] &&
  290.                 $game_variables[27]>=$灵魂递增[0+$game_variables[93]] &&
  291.               #得出数值消耗结果
  292.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[93]])
  293.                 $game_party.lose_gold($灵魂递增[0+$game_variables[93]])
  294.                 $game_variables[27]-=$灵魂递增[0+$game_variables[93]]
  295.                 #记录消耗值 用于解散英雄之用
  296.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[93]]
  297.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[93]]
  298.               #得出星级提升结果
  299.                 for i in 3008..3014
  300.                   $game_variables[i]+=1
  301.                 end
  302.                 $game_variables[93]+=1
  303.                 $game_system.se_play($data_system.battle_start_se)
  304.                 $少司命名字=["少司命","仙-少司命","神-少司命","玄-少司命","真-少司命","圣-少司命","极-少司命","元-少司命","上清-少司命"]
  305.                 $game_actors[2].name = $少司命名字[0+$game_variables[93]]              
  306.                 @status_window.refresh
  307.               else
  308.                 $game_system.se_play($data_system.cancel_se)
  309.               end
  310.             end
  311. #=======================少司命结束======================
  312.         when 3 #冰雪莲
  313.           if $game_variables[96]<4
  314.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[96]] &&
  315.                 $game_party.gold>=$灵魂递增[0+$game_variables[96]] &&
  316.                 $game_variables[27]>=$灵魂递增[0+$game_variables[96]] &&
  317.               #得出数值消耗结果
  318.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[96]])
  319.                 $game_party.lose_gold($灵魂递增[0+$game_variables[96]])
  320.                 $game_variables[27]-=$灵魂递增[0+$game_variables[96]]
  321.                 #记录消耗值 用于解散英雄之用
  322.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[96]]
  323.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[96]]
  324.               #得出星级提升结果
  325.                 for i in 3015..3021
  326.                   $game_variables[i]+=1
  327.                 end
  328.                 $game_variables[96]+=1
  329.                 $game_system.se_play($data_system.battle_start_se)
  330.                 $冰雪莲名字=["冰雪莲","仙-冰雪莲","神-冰雪莲","玄-冰雪莲","真-冰雪莲","圣-冰雪莲","极-冰雪莲","元-冰雪莲","上清-冰雪莲"]
  331.                 $game_actors[3].name = $冰雪莲名字[0+$game_variables[96]]              
  332.                 @status_window.refresh
  333.               else
  334.                 $game_system.se_play($data_system.cancel_se)
  335.               end
  336.             end
  337. #=======================冰雪莲结束======================
  338.         when 4 #盖聂
  339.           if $game_variables[152]<4
  340.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[152]] &&
  341.                 $game_party.gold>=$灵魂递增[0+$game_variables[152]] &&
  342.                 $game_variables[27]>=$灵魂递增[0+$game_variables[152]] &&
  343.               #得出数值消耗结果
  344.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[152]])
  345.                 $game_party.lose_gold($灵魂递增[0+$game_variables[152]])
  346.                 $game_variables[27]-=$灵魂递增[0+$game_variables[152]]
  347.                 #记录消耗值 用于解散英雄之用
  348.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[152]]
  349.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[152]]
  350.               #得出星级提升结果
  351.                 for i in 3022..3028
  352.                   $game_variables[i]+=1
  353.                 end
  354.                 $game_variables[152]+=1
  355.                 $game_system.se_play($data_system.battle_start_se)
  356.                 $盖聂名字=["盖聂","仙-盖聂","神-盖聂","玄-盖聂","真-盖聂","圣-盖聂","极-盖聂","元-盖聂","上清-盖聂"]
  357.                 $game_actors[4].name = $盖聂名字[0+$game_variables[152]]              
  358.                 @status_window.refresh
  359.               else
  360.                 $game_system.se_play($data_system.cancel_se)
  361.               end
  362.             end
  363. #=======================盖聂结束======================
  364.         when 5 #天明
  365.           if $game_variables[155]<4
  366.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[155]] &&
  367.                 $game_party.gold>=$灵魂递增[0+$game_variables[155]] &&
  368.                 $game_variables[27]>=$灵魂递增[0+$game_variables[155]] &&
  369.               #得出数值消耗结果
  370.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[155]])
  371.                 $game_party.lose_gold($灵魂递增[0+$game_variables[155]])
  372.                 $game_variables[27]-=$灵魂递增[0+$game_variables[155]]
  373.                 #记录消耗值 用于解散英雄之用
  374.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[155]]
  375.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[155]]
  376.               #得出星级提升结果
  377.                 for i in 3029..3035
  378.                   $game_variables[i]+=1
  379.                 end
  380.                 $game_variables[155]+=1
  381.                 $game_system.se_play($data_system.battle_start_se)
  382.                 $天明名字=["玉煞天明","仙-玉煞天明","神-玉煞天明","玄-玉煞天明","真-天明","圣-天明","极-天明","元-天明","上清-天明"]
  383.                 $game_actors[5].name = $天明名字[0+$game_variables[155]]              
  384.                 @status_window.refresh
  385.               else
  386.                 $game_system.se_play($data_system.cancel_se)
  387.               end
  388.             end
  389. #=======================天明结束======================
  390.         when 6 #赵灵儿
  391.           if $game_variables[158]<4
  392.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[158]] &&
  393.                 $game_party.gold>=$灵魂递增[0+$game_variables[158]] &&
  394.                 $game_variables[27]>=$灵魂递增[0+$game_variables[158]] &&
  395.               #得出数值消耗结果
  396.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[158]])
  397.                 $game_party.lose_gold($灵魂递增[0+$game_variables[158]])
  398.                 $game_variables[27]-=$灵魂递增[0+$game_variables[158]]
  399.                 #记录消耗值 用于解散英雄之用
  400.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[158]]
  401.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[158]]
  402.               #得出星级提升结果
  403.                 for i in 3036..3042
  404.                   $game_variables[i]+=1
  405.                 end
  406.                 $game_variables[158]+=1
  407.                 $game_system.se_play($data_system.battle_start_se)
  408.                 $赵灵儿名字=["赵灵儿","仙-赵灵儿","神-赵灵儿","玄-赵灵儿","真-赵灵儿","圣-赵灵儿","极-赵灵儿","元-赵灵儿","上清-赵灵儿"]
  409.                 $game_actors[6].name = $赵灵儿名字[0+$game_variables[158]]              
  410.                 @status_window.refresh
  411.               else
  412.                 $game_system.se_play($data_system.cancel_se)
  413.               end
  414.             end
  415. #=======================赵灵儿结束======================
  416.         when 7 #李逍遥
  417.           if $game_variables[161]<4
  418.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[161]] &&
  419.                 $game_party.gold>=$灵魂递增[0+$game_variables[161]] &&
  420.                 $game_variables[27]>=$灵魂递增[0+$game_variables[161]] &&
  421.               #得出数值消耗结果
  422.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[161]])
  423.                 $game_party.lose_gold($灵魂递增[0+$game_variables[161]])
  424.                 $game_variables[27]-=$灵魂递增[0+$game_variables[161]]
  425.                 #记录消耗值 用于解散英雄之用
  426.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[161]]
  427.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[161]]
  428.               #得出星级提升结果
  429.                 for i in 3043..3049
  430.                   $game_variables[i]+=1
  431.                 end
  432.                 $game_variables[161]+=1
  433.                 $game_system.se_play($data_system.battle_start_se)
  434.                 $李逍遥名字=["李逍遥","仙-李逍遥","神-李逍遥","玄-李逍遥","真-李逍遥","圣-李逍遥","极-李逍遥","元-李逍遥","上清-李逍遥"]
  435.                 $game_actors[7].name = $李逍遥名字[0+$game_variables[161]]              
  436.                 @status_window.refresh
  437.               else
  438.                 $game_system.se_play($data_system.cancel_se)
  439.               end
  440.             end
  441. #=======================李逍遥结束======================
  442.         when 8 #大司命
  443.           if $game_variables[164]<4
  444.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[164]] &&
  445.                 $game_party.gold>=$灵魂递增[0+$game_variables[164]] &&
  446.                 $game_variables[27]>=$灵魂递增[0+$game_variables[164]] &&
  447.               #得出数值消耗结果
  448.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[164]])
  449.                 $game_party.lose_gold($灵魂递增[0+$game_variables[164]])
  450.                 $game_variables[27]-=$灵魂递增[0+$game_variables[164]]
  451.                 #记录消耗值 用于解散英雄之用
  452.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[164]]
  453.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[164]]
  454.               #得出星级提升结果
  455.                 for i in 3050..3056
  456.                   $game_variables[i]+=1
  457.                 end
  458.                 $game_variables[164]+=1
  459.                 $game_system.se_play($data_system.battle_start_se)
  460.                 $大司命名字=["大司命","仙-大司命","神-大司命","玄-大司命","真-大司命","圣-大司命","极-大司命","元-大司命","上清-大司命"]
  461.                 $game_actors[8].name = $大司命名字[0+$game_variables[164]]              
  462.                 @status_window.refresh
  463.               else
  464.                 $game_system.se_play($data_system.cancel_se)
  465.               end
  466.             end
  467. #=======================大司命结束======================
  468.         when 9 #重楼
  469.           if $game_variables[167]<4
  470.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[167]] &&
  471.                 $game_party.gold>=$灵魂递增[0+$game_variables[167]] &&
  472.                 $game_variables[27]>=$灵魂递增[0+$game_variables[167]] &&
  473.               #得出数值消耗结果
  474.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[167]])
  475.                 $game_party.lose_gold($灵魂递增[0+$game_variables[167]])
  476.                 $game_variables[27]-=$灵魂递增[0+$game_variables[167]]
  477.                 #记录消耗值 用于解散英雄之用
  478.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[167]]
  479.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[167]]
  480.               #得出星级提升结果
  481.                 for i in 3057..3063
  482.                   $game_variables[i]+=1
  483.                 end
  484.                 $game_variables[167]+=1
  485.                 $game_system.se_play($data_system.battle_start_se)
  486.                 $重楼名字=["重楼","仙-重楼","神-重楼","玄-重楼","真-重楼","圣-重楼","极-重楼","元-重楼","上清-重楼"]
  487.                 $game_actors[9].name = $重楼名字[0+$game_variables[167]]              
  488.                 @status_window.refresh
  489.               else
  490.                 $game_system.se_play($data_system.cancel_se)
  491.               end
  492.             end
  493. #=======================重楼结束======================
  494.         when 10 #吕布
  495.           if $game_variables[170]<4
  496.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[170]] &&
  497.                 $game_party.gold>=$灵魂递增[0+$game_variables[170]] &&
  498.                 $game_variables[27]>=$灵魂递增[0+$game_variables[170]] &&
  499.               #得出数值消耗结果
  500.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[170]])
  501.                 $game_party.lose_gold($灵魂递增[0+$game_variables[170]])
  502.                 $game_variables[27]-=$灵魂递增[0+$game_variables[170]]
  503.                 #记录消耗值 用于解散英雄之用
  504.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[170]]
  505.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[170]]
  506.               #得出星级提升结果
  507.                 for i in 3064..3070
  508.                   $game_variables[i]+=1
  509.                 end
  510.                 $game_variables[170]+=1
  511.                 $game_system.se_play($data_system.battle_start_se)
  512.                 $吕布名字=["吕布","仙-吕布","神-吕布","玄-吕布","真-吕布","圣-吕布","极-吕布","元-吕布","上清-吕布"]
  513.                 $game_actors[10].name = $吕布名字[0+$game_variables[170]]              
  514.                 @status_window.refresh
  515.               else
  516.                 $game_system.se_play($data_system.cancel_se)
  517.               end
  518.             end
  519. #=======================吕布结束======================
  520.         when 11 #燕丹
  521.           if $game_variables[173]<4
  522.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[173]] &&
  523.                 $game_party.gold>=$灵魂递增[0+$game_variables[173]] &&
  524.                 $game_variables[27]>=$灵魂递增[0+$game_variables[173]] &&
  525.               #得出数值消耗结果
  526.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[173]])
  527.                 $game_party.lose_gold($灵魂递增[0+$game_variables[173]])
  528.                 $game_variables[27]-=$灵魂递增[0+$game_variables[173]]
  529.                 #记录消耗值 用于解散英雄之用
  530.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[173]]
  531.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[173]]
  532.               #得出星级提升结果
  533.                 for i in 3071..3077
  534.                   $game_variables[i]+=1
  535.                 end
  536.                 $game_variables[173]+=1
  537.                 $game_system.se_play($data_system.battle_start_se)
  538.                 $燕丹名字=["燕丹","仙-燕丹","神-燕丹","玄-燕丹","真-燕丹","圣-燕丹","极-燕丹","元-燕丹","上清-燕丹"]
  539.                 $game_actors[11].name = $燕丹名字[0+$game_variables[173]]              
  540.                 @status_window.refresh
  541.               else
  542.                 $game_system.se_play($data_system.cancel_se)
  543.               end
  544.             end
  545. #=======================燕丹结束======================
  546.         when 12 #张良
  547.           if $game_variables[177]<4
  548.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[177]] &&
  549.                 $game_party.gold>=$灵魂递增[0+$game_variables[177]] &&
  550.                 $game_variables[27]>=$灵魂递增[0+$game_variables[177]] &&
  551.               #得出数值消耗结果
  552.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[177]])
  553.                 $game_party.lose_gold($灵魂递增[0+$game_variables[177]])
  554.                 $game_variables[27]-=$灵魂递增[0+$game_variables[177]]
  555.                 #记录消耗值 用于解散英雄之用
  556.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[177]]
  557.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[177]]
  558.               #得出星级提升结果
  559.                 for i in 3078..3084
  560.                   $game_variables[i]+=1
  561.                 end
  562.                 $game_variables[177]+=1
  563.                 $game_system.se_play($data_system.battle_start_se)
  564.                 $张良名字=["张良","仙-张良","神-张良","玄-张良","真-张良","圣-张良","极-张良","元-张良","上清-张良"]
  565.                 $game_actors[12].name = $张良名字[0+$game_variables[177]]              
  566.                 @status_window.refresh
  567.               else
  568.                 $game_system.se_play($data_system.cancel_se)
  569.               end
  570.             end
  571. #=======================张良结束======================
  572.         when 13 #赵云
  573.           if $game_variables[180]<4
  574.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[180]] &&
  575.                 $game_party.gold>=$灵魂递增[0+$game_variables[180]] &&
  576.                 $game_variables[27]>=$灵魂递增[0+$game_variables[180]] &&
  577.               #得出数值消耗结果
  578.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[180]])
  579.                 $game_party.lose_gold($灵魂递增[0+$game_variables[180]])
  580.                 $game_variables[27]-=$灵魂递增[0+$game_variables[180]]
  581.                 #记录消耗值 用于解散英雄之用
  582.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[180]]
  583.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[180]]
  584.               #得出星级提升结果
  585.                 for i in 3085..3091
  586.                   $game_variables[i]+=1
  587.                 end
  588.                 $game_variables[180]+=1
  589.                 $game_system.se_play($data_system.battle_start_se)
  590.                 $赵云名字=["赵云","仙-赵云","神-赵云","玄-赵云","真-赵云","圣-赵云","极-赵云","元-赵云","上清-赵云"]
  591.                 $game_actors[13].name = $赵云名字[0+$game_variables[180]]              
  592.                 @status_window.refresh
  593.               else
  594.                 $game_system.se_play($data_system.cancel_se)
  595.               end
  596.             end
  597. #=======================赵云结束======================
  598.         when 14 #高月
  599.           if $game_variables[183]<4
  600.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[183]] &&
  601.                 $game_party.gold>=$灵魂递增[0+$game_variables[183]] &&
  602.                 $game_variables[27]>=$灵魂递增[0+$game_variables[183]] &&
  603.               #得出数值消耗结果
  604.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[183]])
  605.                 $game_party.lose_gold($灵魂递增[0+$game_variables[183]])
  606.                 $game_variables[27]-=$灵魂递增[0+$game_variables[183]]
  607.                 #记录消耗值 用于解散英雄之用
  608.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[183]]
  609.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[183]]
  610.               #得出星级提升结果
  611.                 for i in 3092..3098
  612.                   $game_variables[i]+=1
  613.                 end
  614.                 $game_variables[183]+=1
  615.                 $game_system.se_play($data_system.battle_start_se)
  616.                 $高月名字=["高月","仙-高月","神-高月","玄-高月","真-高月","圣-高月","极-高月","元-高月","上清-高月"]
  617.                 $game_actors[14].name = $高月名字[0+$game_variables[183]]              
  618.                 @status_window.refresh
  619.               else
  620.                 $game_system.se_play($data_system.cancel_se)
  621.               end
  622.             end
  623. #=======================高月结束======================
  624.         when 15 #陆雪琪
  625.           if $game_variables[186]<4
  626.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[186]] &&
  627.                 $game_party.gold>=$灵魂递增[0+$game_variables[186]] &&
  628.                 $game_variables[27]>=$灵魂递增[0+$game_variables[186]] &&
  629.               #得出数值消耗结果
  630.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[186]])
  631.                 $game_party.lose_gold($灵魂递增[0+$game_variables[186]])
  632.                 $game_variables[27]-=$灵魂递增[0+$game_variables[186]]
  633.                 #记录消耗值 用于解散英雄之用
  634.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[186]]
  635.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[186]]
  636.               #得出星级提升结果
  637.                 for i in 3099..3105
  638.                   $game_variables[i]+=1
  639.                 end
  640.                 $game_variables[186]+=1
  641.                 $game_system.se_play($data_system.battle_start_se)
  642.                 $陆雪琪名字=["陆雪琪","仙-陆雪琪","神-陆雪琪","玄-陆雪琪","真-陆雪琪","圣-陆雪琪","极-陆雪琪","元-陆雪琪","上清-陆雪琪"]
  643.                 $game_actors[15].name = $陆雪琪名字[0+$game_variables[186]]              
  644.                 @status_window.refresh
  645.               else
  646.                 $game_system.se_play($data_system.cancel_se)
  647.               end
  648.             end
  649. #=======================陆雪琪结束======================
  650.         when 16 #步惊云
  651.           if $game_variables[3429]<4
  652.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3429]] &&
  653.                 $game_party.gold>=$灵魂递增[0+$game_variables[3429]] &&
  654.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3429]] &&
  655.               #得出数值消耗结果
  656.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3429]])
  657.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3429]])
  658.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3429]]
  659.                 #记录消耗值 用于解散英雄之用
  660.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3429]]
  661.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3429]]
  662.               #得出星级提升结果
  663.                 for i in 3401..3407
  664.                   $game_variables[i]+=1
  665.                 end
  666.                 $game_variables[3429]+=1
  667.                 $game_system.se_play($data_system.battle_start_se)
  668.                 $步惊云名字=["步惊云","仙-步惊云","神-步惊云","玄-步惊云","真-步惊云","圣-步惊云","极-步惊云","元-步惊云","上清-步惊云"]
  669.                 $game_actors[16].name = $步惊云名字[0+$game_variables[3429]]              
  670.                 @status_window.refresh
  671.               else
  672.                 $game_system.se_play($data_system.cancel_se)
  673.               end
  674.             end
  675. #=======================步惊云结束======================
  676.         when 17 #聂风
  677.           if $game_variables[3430]<4
  678.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3430]] &&
  679.                 $game_party.gold>=$灵魂递增[0+$game_variables[3430]] &&
  680.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3430]] &&
  681.               #得出数值消耗结果
  682.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3430]])
  683.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3430]])
  684.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3430]]
  685.                 #记录消耗值 用于解散英雄之用
  686.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3430]]
  687.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3430]]
  688.               #得出星级提升结果
  689.                 for i in 3408..3414
  690.                   $game_variables[i]+=1
  691.                 end
  692.                 $game_variables[3430]+=1
  693.                 $game_system.se_play($data_system.battle_start_se)
  694.                 $聂风名字=["聂风","仙-聂风","神-聂风","玄-聂风","真-聂风","圣-聂风","极-聂风","元-聂风","上清-聂风"]
  695.                 $game_actors[17].name = $聂风名字[0+$game_variables[3430]]              
  696.                 @status_window.refresh
  697.               else
  698.                 $game_system.se_play($data_system.cancel_se)
  699.               end
  700.             end
  701. #=======================聂风结束======================
  702.         when 18 #宇文括
  703.           if $game_variables[3431]<4
  704.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3431]] &&
  705.                 $game_party.gold>=$灵魂递增[0+$game_variables[3431]] &&
  706.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3431]] &&
  707.               #得出数值消耗结果
  708.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3431]])
  709.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3431]])
  710.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3431]]
  711.                 #记录消耗值 用于解散英雄之用
  712.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3431]]
  713.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3431]]
  714.               #得出星级提升结果
  715.                 for i in 3415..3421
  716.                   $game_variables[i]+=1
  717.                 end
  718.                 $game_variables[3431]+=1
  719.                 $game_system.se_play($data_system.battle_start_se)
  720.                 $宇文括名字=["宇文括","仙-宇文括","神-宇文括","玄-宇文括","真-宇文括","圣-宇文括","极-宇文括","元-宇文括","上清-宇文括"]
  721.                 $game_actors[18].name = $宇文括名字[0+$game_variables[3431]]              
  722.                 @status_window.refresh
  723.               else
  724.                 $game_system.se_play($data_system.cancel_se)
  725.               end
  726.             end
  727. #=======================宇文括结束======================
  728.         when 19 #夏侯仪
  729.           if $game_variables[3432]<4
  730.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3432]] &&
  731.                 $game_party.gold>=$灵魂递增[0+$game_variables[3432]] &&
  732.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3432]] &&
  733.               #得出数值消耗结果
  734.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3432]])
  735.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3432]])
  736.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3432]]
  737.                 #记录消耗值 用于解散英雄之用
  738.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3432]]
  739.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3432]]
  740.               #得出星级提升结果
  741.                 for i in 3422..3428
  742.                   $game_variables[i]+=1
  743.                 end
  744.                 $game_variables[3432]+=1
  745.                 $game_system.se_play($data_system.battle_start_se)
  746.                 $夏侯仪名字=["夏侯仪","仙-夏侯仪","神-夏侯仪","玄-夏侯仪","真-夏侯仪","圣-夏侯仪","极-夏侯仪","元-夏侯仪","上清-夏侯仪"]
  747.                 $game_actors[19].name = $夏侯仪名字[0+$game_variables[3432]]              
  748.                 @status_window.refresh
  749.               else
  750.                 $game_system.se_play($data_system.cancel_se)
  751.               end
  752.             end
  753. #=======================夏侯仪结束======================
  754.         when 20 #玄霄
  755.           if $game_variables[3440]<4
  756.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3440]] &&
  757.                 $game_party.gold>=$灵魂递增[0+$game_variables[3440]] &&
  758.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3440]] &&
  759.               #得出数值消耗结果
  760.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3440]])
  761.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3440]])
  762.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3440]]
  763.                 #记录消耗值 用于解散英雄之用
  764.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3440]]
  765.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3440]]
  766.               #得出星级提升结果
  767.                 for i in 3433..3439
  768.                   $game_variables[i]+=1
  769.                 end
  770.                 $game_variables[3440]+=1
  771.                 $game_system.se_play($data_system.battle_start_se)
  772.                 $玄霄名字=["玄霄","仙-玄霄","神-玄霄","玄-玄霄","真-玄霄","圣-玄霄","极-玄霄","元-玄霄","上清-玄霄"]
  773.                 $game_actors[20].name = $玄霄名字[0+$game_variables[3440]]              
  774.                 @status_window.refresh
  775.               else
  776.                 $game_system.se_play($data_system.cancel_se)
  777.               end
  778.             end
  779. #=======================玄霄结束======================
  780.         when 21#墨鸭
  781.           if $game_variables[3456]<4
  782.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3456]] &&
  783.                 $game_party.gold>=$灵魂递增[0+$game_variables[3456]] &&
  784.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3456]] &&
  785.               #得出数值消耗结果
  786.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3456]])
  787.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3456]])
  788.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3456]]
  789.                 #记录消耗值 用于解散英雄之用
  790.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3456]]
  791.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3456]]
  792.               #得出星级提升结果
  793.                 for i in 3451..3455
  794.                   $game_variables[i]+=1
  795.                 end
  796.                 $game_variables[3456]+=1
  797.                 $game_system.se_play($data_system.battle_start_se)
  798.                 $墨鸦名字=["墨鸦","仙-墨鸦","神-墨鸦","玄-墨鸦","真-墨鸦","圣-墨鸦","极-墨鸦","元-墨鸦","上清-墨鸦"]
  799.                 $game_actors[21].name = $墨鸦名字[0+$game_variables[3456]]              
  800.                 @status_window.refresh
  801.               else
  802.                 $game_system.se_play($data_system.cancel_se)
  803.               end
  804.             end
  805. #=======================墨鸦结束======================
  806.         when 22#慕容紫英
  807.           if $game_variables[3463]<4
  808.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3463]] &&
  809.                 $game_party.gold>=$灵魂递增[0+$game_variables[3463]] &&
  810.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3463]] &&
  811.               #得出数值消耗结果
  812.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3463]])
  813.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3463]])
  814.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3463]]
  815.                 #记录消耗值 用于解散英雄之用
  816.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3463]]
  817.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3463]]
  818.               #得出星级提升结果
  819.                 for i in 3458..3462
  820.                   $game_variables[i]+=1
  821.                 end
  822.                 $game_variables[3463]+=1
  823.                 $game_system.se_play($data_system.battle_start_se)
  824.                 $慕容紫英名字=["慕容紫英","仙-慕容紫英","神-慕容紫英","玄-慕容紫英","真-慕容紫英","圣-慕容紫英","极-慕容紫英","元-慕容紫英","上清-慕容紫英"]
  825.                 $game_actors[22].name = $慕容紫英名字[0+$game_variables[3463]]              
  826.                 @status_window.refresh
  827.               else
  828.                 $game_system.se_play($data_system.cancel_se)
  829.               end
  830.             end
  831. #=======================慕容紫英结束======================
  832.         when 23#柳梦璃
  833.           if $game_variables[3470]<4
  834.              if $game_party.item_number(1)>=$星牌递增[0+$game_variables[3470]] &&
  835.                 $game_party.gold>=$灵魂递增[0+$game_variables[3470]] &&
  836.                 $game_variables[27]>=$灵魂递增[0+$game_variables[3470]] &&
  837.               #得出数值消耗结果
  838.                 $game_party.lose_item(1,$星牌递增[0+$game_variables[3470]])
  839.                 $game_party.lose_gold($灵魂递增[0+$game_variables[3470]])
  840.                 $game_variables[27]-=$灵魂递增[0+$game_variables[3470]]
  841.                 #记录消耗值 用于解散英雄之用
  842.                 $game_variables[@actor.id+4600]+=$灵魂递增[0+$game_variables[3470]]
  843.                 $game_variables[@actor.id+4550]+=$星牌递增[0+$game_variables[3470]]
  844.               #得出星级提升结果
  845.                 for i in 3465..3469
  846.                   $game_variables[i]+=1
  847.                 end
  848.                 $game_variables[3470]+=1
  849.                 $game_system.se_play($data_system.battle_start_se)
  850.                 $柳梦璃名字=["柳梦璃","仙-柳梦璃","神-柳梦璃","玄-柳梦璃","真-柳梦璃","圣-柳梦璃","极-柳梦璃","元-柳梦璃","上清-柳梦璃"]
  851.                 $game_actors[23].name = $柳梦璃名字[0+$game_variables[3470]]              
  852.                 @status_window.refresh
  853.               else
  854.                 $game_system.se_play($data_system.cancel_se)
  855.               end
  856.             end
  857. #=======================慕容紫英结束======================




  858.           end
  859.       when 2
  860.           @commandy_window.active = true
  861.           @command_window.active = false
  862.           $game_system.se_play($data_system.battle_start_se)
  863.            return
  864. #=============================================================
  865.       when 3
  866.           if $game_party.item_number(969)>=1
  867.            if $game_variables[$威力[0+@actor.id]]==0
  868.                $game_system.se_play($data_system.cancel_se)
  869.              else
  870.                 #属性降低
  871.                 $game_variables[$体退[0+@actor.id]]=0
  872.                 $game_variables[$真退[0+@actor.id]]=0
  873.                 $game_variables[$力退[0+@actor.id]]=0
  874.                 $game_variables[$元退[0+@actor.id]]=0
  875.                 $game_variables[$速退[0+@actor.id]]=0
  876.                 #传承符-1
  877.                 $game_party.lose_item(969,1)
  878.                 #星级降低
  879.                 $game_variables[$威力[0+@actor.id]]=0
  880.                # $game_variables[717]=0
  881.                 $game_actors[@actor.id].name = $名退[0+@actor.id]
  882.                 #灵石返还
  883.                 $game_party.gain_gold($game_variables[@actor.id+4600])
  884.                 #魂力返还
  885.                $game_variables[27]+=$game_variables[@actor.id+4600]
  886.                 #返还星牌
  887.                 $game_party.gain_item(1,$game_variables[@actor.id+4550])
  888.                 #消耗记录归0
  889.                 $game_variables[@actor.id+4575]=0
  890.                 $game_variables[@actor.id+4600]=0
  891.                 $game_variables[@actor.id+4550]=0
  892.                 #修正退化后的血量
  893.                 @actor.hp = [@actor.hp, @actor.maxhp].min
  894.                 @actor.sp = [@actor.hp, @actor.maxsp].min

  895.                 $game_system.se_play($data_system.battle_start_se)
  896.                 @status_window.refresh
  897.               end
  898.             end
  899.             
  900.       when 4
  901.           $scene = Scene_Map.new
  902.         end
  903.       end
  904.       
  905.         
  906. #=============================================================
  907. # 什么都没有按下的情况
  908. #=============================================================
  909.   case @command_window.index
  910.     when 0
  911.      @text_11 = "按空格换人,对应下面的要求来提升星级!"
  912.      @text_zm_1 = "条件满足则提升,不可后悔!切记切记!"
  913.      @help_window.mstar_help_text(@text_11,@text_zm_1)
  914.     when 1
  915.      case @actor.id
  916.        when  1..20
  917.          @text_1 = "炼星符:"+$星牌递增[0+$game_variables[$威力[0+@actor.id]]].to_s
  918.          @text_1_s1 = "魂力+灵石:"+$灵魂递增[0+$game_variables[$威力[0+@actor.id]]].to_s
  919.          @text_1_s2 = "消耗灵石魂力:"+$game_variables[@actor.id+4600].to_s+"消耗炼星符计数"+$game_variables[@actor.id+4550].to_s
  920.          @help_window.mstar_help_text(@text_1,@text_1_s1,@text_1_s2)
  921.        return
  922.      end
  923.     when 2
  924.      @text_11 = "境界提升依靠吞噬各种道具来完成!"
  925.      @help_window.mstar_help_text(@text_11)
  926.     when 3
  927.       if $game_variables[$威力[0+@actor.id]]==0
  928.          @text_11 = "已经是最低了 不能在退化了!"
  929.          @help_window.mstar_help_text(@text_11)
  930.         else
  931.          @text_11 = "星级归0 需:传承符!返还消耗资源(不包括星牌)"
  932.          @text_11_s1 = "返还灵石和魂力:"+$game_variables[@actor.id+4600].to_s
  933.          @text_11_s2 = "返还炼星符:"+$game_variables[@actor.id+4550].to_s
  934.          @help_window.mstar_help_text(@text_11,@text_11_s1,@text_11_s2)
  935.          return
  936.        end
  937.       
  938.     when 4
  939.      @text_11 = "退出升星界面"
  940.      @help_window.mstar_help_text(@text_11)
  941.     end
  942.     #=============================================================
  943.     # 转换角色
  944.     #=============================================================
  945.     # 按下 R 键的情况下
  946.     case @command_window.index
  947.       when 0  
  948.        if Input.trigger?(Input::C)
  949.       # 演奏光标 SE
  950.       $game_system.se_play($data_system.cursor_se)
  951.       # 移至下一位角色
  952.       @actor_index += 1
  953.       @actor_index %= $game_party.actors.size
  954.       # 切换到别的状态画面
  955.       $scene = Scene_Mstarlevel.new(@actor_index)
  956.       return
  957.     end
  958.   end
  959. end
  960. end



复制代码
QQ截图20160722071952.png
学习使我疲劳,打工使我疲惫,恋爱使我伤身,吸烟伤我肺腑,饮酒损我形象,旅游使我破费,月底不见铜板,只有在论坛里面看看各种大佬才能使我进去
梦石
0
星屑
4657
在线时间
1069 小时
注册时间
2013-3-28
回帖
309

开拓者

发表于 2016-7-22 09:45:56 | 显示全部楼层
本帖最后由 陈大帅帅帅哥 于 2016-7-22 09:48 编辑

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

点评

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

评分

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

查看全部评分

回复

使用道具 举报

梦石
0
星屑
4657
在线时间
1069 小时
注册时间
2013-3-28
回帖
309

开拓者

发表于 2016-7-23 10:25:38 | 显示全部楼层
@jiushiainilip19
把attr_reader :crt                        # 暴击几率[/pre]换成attr_accessor :crt                     ...[/quote]

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

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

点评

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

使用道具 举报

梦石
0
星屑
9557
在线时间
5074 小时
注册时间
2013-6-21
回帖
3459

开拓者贵宾剧作品鉴家

发表于 2016-7-23 12:41:34 | 显示全部楼层
你的属性定义有问题。

  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.     case @weapon_id
  14.      when 1..999
  15.       weapon = $data_weapons[@weapon_id]
  16.       n += weapon != nil ? weapon.str_plus/10 : 0
  17.     end
  18.     #一些装备下的状态增加暴击率
  19.     for i in @states
  20.     case i
  21.     when 124..125 ; n += 20  #万寿套 和 五彩套
  22.     when 133 ; n += 5   #不败套1
  23.     when 134 ; n += 10  #不败套2
  24.     when 135 ; n += 15  #不败套3
  25.     when 136 ; n += 20  #不败套4
  26.     when 137 ; n += 25  #不败套5 161 165
  27.     when 161 ; n += 5   #凌霄套1
  28.     when 162 ; n += 10  #凌霄套2
  29.     when 163 ; n += 15  #凌霄套3
  30.     when 164 ; n += 20  #凌霄套4
  31.     when 165 ; n += 25  #凌霄套5
  32.     when 698 ; n += 15  #幻彩金光石
  33.     when 697 ; n += 10 #碧玉海星石
  34.     when 284 ; n += $game_variables[3674] #内功葵花宝典
  35.     when 269 ; n += $game_variables[3672] #内功招臻无招
  36.     end;end
  37.       return [[n, 1].max, 300].min
  38.     end
复制代码

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

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

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

评分

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

查看全部评分

回复 1 0

使用道具 举报

梦石
0
星屑
606
在线时间
797 小时
注册时间
2014-7-1
回帖
501

开拓者

 楼主| 发表于 2016-7-24 09:19:22 | 显示全部楼层
本帖最后由 jiushiainilip19 于 2016-7-24 10:26 编辑

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

使用道具 举报

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

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部