Is it possible to search between these values instead of a flat value?

So, this beutiful script change the battle system for a card game, where skills are turned to cards.
One of the function of this script is creating special tags, and giving and ID value to every tag. Then you can use these tags and values in a skill to create effects that move cards from zone to zone (hand, deck, grave, banish, etc) based on these values.
Now, when you create an effect, you can declare what the ID of each tag you want to search for.
For example:
Ruby:
"moray"       => [:take, 0, :hand, :hand, [4,3,0,0,0,0,0,0,0], :deck, 2],
This effect make that you have to take 2 cards from your hand that has the Tag ID 4 and 3, and shuffle them back in the deck.

With this known, my question is:
Is there some way to tell these effect that they can pick a value ID that is between some value ID?
In my case, I want to achiev it with the tag "Level". (Which is the 5th 0).

I tried giving it a ".." to tell the value is between, but this only return me the first value.
For example if I use:

Ruby:
"fossildig"   => [:takem, 0, :deck, :deck, [0,0,0,9,1..6,0,0,0,0], :hand, 1],
It doesn't search any card, even if it's level is between or even 1 or 6.

Then I tried this:
Ruby:
"fossildig"   => [:takem, 0, :deck, :deck, [0,0,0,9,1 && 6,0,0,0,0], :hand, 1],
Funny, it search for a level 6, but ignore the 1 and the rest of levels. Just 6.

Then I tried:
Ruby:
"fossildig"   => [:takem, 0, :deck, :deck, [0,0,0,9,1 || 6,0,0,0,0], :hand, 1],
And this searched for level 1 but not the rest...

That said, I'm mostly sure there SHOULD be a method to tell that I want to search in the IDs in between, but I can't find the way to ask it in the code.

Thanks in advance to whoever who discover it!
Hey,

The script does not seem to support this by default.
The && and || operators will not help you here, like mathematical operators they are used to calculate a result. 1 || 6 is equal to writing 1 here, 1 && 6 is equal to writing 6.
1..6 could help if the script would support ranges here, but by default the script only checks if the items value is equal to whatever you entered.

You could try to add this script below the card battle script to make the filter accept ranges. I haven't tested it out yet though, so no guarantees:
Code:
class Window_CardSelect
  
  def pass_filter?(filter_index, value)
    filter = @filter[filter_index]
    case filter
    when 0, nil      then return true
    when Enumerable  then return filter.include?(value)
    when Proc        then return filter.call(value)
    else                  return filter == value
    end
  end
  
  def enable?(item)
    return false  unless item
    return false  unless pass_filter?(0, item.damage.element_id)
    return false  unless pass_filter?(1, item.type)
    return false  unless pass_filter?(2, item.rarity)
    return false  unless pass_filter?(3, item.subtype)
    return false  unless pass_filter?(4, item.level)
    return false  unless pass_filter?(5, item.normeff)
    return false  unless pass_filter?(6, item.frame)
    return false  unless pass_filter?(7, item.archetype)
    return false  unless pass_filter?(8, item.special)
    return @actor
  end
end
Hey,

The script does not seem to support this by default.
The && and || operators will not help you here, like mathematical operators they are used to calculate a result. 1 || 6 is equal to writing 1 here, 1 && 6 is equal to writing 6.
1..6 could help if the script would support ranges here, but by default the script only checks if the items value is equal to whatever you entered.

You could try to add this script below the card battle script to make the filter accept ranges. I haven't tested it out yet though, so no guarantees:
Code:
class Window_CardSelect
 
  def pass_filter?(filter_index, value)
    filter = @filter[filter_index]
    case filter
    when 0, nil      then return true
    when Enumerable  then return filter.include?(value)
    when Proc        then return filter.call(value)
    else                  return filter == value
    end
  end
 
  def enable?(item)
    return false  unless item
    return false  unless pass_filter?(0, item.damage.element_id)
    return false  unless pass_filter?(1, item.type)
    return false  unless pass_filter?(2, item.rarity)
    return false  unless pass_filter?(3, item.subtype)
    return false  unless pass_filter?(4, item.level)
    return false  unless pass_filter?(5, item.normeff)
    return false  unless pass_filter?(6, item.frame)
    return false  unless pass_filter?(7, item.archetype)
    return false  unless pass_filter?(8, item.special)
    return @actor
  end
end
Awesome! It does work! Thank you very much!
For future reference, you can use *1..6 in these cases. The * before the range flattens the range into a simple list of integers.

Original thread: https://forums.rpgmakerweb.com/threads/is-it-possible-to-search-between-these-values-instead-of-a-flat-value.150073/