I forgot I edited that line, I didn't need to touch it though.
The real edits come later, in your original post you had;
CODE
if type.is_a?(Game_Enemy) # if enemy
opponents_unit.existing_members.each {|enemy|
selected.push(enemy) if enemy.enemy_id == type.enemy_id target# target all enemies of this id
}
There is a problem with the end of that line, how it has target after a whitepace, I don't believe that it should work like that.
Instead of directly pushing the onto the selected I've made a temporary array, p_enemies, and pushed the enemy, using the same code, onto p_enemies instead of selected. If you could find the original code and make that change (see the code above vs the code below, i've swapped selected for p_enemies) that would be great.
And I've inserted a fancy line at the end that limits it to 2 randomly selected enemies, which can be copied and pasted.
CODE
if type.is_a?(Game_Enemy) # if enemy
p_enemies = []
opponents_unit.existing_members.each {|enemy|
p_enemies.push(enemy) if enemy.enemy_id == type.enemy_id target# target all enemies of this id
}
selected.push( p_enemies.map { |each| [each, Random.rand(100)] }.sort { |a,b| a[1]<=>b[1] }[0..1].map { |each| each[0] } )