Syntax GuideStories & LoreGithubDiscord Server

Hemolymph Syntax Guide

Hemolymph provides more advanced syntax to make searches. Each individual meaningful element of a search is called a query. Two or more queries put together one after another will only retrieve results that match all of them.

All the examples in this guide are clickable. They are written in bold text and yellow, like all the clickable search queries in Hemolymph.


Basic Queries

A basic query consists of unstructured text, and will match all text in a card excluding flavor text. It prioritizes matches in this order.

  1. Names
  2. Kins
  3. Keywords
  4. Description
  5. Type line

All basic queries inside a single query group will be put together as one.

Examples

QueryWill match...
dr vatsall cards that contain the text "dr vats" anywhere

Text Queries

You can match all string properties in a card. Here are some aliases for certain properties:

PropertyAliases
namen
descriptiondesc
kink
keywordkw
flavortextft

If your match has more than one word, you must use double quotes (") around it.

With all string queries, using a colon (:) will retrieve any result that contains what you're looking for, whereas an equals sign (=) will match only results that are exactly the text you're searching. Most of the time, you want to use a colon.

You can also use regex.

Examples

QueryWill match...
n:antall cards with "ant" in their name
n="lost man"all cards named exactly "lost man"
n=/.*/all cards whose name matches the regex /.*/

Kin Queries

Kin queries are similar to text queries, but are aware of the kin tree whenever you type a fully recognized kin.

If your query has more than one word, you must use double quotes (") around it.

Using a colon (:) will retrieve any result of the same kin that you're looking for, respecting the Kin Tree, whereas an equals sign (=) will match only results that are exactly of the kin you're searching. Most of the time, you want to use a colon.

If the string you look for is not recognized as a kin, the search will be interpreted as a text query instead. You can also use a Regex.

Examples

QueryWill match...
k:antall ant kin cards
k:insectall insect kin cards
k=insectall cards of exactly insect kin
k=sorcall cards whose kin is equal to the string "sorc"
k:"blue k"all cards whose kin contains the string "blue k"

Number Queries

You can match all number properties in a card.

PropertyAliases
costc
healthh
defensed
powerp

Examples

QueryWill match...
c>3all cards with cost greater than 3
d!=2all cards with defense different from 2
p<=2all cards with power less than or equal to 2

Recursive Queries

The following properties are matched by another query group, which is written in parentheses:

PropertyAliases
devoursdev
devouredbydby

You can match devours with a colon to match by the restriction written the card, and an equals sign to match by the actual cards. The examples should clarify this distinction.

PropertyAliases
devoursdev
devouredbydby

Examples

QueryWill match...
dev: (c>2)all cards said to devour cards with cost greater than 2
dev=(c>2)all cards that devour any card with cost greater than 2
dby: (mantis c>2)all cards devoured by cards with cost greater than 2 and have the word mantis written on them

OR and XOR

You can match cards that match one query group or another using OR

QueryWill match...
c>2 OR p=1all cards with cost greater than 2 or power equal to 1, or both

You can match cards that match only one of two queries using XOR

QueryWill match...
c>2 XOR p=1all cards with cost greater than 2 or power equal to 1, but not both

You can use parentheses to create more complex queries.


Negation

You can match cards that do not match a query using a dash (-).

QueryWill match...
- h=2all cards whose cost is not equal to 2

Notably, this does not match cards that do not have health. There may be situations where you want this, so there exists a lenient negation with an exclamation mark (!).

QueryWill match...
!p>2all cards without power greater than 2 (including ones that don't have a power stat)

You can use parentheses to create more complex negations.

QueryWill match...
!(p=2 XOR c=3)all cards that either have power=2 and cost=3, or have neither of those

Sorting

You can put a SORT clause in the outermost query group of your search. If no SORT clause is put, results will be sorted alphabetically, unless there is a basic query in the outermost query group. In that case they will be sorted by how closely they match the basic query.

Examples

QueryWill match...
p=2 SORT c ascendingall cards with power=2, sorted by cost, ascending
d=3 h=1 SORT n descendingall cards with defense=3, health=2, sorted alphabetically by name, descending
Loading