新手作品,高手请无视。
非常简单,就不带范例了,随便找个工程插入在MAIN前面即可,除了窗口可能同名以外,基本上做到了0冲突。 - #==============================================================================# ■ 领悟系统#------------------------------------------------------------------------------# 战斗结束后可以随机领悟特技。# By奶油Da蛋糕 http://mxxyy.5d6d.com #==============================================================================$cake_领悟的几率 = 100 #领悟的几率为百分之n$cake_允许领悟的特技的ID = [1,2,3,4,5] #自己想加多少就加多少$cake_领悟者ID = 1 #就是给n号角色战斗后随即领悟以上技能class Window_NewSkill < Window_Base def initialize super(128, 96-64, 640-256, 80) self.opacity = 0 self.contents = Bitmap.new(width - 32, height - 32) end def update(i) self.contents.clear self.contents.font.size = 18 self.contents.font.color = normal_color self.contents.draw_text(0,0,100,50,$game_actors[1].name,0) a = $game_actors[1].name.length a *= 6 self.contents.draw_text(a+5,0,100,50,"领悟了",0) self.contents.draw_text(a+36+18+10,0,100,50,$data_skills[i].name,0) end endclass Scene_Battle alias main_cake main def main @window_NewSkill = Window_NewSkill.new main_cake @window_NewSkill.dispose endalias start_phase5_cake start_phase5def start_phase5start_phase5_cakeif lingwu == true i = rand($cake_允许领悟的特技的ID.size) a = $cake_允许领悟的特技的ID[i] $game_actors[$cake_领悟者ID].learn_skill(a) @window_NewSkill.opacity = 255 @window_NewSkill.update(a)endenddef lingwureturn rand(100) < $cake_领悟的几率 endend复制代码
复制代码 本帖来自P1论坛作者奶油Da蛋糕,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址: https://rpg.blue/forum.php?mod=viewthread&tid=135479 若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。 |