Conditional eval for Game_Troop member

I've been trying to figure this out for the better part of the last two hours, so I'm throwing in the towel and coming here.

Basically, I'm trying to write a snippet where an actor becomes affected by x state while an enemy is present. The first part of placing the conditional eval is easy since I'm just using Victor's Conditional States script which allows for evals at certain intervals to check whether a state should be applied or not.

The difficult part is that I can't seem to figure out how to search Game_Troop.members for specific enemy ids. In the setup method:

Code:
  def setup(troop_id)
    clear
    @troop_id = troop_id
    @enemies = []
    troop.members.each do |member|
      next unless $data_enemies[member.enemy_id]
      enemy = Game_Enemy.new(@enemies.size, member.enemy_id)
      enemy.hide if member.hidden
      enemy.screen_x = member.x
      enemy.screen_y = member.y
      @enemies.push(enemy)
    end
    init_screen_tone
    make_unique_names
  end

...It's pretty clear that each value is stored inside an array, @enemies, where each array within the array contains two values, the enemy index and the enemy id. I just don't know how to access the second one though (the index is irrelevant). It would be awesome to get an answer to my title question, but it would also be great to let me know how to access specific variables in an array like this one. Thanks!
You can use:
Code:
$data_enemies[ID]
This will return true if there is any enemy with the ID of ENEMYID and that enemy is appeared and still alive.
Code:
$game_troop.members.any? { |enemy| enemy.enemy_id == ENEMYID && enemy.alive? }
This will return true if there is any enemy with the ID of ENEMYID and that enemy is appeared and still alive.
Code:
$game_troop.members.any? { |enemy| enemy.enemy_id == ENEMYID && enemy.alive? }

Awesome, this works perfectly! Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/conditional-eval-for-game_troop-member.96057/