def set_target_battlers(scope)
# 行动方的战斗者是敌人的情况下
$game_variables[666] = 0 #初始化伤害 #宝箱君
$群体 = 0#判定是否为全体技能,由于是敌人,不计算。 #宝箱君
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)
# 效果范围分支
$game_variables[666] = 0#初始化伤害 #宝箱君
$群体 = scope#判定是否为全体技能 #宝箱君
case scope
when 1 # 敌单体
index = @active_battler.current_action.target_index
@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