20 cardswhere (the card types include “instant” or the card types include “sorcery”) and the color identity ≤ R and (the mana value = 1 or the text matches the regex /(flashback|spectacle) {r}/) and the mana cost is not greater than or equal to {X} and it’s legal…