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

Project1

 找回密码
 注册会员
搜索
查看: 2121|回复: 2

[已经解决] 请问...如何在主菜单添加升级加点的模块【已解决】

[复制链接]

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
帖子
148
发表于 2019-3-20 22:34:39 | 显示全部楼层 |阅读模式

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

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

x
本帖最后由 wyw838 于 2019-3-21 12:41 编辑

问题描述如题...我翻了Window_Selectable和Window_Command...但是还是不知道UI界面该怎么调整现的==升级加点代码如下...向大佬们请教关于UI的调整QWQ谢谢
RUBY 代码复制
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================
  4.  
  5.  
  6. # 脚本使用设定:
  7.  
  8. LEVEL_UP_POINT = 4  # 每升一级所增加的点数
  9. LEVEL_UP_VARIABLE = 100  # 储存角色点数的变量编号与角色id编号的差值
  10.                          # 默认情况 = 100,
  11.                          # 则是数据库里1号角色的加点数存于101号变量
  12.                          # 3号角色的加点数存于103号变量。
  13.                          # 你可以直接操作变量赠与角色可分配点数
  14.  
  15. # 每增加一次点数,各项能力值的变化:357-410行
  16.  
  17. # 使用方法介绍:
  18.  
  19. # 本脚本不会取代原猩豆δ埽皇且桓龈郊庸δ堋?BR># 也就是说,默认的升级还在,但可以用这个功能手动追加点数。
  20. # 如果你想纯粹使用手动加点(而升级不提升能力),只要把数据库中角色升级能力,
  21. # 1-99级全部等于一个相同数值就行了。
  22.  
  23. # 呼唤加点场景的方法:$scene = Scene_Lvup.new(角色编号,返回菜单编号)。
  24. # 默认都是0号
  25.  
  26. # 加点场景中,page up,page down换人,如果想加点完毕后返回地图,
  27. # 464行$scene = Scene_Menu.new(0)改为$scene = Scene_Map.new
  28.  
  29. # 推荐脚本搭配:魔法商店脚本,两者结合,制作自由型RPG
  30.  
  31. #==============================================================================
  32. # ■ Window_Command
  33. #------------------------------------------------------------------------------
  34. #  一般的命令选择行窗口。(追加定义)
  35. #==============================================================================
  36. class Window_Command < Window_Selectable
  37.   #--------------------------------------------------------------------------
  38.   # ● 项目有效化
  39.   #     index : 项目编号
  40.   #--------------------------------------------------------------------------
  41.   def able_item(index)
  42.     draw_item(index, normal_color)
  43.   end
  44. end
  45. #==============================================================================
  46. # ■ Game_Actor
  47. #------------------------------------------------------------------------------
  48. #  处理角色的类。(再定义)
  49. #==============================================================================
  50. class Game_Actor < Game_Battler
  51.   #--------------------------------------------------------------------------
  52.   # ● 更改 EXP
  53.   #     exp : 新的 EXP
  54.   #--------------------------------------------------------------------------
  55.   def exp=(exp)
  56.     @exp = [[exp, 9999999].min, 0].max
  57.     # 升级
  58.     while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
  59.       @level += 1
  60.       # 增加4点可自由分配的点数
  61.       $game_variables[self.id + LEVEL_UP_VARIABLE] += LEVEL_UP_POINT
  62.       # 学会特技
  63.       for j in $data_classes[@class_id].learnings
  64.         if j.level == @level
  65.           learn_skill(j.skill_id)
  66.         end
  67.       end
  68.     end
  69.     # 降级
  70.     while @exp < @exp_list[@level]
  71.       @level -= 1
  72.     end
  73.     # 修正当前的 HP 与 SP 超过最大值
  74.     @hp = [@hp, self.maxhp].min
  75.     @sp = [@sp, self.maxsp].min
  76.   end
  77. end
  78. #==============================================================================
  79. # ■ Window_Base
  80. #------------------------------------------------------------------------------
  81. #  游戏中全部窗口的超级类(追加定义)
  82. #==============================================================================
  83. class Window_Base < Window
  84.   #--------------------------------------------------------------------------
  85.   # ● 描绘 HP
  86.   #     actor : 角色
  87.   #     x     : 描画目标 X 坐标
  88.   #     y     : 描画目标 Y 坐标
  89.   #     width : 描画目标的宽
  90.   #--------------------------------------------------------------------------
  91.   def draw_actor_hp_lvup(actor, x, y)
  92.     self.contents.font.color = system_color
  93.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.hp)
  94.     if $temp_hp == 0
  95.       self.contents.font.color = normal_color
  96.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxhp.to_s, 2)
  97.     else
  98.       maxhp = actor.maxhp + $temp_hp
  99.       self.contents.font.color = Color.new(255, 128, 128, 255)
  100.       self.contents.draw_text(x + 120 , y, 48, 32, maxhp.to_s ,2)
  101.       self.contents.font.color = normal_color      
  102.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  103.       if $temp_hp >=0
  104.         self.contents.font.color = Color.new(255, 128, 128, 255)
  105.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  106.       else
  107.         self.contents.font.color = Color.new(255,255,0,255)
  108.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  109.       end
  110.       self.contents.draw_text(x + 200, y, 36, 32, $temp_hp.to_s, 2)
  111.       self.contents.font.color = normal_color
  112.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  113.     end
  114.   end
  115.   #--------------------------------------------------------------------------
  116.   # ● 描绘 SP
  117.   #     actor : 角色
  118.   #     x     : 描画目标 X 坐标
  119.   #     y     : 描画目标 Y 坐标
  120.   #     width : 描画目标的宽
  121.   #--------------------------------------------------------------------------
  122.   def draw_actor_sp_lvup(actor, x, y)
  123.     self.contents.font.color = system_color
  124.     self.contents.draw_text(x , y, 96, 32, "最大" + $data_system.words.sp)
  125.     if $temp_sp == 0
  126.       self.contents.font.color = normal_color
  127.       self.contents.draw_text(x + 120 , y, 48, 32, actor.maxsp.to_s, 2)
  128.     else
  129.       maxsp = actor.maxsp + $temp_sp
  130.       self.contents.font.color = Color.new(255, 128, 128, 255)
  131.       self.contents.draw_text(x + 120 , y, 48, 32, maxsp.to_s ,2)
  132.       self.contents.font.color = normal_color      
  133.       self.contents.draw_text(x + 155, y, 36, 32, "( ", 2)
  134.       if $temp_sp >=0
  135.         self.contents.font.color = Color.new(255, 128, 128, 255)
  136.         self.contents.draw_text(x + 155, y, 36, 32, " +",2)
  137.       else
  138.         self.contents.font.color = Color.new(255,255,0,255)
  139.         self.contents.draw_text(x + 155, y, 36, 32, " -",2)
  140.       end
  141.       self.contents.draw_text(x + 200, y, 36, 32, $temp_sp.to_s, 2)
  142.       self.contents.font.color = normal_color
  143.       self.contents.draw_text(x + 215, y, 36, 32, ")", 2)
  144.     end
  145.   end
  146.   #--------------------------------------------------------------------------
  147.   # ● 描绘能力值
  148.   #     actor : 角色
  149.   #     x     : 描画目标 X 坐标
  150.   #     y     : 描画目标 Y 坐标
  151.   #     type  : 能力值种类 (0~4)
  152.   #--------------------------------------------------------------------------
  153.   def draw_actor_lvup(actor, x, y, type)   
  154.     # 定义数字颜色
  155.     lvup = normal_color
  156.     upcolor = Color.new(255, 128, 128, 255)
  157.     self.contents.font.color = normal_color   
  158.     case type
  159.     when 0
  160.       parameter_name = $data_system.words.str
  161.       parameter_value = actor.str
  162.       parameter_value_temp = parameter_value + $temp_str
  163.       if $temp_str != 0
  164.         lvup = upcolor
  165.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  166.         if $temp_str >= 0
  167.           self.contents.font.color = lvup
  168.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  169.         else
  170.           self.contents.font.color = Color.new(255,255,0,255)
  171.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  172.         end        
  173.         self.contents.draw_text(x + 272, y, 80, 32, $temp_str.abs.to_s,1)
  174.         self.contents.font.color = normal_color
  175.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  176.       end
  177.     when 1
  178.       parameter_name = $data_system.words.dex
  179.       parameter_value = actor.dex
  180.       parameter_value_temp = parameter_value + $temp_dex
  181.       if $temp_dex != 0
  182.         lvup = upcolor
  183.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  184.         if $temp_dex >= 0
  185.           self.contents.font.color = lvup
  186.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  187.         else
  188.           self.contents.font.color = Color.new(255,255,0,255)
  189.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  190.         end        
  191.         self.contents.draw_text(x + 272, y, 80, 32, $temp_dex.abs.to_s,1)
  192.         self.contents.font.color = normal_color
  193.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  194.       end
  195.     when 2
  196.       parameter_name = $data_system.words.agi
  197.       parameter_value = actor.agi
  198.       parameter_value_temp = parameter_value + $temp_agi
  199.       if $temp_agi != 0
  200.         lvup = upcolor
  201.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  202.         if $temp_agi >= 0
  203.           self.contents.font.color = lvup
  204.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  205.         else
  206.           self.contents.font.color = Color.new(255,255,0,255)
  207.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  208.         end        
  209.         self.contents.draw_text(x + 272, y, 80, 32, $temp_agi.abs.to_s,1)
  210.         self.contents.font.color = normal_color
  211.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  212.       end
  213.     when 3
  214.       parameter_name = $data_system.words.int
  215.       parameter_value = actor.int
  216.       parameter_value_temp = parameter_value + $temp_int
  217.       if $temp_int != 0
  218.         lvup = upcolor
  219.         self.contents.draw_text(x + 256, y, 16, 32, "(")
  220.         if $temp_int >= 0
  221.           self.contents.font.color = lvup
  222.           self.contents.draw_text(x + 272, y, 80, 32, "+",0)
  223.         else
  224.           self.contents.font.color = Color.new(255,255,0,255)
  225.           self.contents.draw_text(x + 272, y, 80, 32, "-",0)
  226.         end        
  227.         self.contents.draw_text(x + 272, y, 80, 32, $temp_int.abs.to_s,1)
  228.         self.contents.font.color = normal_color
  229.         self.contents.draw_text(x + 272, y, 80, 32, ")", 2)
  230.       end
  231.     when 4
  232.       parameter_name = "剩余点数"
  233.       parameter_value = $point
  234.       if $point != 0
  235.         lvup = upcolor
  236.       end
  237.     end   
  238.     self.contents.font.color = system_color
  239.     self.contents.draw_text(x, y, 120, 32, parameter_name)
  240.     self.contents.font.color = normal_color
  241.     self.contents.draw_text(x + 120, y, 36, 32, parameter_value.to_s)   
  242.     if type != 4
  243.       self.contents.draw_text(x + 150, y, 36, 32, "→")
  244.     end  
  245.     self.contents.font.color = lvup
  246.     self.contents.draw_text(x + 180, y, 60, 32, parameter_value_temp.to_s)
  247.     self.contents.font.color = normal_color     
  248.   end
  249. end
  250. #==============================================================================
  251. # ■ Window_lvup
  252. #------------------------------------------------------------------------------
  253. #  显示升级状态窗口。
  254. #==============================================================================
  255. class Window_Lvup < Window_Base
  256.   #--------------------------------------------------------------------------
  257.   # ● 初始化对像
  258.   #     actor : 角色
  259.   #--------------------------------------------------------------------------
  260.   def initialize(actor)
  261.     super(0, 0, 512, 320)
  262.     self.contents = Bitmap.new(width - 32, height - 32)
  263.     @actor = actor
  264.  
  265.     refresh
  266.   end  
  267.   #--------------------------------------------------------------------------
  268.   # ● 刷新
  269.   #--------------------------------------------------------------------------
  270.   def refresh
  271.     self.contents.clear  
  272.  
  273.     x = 0
  274.     y = 0
  275.     #draw_actor_graphic(@actor, 40, 120)
  276.     bitmap = Bitmap.new("Graphics/Faces/" + @actor.id.to_s + "_Q.png")
  277.     src_rect = Rect.new(0, 0, bitmap.width, bitmap.height)
  278.     self.contents.blt(x, y+30, bitmap, src_rect)
  279.     draw_actor_name(@actor, 4, 0)
  280.     draw_actor_class(@actor, 4 + 144, 0)
  281.     draw_actor_level(@actor, 96, 32)
  282.     draw_actor_state(@actor, 96, 64)   
  283.     draw_actor_hp_lvup(@actor, 96+128, 32)
  284.     draw_actor_sp_lvup(@actor, 96+128, 64)
  285.     draw_actor_lvup(@actor, 96, 128, 0)
  286.     draw_actor_lvup(@actor, 96, 160, 1)
  287.     draw_actor_lvup(@actor, 96, 192, 2)
  288.     draw_actor_lvup(@actor, 96, 224, 3)
  289.     draw_actor_lvup(@actor, 96, 256, 4)
  290.   end
  291. end
  292. #==============================================================================
  293. # ■ Window_Help
  294. #------------------------------------------------------------------------------
  295. #  特技及物品的说明、角色的状态显示的窗口。
  296. #==============================================================================
  297. class Window_Lvup_Help < Window_Base
  298.   #--------------------------------------------------------------------------
  299.   # ● 初始化对像
  300.   #--------------------------------------------------------------------------
  301.   def initialize
  302.     super(0, 320, 640, 160)
  303.     self.contents = Bitmap.new(width - 32, height - 32)
  304.     @test = "" #——这个东西用来检测,节约内存专用
  305.   end  
  306.   #--------------------------------------------------------------------------
  307.   # ● 设置文本
  308.   #--------------------------------------------------------------------------
  309.   def lvup_text(text1, text2 = nil, text3 = nil, text4 = nil)
  310.     if @test != text1
  311.       @test = text1
  312.     else
  313.       return
  314.     end   
  315.     self.contents.clear
  316.     self.contents.font.color = normal_color
  317.     self.contents.draw_text(4, 0, self.width - 40, 32, text1)
  318.     if text2 != nil
  319.       self.contents.draw_text(4 , 32, self.width - 40, 32, text2)
  320.     end
  321.     self.contents.font.size -= 4
  322.     if text3 != nil
  323.       self.contents.draw_text(4 , 64, self.width - 40, 32, text3)
  324.     end
  325.     if text4 != nil
  326.       self.contents.draw_text(4 , 96, self.width - 40, 32, text4)
  327.     end
  328.     self.contents.font.size += 4
  329.   end
  330. end
  331. #==============================================================================
  332. # ■ Scene_lvup
  333. #------------------------------------------------------------------------------
  334. #  处理升级画面的类。
  335. #==============================================================================
  336. class Scene_Lvup
  337.   #--------------------------------------------------------------------------
  338.   # ● 初始化对像
  339.   #     actor_index : 角色索引
  340.   #     menu_index : 选项起始位置
  341.   #--------------------------------------------------------------------------
  342.   def initialize(actor_index = 0 , menu_index = 0)
  343.     @actor_index = actor_index
  344.     @menu_index = menu_index
  345.   end
  346.   #--------------------------------------------------------------------------
  347.   # ● 主处理
  348.   #--------------------------------------------------------------------------
  349.   def main
  350.     s1 = "增加体质"
  351.     s2 = "增加"+$data_system.words.str
  352.     s3 = "增加"+$data_system.words.dex
  353.     s4 = "增加"+$data_system.words.agi
  354.     s5 = "增加"+$data_system.words.int
  355.     s6 = "确认加点"
  356.     s7 = "点数重置"
  357.     @command_window = Window_Command.new(128, [s1, s2, s3, s4, s5, s6, s7])
  358.     @command_window.index = @menu_index
  359.     # 获取角色
  360.     @actor = $game_party.actors[@actor_index]
  361.     # 将角色的剩余点数带入
  362.     $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  363.     # 初始化临时量
  364.     $temp_str = 0
  365.     $temp_dex = 0
  366.     $temp_agi = 0
  367.     $temp_int = 0
  368.     $temp_hp = 0
  369.     $temp_sp = 0
  370.     #=========================================================================
  371.     # 特别提示:这些设置也可以使用小数,但是可能出现0值意外错误
  372.     #  (各种编程语言都有这种意外),建议还是使用整数,正负不限
  373.     #=========================================================================
  374.     # 每提升一次力量,提升多少附加能力
  375.     #=========================================================================
  376.     @str_hp = 30     # 每提升一次力量附加提升多少HP
  377.     @str_sp = 0     # 每提升一次力量附加提升多少SP
  378.     @str_dex = 0    # 每提升一次力量附加提升多少灵巧
  379.     @str_agi = 0    # 每提升一次力量附加提升多少速度
  380.     @str_int = 0    # 每提升一次力量附加提升多少魔力
  381.     @str_str = 3    # 每提升一次力量附加提升多少力量
  382.     #=========================================================================
  383.     # 每提升一次灵巧,提升多少附加能力
  384.     #=========================================================================
  385.     @dex_hp = 0     # 每提升一次灵巧附加提升多少HP
  386.     @dex_sp = 0     # 每提升一次灵巧附加提升多少SP
  387.     @dex_str = 0    # 每提升一次灵巧附加提升多少力量
  388.     @dex_agi = 0    # 每提升一次灵巧附加提升多少速度
  389.     @dex_int = 0    # 每提升一次灵巧附加提升多少魔力
  390.     @dex_dex = 3    # 每提升一次灵巧附加提升多少灵巧
  391.     #=========================================================================
  392.     # 每提升一次速度,提升多少附加能力
  393.     #=========================================================================
  394.     @agi_hp = 0     # 每提升一次速度附加提升多少HP
  395.     @agi_sp = 0     # 每提升一次速度附加提升多少SP
  396.     @agi_str = 0    # 每提升一次速度附加提升多少力量
  397.     @agi_dex = 0    # 每提升一次速度附加提升多少灵巧
  398.     @agi_int = 0    # 每提升一次速度附加提升多少魔力
  399.     @agi_agi = 3    # 每提升一次速度附加提升多少速度
  400.     #=========================================================================
  401.     # 每提升一次魔力,提升多少附加能力
  402.     #=========================================================================
  403.     @int_hp = 0     # 每提升一次魔力附加提升多少HP
  404.     @int_sp = 30    # 每提升一次魔力附加提升多少SP
  405.     @int_str = 0   # 每提升一次魔力附加提升多少力量
  406.     @int_dex = 0   # 每提升一次魔力附加提升多少灵巧
  407.     @int_agi = 0   # 每提升一次魔力附加提升多少速度
  408.     @int_int = 3   # 每提升一次魔力附加提升多少魔力
  409.     #=========================================================================
  410.     # 每提升一次体力,提升多少附加能力
  411.     #=========================================================================
  412.     @hp = 100       # 每提升一次体力提升多少HP
  413.     @sp = 50       # 每提升一次体力提升多少SP
  414.     @hp_str = 0   # 每提升一次体力提升多少力量
  415.     @hp_dex = 0   # 每提升一次体力提升多少速度
  416.     @hp_agi = 0   # 每提升一次体力提升多少灵巧
  417.     @hp_int = 0   # 每提升一次体力提升多少魔力   
  418.     # 定义说明文字
  419.     @text_hp_sc = "体质可以增加生存的能力,可以延长生存的时间!"
  420.     @text_str_sc = $data_system.words.str + "可以增加物理攻击和物理技能的威力!"
  421.     @text_dex_sc = $data_system.words.dex + "可以提高攻击的命中率和必杀!"
  422.     @text_agi_sc = $data_system.words.agi + "可以提高回避、命中、逃跑成功率!"
  423.     @text_int_sc = $data_system.words.int + "可以提高魔法的效果,可以增加1点魔法!"
  424.     @text_save = "保存分配情况并返回游戏"
  425.     @text_reset= "重新分配能力点数"
  426.     @text_2 = "每增加一次此项能力值,可以提升能力值"
  427.     @text_hp = "最大" + $data_system.words.hp + "值"
  428.     @text_sp = "最大" + $data_system.words.sp + "值"
  429.     @text_str = "最大" + $data_system.words.str + "值"
  430.     @text_dex = "最大" + $data_system.words.dex + "值"
  431.     @text_agi = "最大" + $data_system.words.agi + "值"
  432.     @text_int = "最大" + $data_system.words.int + "值"
  433.     s_disable
  434.     # 生成状态窗口
  435.     @lvup_window = Window_Lvup.new(@actor)
  436.     @lvup_window.x = 128
  437.     @lvup_window.y = 0   
  438.     # 生成帮助窗口并初始化帮助文本
  439.     @help_window = Window_Lvup_Help.new   
  440.     # 执行过渡
  441.     Graphics.transition(40, "Graphics/Transitions/" + $data_system.battle_transition)
  442.     # 主循环
  443.     loop do
  444.       # 刷新游戏画面
  445.       Graphics.update
  446.       # 刷新输入信息
  447.       Input.update
  448.       # 刷新画面
  449.       update
  450.       # 如果切换画面就中断循环
  451.       if $scene != self
  452.         break
  453.       end
  454.     end
  455.     # 准备过渡
  456.     Graphics.freeze
  457.     # 释放窗口
  458.     @command_window.dispose
  459.     @lvup_window.dispose
  460.     @help_window.dispose
  461.   end
  462.   #--------------------------------------------------------------------------
  463.   # ● 刷新画面
  464.   #--------------------------------------------------------------------------
  465.   def update
  466.     # 刷新窗口
  467.     @command_window.update
  468.     # 选项明暗判断(因为太消耗资源,所以屏蔽掉了)
  469.     s_disable
  470.     @lvup_window.update
  471.     #=============================================================
  472.     # 按下 B 键的情况下
  473.     #=============================================================
  474.     if Input.trigger?(Input::B)
  475.       # 演奏取消 SE
  476.       $game_system.se_play($data_system.cancel_se)
  477.       # 切换到地图画面
  478.       $scene = Scene_Menu.new(0)
  479.       return
  480.     end
  481.     #=============================================================
  482.     # 按下 C 键的情况下
  483.     #=============================================================
  484.     if Input.trigger?(Input::C)      
  485.       if @command_window.index == 5
  486.           # 演奏确定 SE
  487.         $game_system.se_play($data_system.decision_se)
  488.         # 将角色的剩余点数带回
  489.         $game_variables[@actor.id + LEVEL_UP_VARIABLE] = $point
  490.         # 将角色点数实际加上
  491.         @actor.str += $temp_str
  492.         @actor.dex += $temp_dex
  493.         @actor.agi += $temp_agi
  494.         @actor.int += $temp_int
  495.         @actor.maxhp += $temp_hp
  496.         @actor.maxsp += $temp_sp
  497.         # 切换到地图画面
  498.         $scene = Scene_Map.new
  499.         return
  500.       end
  501.       if @command_window.index == 6
  502.           # 演奏确定 SE
  503.         $game_system.se_play($data_system.cancel_se)
  504.           # 将角色的剩余点数带入
  505.         $point = $game_variables[@actor.id + LEVEL_UP_VARIABLE]   
  506.           # 初始化临时量
  507.         $temp_str = 0
  508.         $temp_dex = 0
  509.         $temp_agi = 0
  510.         $temp_int = 0
  511.         $temp_hp = 0
  512.         $temp_sp = 0
  513.         @lvup_window.refresh
  514.         return
  515.       end
  516.       if $point == 0
  517.         # 演奏冻结 SE
  518.         $game_system.se_play($data_system.buzzer_se)
  519.         return
  520.       end
  521.       case @command_window.index
  522.       when 0
  523.         # 演奏确定 SE
  524.         $game_system.se_play($data_system.decision_se)
  525.         $temp_hp += @hp
  526.         $temp_sp += @sp
  527.         $temp_str += @hp_str
  528.         $temp_dex += @hp_dex
  529.         $temp_agi += @hp_agi
  530.         $temp_int += @hp_int
  531.         $point -= 1
  532.         @lvup_window.refresh
  533.         s_disable
  534.         return
  535.       when 1
  536.         # 演奏确定 SE
  537.         $game_system.se_play($data_system.decision_se)
  538.         $temp_str += @str_str
  539.         $temp_hp += @str_hp
  540.         $temp_sp += @str_sp
  541.         $temp_dex += @str_dex
  542.         $temp_agi += @str_agi
  543.         $temp_int += @str_int
  544.         $point -= 1
  545.         @lvup_window.refresh
  546.         s_disable
  547.         return
  548.       when 2
  549.         # 演奏确定 SE
  550.         $game_system.se_play($data_system.decision_se)
  551.         $temp_dex += @dex_dex
  552.         $temp_hp += @dex_hp
  553.         $temp_sp += @dex_sp
  554.         $temp_str += @dex_str
  555.         $temp_agi += @dex_agi
  556.         $temp_int += @dex_int
  557.         $point -= 1
  558.         @lvup_window.refresh
  559.         s_disable
  560.         return
  561.       when 3
  562.         # 演奏确定 SE
  563.         $game_system.se_play($data_system.decision_se)
  564.         $temp_agi += @agi_agi
  565.         $temp_hp += @agi_hp
  566.         $temp_sp += @agi_sp
  567.         $temp_str += @agi_str
  568.         $temp_dex += @agi_dex
  569.         $temp_int += @agi_int
  570.         $point -= 1
  571.         @lvup_window.refresh
  572.         s_disable
  573.         return
  574.       when 4
  575.         # 演奏确定 SE
  576.         $game_system.se_play($data_system.decision_se)
  577.         $temp_int += @int_int
  578.         $temp_hp += @int_hp
  579.         $temp_sp += @int_sp
  580.         $temp_str += @int_str
  581.         $temp_dex += @int_dex
  582.         $temp_agi += @int_agi
  583.         $point -= 1
  584.         @lvup_window.refresh
  585.         s_disable
  586.         return
  587.       end
  588.     end
  589.     #=============================================================
  590.     # 什么都没有按下的情况
  591.     #=============================================================
  592.     case @command_window.index   
  593.     when 0  # 增加体力
  594.       temptext1 = @text_hp + @hp.to_s + "点   " + @text_str + @hp_str.to_s + "点   " + @text_dex + @hp_dex.to_s + "点"
  595.       temptext2 = @text_sp + @sp.to_s + "点   " + @text_agi + @hp_agi.to_s + "点   " + @text_int + @hp_int.to_s + "点"
  596.       @help_window.lvup_text(@text_hp_sc , @text_2 , temptext1 , temptext2)
  597.     when 1  # 增加力量
  598.       temptext1 = @text_hp + @str_hp.to_s + "点   " + @text_str + @str_str.to_s + "点   " + @text_dex + @str_dex.to_s + "点"
  599.       temptext2 = @text_sp + @str_sp.to_s + "点   " + @text_agi + @str_agi.to_s + "点   " + @text_int + @str_int.to_s + "点"
  600.       @help_window.lvup_text(@text_str_sc , @text_2 , temptext1 , temptext2)
  601.     when 2  # 增加灵巧
  602.       temptext1 = @text_hp + @dex_hp.to_s + "点   " + @text_str + @dex_agi.to_s + "点   " + @text_dex + @dex_dex.to_s + "点"
  603.       temptext2 = @text_sp + @dex_sp.to_s + "点   " + @text_agi + @dex_agi.to_s + "点   " + @text_int + @dex_int.to_s + "点"
  604.       @help_window.lvup_text(@text_dex_sc , @text_2 , temptext1 , temptext2)
  605.     when 3  # 增加速度
  606.       temptext1 = @text_hp + @agi_hp.to_s + "点   " + @text_str + @agi_str.to_s + "点   " + @text_dex + @agi_dex.to_s + "点"
  607.       temptext2 = @text_sp + @agi_sp.to_s + "点   " + @text_agi + @agi_agi.to_s + "点   " + @text_int + @agi_int.to_s + "点"
  608.       @help_window.lvup_text(@text_agi_sc , @text_2 , temptext1 , temptext2)
  609.     when 4  # 增加魔力
  610.       temptext1 = @text_hp + @int_hp.to_s + "点   " + @text_str + @int_str.to_s + "点   " + @text_dex + @int_dex.to_s + "点"
  611.       temptext2 = @text_sp + @int_sp.to_s + "点   " + @text_agi + @int_agi.to_s + "点   " + @text_int + @int_int.to_s + "点"
  612.       @help_window.lvup_text(@text_int_sc , @text_2 , temptext1 , temptext2)
  613.     when 5 # 保存设定
  614.       @help_window.lvup_text(@text_save)
  615.     when 6 # 点数重置
  616.       @help_window.lvup_text(@text_reset)     
  617.     end
  618.     #=============================================================
  619.     # 按下R与L换人的情况
  620.     #=============================================================      
  621.     if Input.trigger?(Input::R)
  622.       # 演奏光标 SE
  623.       $game_system.se_play($data_system.cursor_se)
  624.       # 移至下一位角色
  625.       @actor_index += 1
  626.       @actor_index %= $game_party.actors.size
  627.       # 切换到别的状态画面
  628.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  629.       return
  630.     end
  631.     # 按下 L 键的情况下
  632.     if Input.trigger?(Input::L)
  633.       # 演奏光标 SE
  634.       $game_system.se_play($data_system.cursor_se)
  635.       # 移至上一位角色
  636.       @actor_index += $game_party.actors.size - 1
  637.       @actor_index %= $game_party.actors.size
  638.       # 切换到别的状态画面
  639.       $scene = Scene_Lvup.new(@actor_index , @command_window.index)
  640.       return
  641.     end
  642.   end  
  643.   #--------------------------------------------------------------------------
  644.   # ● 选项明暗判断
  645.   #--------------------------------------------------------------------------
  646.   def s_disable
  647.     # 判断剩余点数是否为0,如果为0,那么增加选项表示为暗色
  648.     if $point == 0
  649.       @command_window.disable_item(0)
  650.       @command_window.disable_item(1)
  651.       @command_window.disable_item(2)
  652.       @command_window.disable_item(3)
  653.       @command_window.disable_item(4)
  654.     else
  655.       @command_window.able_item(0)
  656.       @command_window.able_item(1)      
  657.       @command_window.able_item(2)
  658.       @command_window.able_item(3)
  659.       @command_window.able_item(4)
  660.     end
  661.   end
  662. end
  663.  
  664. #==============================================================================
  665. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  666. #==============================================================================

Lv2.观梦者

梦石
0
星屑
625
在线时间
130 小时
注册时间
2015-4-2
帖子
78

开拓者

发表于 2019-3-20 23:41:22 | 显示全部楼层
只是在主菜单加了一个加点的入口哈,其它的没改。(窗口位置,大小什么的就没调了哟)
搜索 ###改 可以看改的地方
22.png
111.png

Project1.rar

193.78 KB, 下载次数: 138

评分

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

查看全部评分

回复 支持 2 反对 0

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
1293
在线时间
118 小时
注册时间
2017-7-14
帖子
148
 楼主| 发表于 2019-3-21 12:40:27 | 显示全部楼层
YSC 发表于 2019-3-20 23:41
只是在主菜单加了一个加点的入口哈,其它的没改。(窗口位置,大小什么的就没调了哟)
搜索 ###改 可以看改 ...

好的谢谢大佬QWQ
回复 支持 反对

使用道具 举报

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

本版积分规则

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

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

GMT+8, 2024-4-19 06:49

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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