else if count == 1 then color_names_1() + ", land"
else if count == 2 then color_names_2() + ", land"
else if count == 3 then color_names_3() + ", land"
else "land, multicolor"
)
};
};
# Look for a CDA that defines colors
text_to_color := {
text := filter_text(match: card_name+"(</[-a-z]+>)? is (colorless|all colors|((blue|white|green|red|black)((,|,? and) (blue|white|green|red|black))*))\\.")
if text == "" then ""
else if contains(text, match: "all colors") then (
colors := "WUBRG"
if land = "land" then land_multicolor()
else mana_to_color(hybrid: "")
) else (
colors := ""
if contains(text, match: "white") then colors := colors + "W"
if contains(text, match: "blue") then colors := colors + "U"
if contains(text, match: "black") then colors := colors + "B"
if contains(text, match: "red") then colors := colors + "R"
if contains(text, match: "green") then colors := colors + "G"