赞 | 0 |
VIP | 313 |
好人卡 | 0 |
积分 | 1 |
经验 | 6681 |
最后登录 | 2024-1-20 |
在线时间 | 66 小时 |
Lv1.梦旅人 蚂蚁卡卡
- 梦石
- 0
- 星屑
- 116
- 在线时间
- 66 小时
- 注册时间
- 2007-12-16
- 帖子
- 3081
|
叮当猫的
- #--------------------------------------------------------------------------
- # ● 处理敌人动作
- #--------------------------------------------------------------------------
- def update_enemy_animation
- if @battler.is_a?(Game_Enemy)
- if @battler.show_damage_value != nil
- self.damage(@battler.show_damage_value, false)
- @battler.show_damage(nil)
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
- @battler.setup_battler_hurt_ani(1)
- end
- if @battler.current_action.kind == 0 and @battler.current_action.basic == 1
- else
- # 单回合只有一次攻击
- if @last_hits == 1 and not @battler.dead? and @battler.damage.is_a?(Numeric) and @battler.damage > 0
- ############ #小改动
- @last_hits = 0
- ############
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
- @battler.setup_battler_hurt_ani(1)
- #################################################################
- # 单回合多次攻击
- elsif @hits > @temp_hits and @frame_index != @last_frame and not @battler.dead? and @battler.damage.is_a?(Numeric) and @battler.damage > 0
- ############ #小改动
- @temp_hits+=1
- ############
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
- @battler.setup_battler_hurt_ani(1)
- #################################################################
- # 死亡之前攻击
- elsif @hits > @temp_hits and @frame_index != @last_frame and @battler.damage.is_a?(Numeric) and @battler.damage > 0 and @battler.dead? and @battler.battler_dead_ani != 1
- ############ #小改动
- @temp_hits+=1
- ############
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
- @battler.setup_battler_hurt_ani(1)
- #################################################################
- # 无伤害的攻击
- elsif !@battler_damage.is_a?(Numeric) and @last_hits == 1 and @frame_index == @last_frame
- @last_hits = 0
- #################################################################
- # 闪避的回合
- elsif @battler_damage.is_a?(Numeric) and @battler.damage == 0 and @last_hits == 1 and @frame_index == @last_frame
- @last_hits = 0
- #################################################################
- # 死亡判定
- elsif @last_hits == 1 and @frame_index == @last_frame and @battler.dead? and @battler.battler_dead_ani != 1
- @last_hits = 0
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
- @battler.setup_battler_dead_ani(1)
- collapse
- end
- end
- end
复制代码
星云的
- #--------------------------------------------------------------------------
- # ● 处理敌人动作
- #--------------------------------------------------------------------------
- def update_enemy_animation
- if @battler.is_a?(Game_Enemy)
- if @battler.show_damage_value != nil
- self.damage(@battler.show_damage_value, ture)
- @battler.show_damage(nil)
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
- @battler.setup_battler_hurt_ani(1)
- end
- if @battler.current_action.kind == 0 and @battler.current_action.basic == 1
- else
- if @hits == 1 and not @battler.dead? and @battler.battler_hurt_ani != 1 and @battler.damage.is_a?(Numeric) and @battler.damage > 0
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[3], 1)
- @battler.setup_battler_hurt_ani(1)
- elsif @frame_index == @last_frame and @battler.dead? and @battler.battler_dead_ani != 1
- @battler.setup_battler_ani(@battler.battler_name.split(/★/)[4], 1)
- @battler.setup_battler_dead_ani(1)
- collapse
- end
- end
- end
- end
复制代码
是不是就是因为 在处理敌人动作 指令发出两者顺序不同
所以才会 前者没有问题
而后者会出现 我遇到的问题呢?
关键点 是在处理敌人动作的时机
谢谢你的帮助 |
|