找到一个不错的连击脚本,可以自由设计连击概率和连击次数,并且连击的时候不会消耗MP 但是仍然有一个问题,每次连击时都会选择同一个目标,与其说是连击不如叫追击 如何触发连击后,进行连击的单体技能随机选择目 ...
查看全部评分
#-------------------------------------------------------------------------- # ● 设置物品或特技对像方的战斗者 # scope : 特技或者是物品的范围 #-------------------------------------------------------------------------- def set_target_battlers(scope) # 行动方的战斗者是敌人的情况下 if @active_battler.is_a?(Game_Enemy) # 效果范围分支 case scope when 1 # 敌单体 index = @active_battler.current_action.target_index @target_battlers.push($game_party.smooth_target_actor(index)) when 2 # 敌全体 for actor in $game_party.actors if actor.exist? @target_battlers.push(actor) end end when 3 # 我方单体 index = @active_battler.current_action.target_index @target_battlers.push($game_troop.smooth_target_enemy(index)) when 4 # 我方全体 for enemy in $game_troop.enemies if enemy.exist? @target_battlers.push(enemy) end end when 5 # 我方单体 (HP 0) index = @active_battler.current_action.target_index enemy = $game_troop.enemies[index] if enemy != nil and enemy.hp0? @target_battlers.push(enemy) end when 6 # 我方全体 (HP 0) for enemy in $game_troop.enemies if enemy != nil and enemy.hp0? @target_battlers.push(enemy) end end when 7 # 使用者 @target_battlers.push(@active_battler) end end # 行动方的战斗者是角色的情况下 if @active_battler.is_a?(Game_Actor) # 效果范围分支 case scope when 1 # 敌单体 index = @active_battler.current_action.target_index if $game_temp.连击FLAG @target_battlers.push($game_troop.random_target_enemy) return end @target_battlers.push($game_troop.smooth_target_enemy(index)) when 2 # 敌全体 for enemy in $game_troop.enemies if enemy.exist? @target_battlers.push(enemy) end end when 3 # 我方单体 index = @active_battler.current_action.target_index @target_battlers.push($game_party.smooth_target_actor(index)) when 4 # 我方全体 for actor in $game_party.actors if actor.exist? @target_battlers.push(actor) end end when 5 # 我方单体 (HP 0) index = @active_battler.current_action.target_index actor = $game_party.actors[index] if actor != nil and actor.hp0? @target_battlers.push(actor) end when 6 # 我方全体 (HP 0) for actor in $game_party.actors if actor != nil and actor.hp0? @target_battlers.push(actor) end end when 7 # 使用者 @target_battlers.push(@active_battler) end end end
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2025-2-3 10:56
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.