扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 130|回复: 0

[转载发布] 仿仙剑连击

[复制链接]
累计送礼:
0 个
累计收礼:
0 个
  • TA的每日心情
    开心
    5 小时前
  • 签到天数: 114 天

    连续签到: 4 天

    [LV.6]常住居民II

    2338

    主题

    403

    回帖

    1万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    6
    卡币
    10607
    OK点
    16
    推广点
    0
    同能卷
    0
    积分
    13376

    灌水之王

    发表于 2024-4-19 17:36:25 | 显示全部楼层 |阅读模式
    1. #   仿仙剑连击#              by 快感炮王##   老衲最近闲的蛋疼,不读佛经写脚本  #   以前看师弟玩过仙剑4,战斗里面有个连击的设定#   某队员攻击后,有一定几率出现动画,双击后让队友对所攻击目标进行连击#   有BUG的话通知老衲吧,阿弥陀佛  module DOUBLE_HIT    DOUBLE_CLICK_TIME = 15    APPEAR_PROBABILITY = 100    ANIMATION_ID = 1endclass  DOUBLE_HIT::DOUBLE_CLICK_TIME then      @key = nil       @wait_count = 0    end    old_update      end  endclass Scene_Battle  alias old_main main  def main    @judge_double_hit = false    old_main  end  alias old_ups6 update_phase4_step6  def update_phase4_step6    if rand(100) < DOUBLE_HIT::APPEAR_PROBABILITY and @active_battler.current_action.basic == 0 and $game_party.actors.size > 1 and !@target_battlers[0].dead? and !@judge_double_hit and @active_battler.is_a?(Game_Actor) then            @double_sprite = RPG::Sprite.new      @double_sprite.x = 320      @double_sprite.y = 240      @double_sprite.animation($data_animations[DOUBLE_HIT::ANIMATION_ID],true)      @max_hit_duration = $data_animations[DOUBLE_HIT::ANIMATION_ID].frame_max      @count = 0            loop do        Graphics.update        Input.update        @count += 1        @double_sprite.update        if Input.double_click?(Input::C) then                    double_hit_preparation          break                  end        break if @count > @max_hit_duration + 100      end           end     @double_sprite.dispose if @double_sprite != nil     if @phase4_step == 3 then       return     else     @judge_double_hit = false     old_ups6     end        end      def min_cp_actor     @min_cp = 65535     @actor = nil          for actor in $game_party.actors      if actor.cp < @min_cp and actor.cp != 0 and !actor.dead? then        @min_cp = actor.cp        @actor = actor      end     end             return @actor   end         def double_hit_preparation     @active_battler = min_cp_actor     @active_battler.current_action.kind = 0     @active_battler.current_action.basic = 0     @animation1_id = @active_battler.animation1_id     @animation2_id = @active_battler.animation2_id      @judge_double_hit = true     for target in @target_battlers        target.attack_effect(@active_battler)     end     @phase4_step = 3   end      end复制代码
    复制代码
                本帖来自P1论坛作者dbshy,因Project1站服务器在国外有时候访问缓慢不方便作者交流学习,经联系P1站长fux2同意署名转载一起分享游戏制作经验,共同为国内独立游戏作者共同创造良好交流环境,原文地址:https://rpg.blue/forum.php?mod=viewthread&tid=128071  若有侵权,发帖作者可联系底部站长QQ在线咨询功能删除,谢谢。
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2025-3-14 23:12 , Processed in 0.084628 second(s), 53 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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