单技能连击脚本
来源:互联网 发布:python 性能测试工具 编辑:程序博客网 时间:2024/04/28 23:37
module RPG
class Skill
def name
name = @name.split(/,/)[0]
return name != nil ? name : ""
end
def hit_count
name = @name.split(/,/)[1]
return name != nil ? name.to_i.abs : 0
end
def attack_count
name = @name.split(/,/)[2]
return name != nil ? name.to_i.abs : 0
end
end
end
class Spriteset_Battle
def damage_effect?
for sprite in @enemy_sprites + @actor_sprites
return true if sprite.damage_effect?
end
return false
end
end
class Scene_Battle
alias sailcat_update_phase4_step1 update_phase4_step1
alias sailcat_make_skill_action_result make_skill_action_result
alias sailcat_update_phase4_step5 update_phase4_step5
def update_phase4_step1
@hit_count = 0
@attack_count = 0
sailcat_update_phase4_step1
end
def make_skill_action_result
sailcat_make_skill_action_result
@attack_count = @skill.attack_count
@hit_count = @skill.hit_count
#规定可以法术连击的技能id
can_use_skill = [67,68,74,75,76,77,78,79,80,81]
#检测法术连击技能
if can_use_skill.include?(@skill.id)
if @active_battler.skill_learn?(93)
if rand(100) < 40
@hit_count = 1
end
elsif @active_battler.skill_learn?(92)
if rand(100) < 20
@hit_count = 1
end
end
end
end
def update_phase4_step5
sailcat_update_phase4_step5
if @common_event_id > 0
common_event = $data_common_events[@common_event_id]
$game_system.battle_interpreter.setup(common_event.list, 0)
end
if @attack_count > 0
for target in @target_battlers
if target.damage != nil
@phase4_step = 5
target.damage = nil
return
end
target.errorDead = true
for i in 0...@attack_count
target.errorDead = true
target.skill_effect(@active_battler, @skill)
end
end
@attack_count = 0
end
if @hit_count > 0
for target in @target_battlers.clone
if target.dead?
if @target_battlers.size > 1
@target_battlers.delete(target)
else
@target_battlers.delete(target)
if target.is_a?(Game_Enemy)
target = $game_troop.smooth_target_enemy(target.index)
else
target = $game_party.smooth_target_actor(target.index)
end
if target.is_a?(Game_Battler)
@target_battlers.push(target)
end
end
end
end
if @target_battlers.size == 0
return
end
for target in @target_battlers
if target.damage != nil and false
@phase4_step = 5
return
end
target.skill_effect(@active_battler, @skill)
end
@hit_count -= 1
@phase4_step = 3
end
end
end
- 单技能连击脚本
- playMaker状态机之连击组合技能
- Unity简单的实现动画三连击脚本
- UNITY之技能CD脚本
- 冲锋技能jass脚本重写
- 求个奇迹斯服的连击脚本有的个啊
- 3连击
- 多连击
- 三连击
- 三连击
- Unity 3D 技能释放的脚本 技能冷却时间
- 只有单杀技能的飞鸽传书
- 重要技能体验 单步执行
- 重要技能体验-单步执行
- 【Unity】NGUI实现技能冷却脚本
- 【unity实用技能】控制摄像头脚本
- shell脚本中常用的技能
- unity 单例脚本
- 5.1 JSP访问mysql数据库
- 我们今天该做什么——恰当把握和每一个人的距离
- 通过Xcode将项目同步到GitHub上
- android 短信是否发送成功
- 四年,我眼里的软件测试
- 单技能连击脚本
- 判断一年中第几天
- Android Layout标签之 - viewStub,requestFocus,merge,include
- Adobe Reader XI 静默安装
- 约瑟夫问题Java代码
- 宋体(Simsun)和新宋体(NSimsun)的区别
- 集合collection
- 随即战斗曲子脚本
- 3D体感照相项目小结及谈经验重要性