
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.
- Names
- Kins
- Keywords
- Description
- Type line
All basic queries inside a single query group will be put together as one.
Examples
Query | Will match... |
---|---|
dr vats | all 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:
Property | Aliases |
---|---|
name | n |
description | desc |
kin | k |
keyword | kw |
flavortext | ft |
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
Query | Will match... |
---|---|
n:ant | all 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
Query | Will match... |
---|---|
k:ant | all ant kin cards |
k:insect | all insect kin cards |
k=insect | all cards of exactly insect kin |
k=sorc | all 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.
Property | Aliases |
---|---|
cost | c |
health | h |
defense | d |
power | p |
Examples
Query | Will match... |
---|---|
c>3 | all cards with cost greater than 3 |
d!=2 | all cards with defense different from 2 |
p<=2 | all 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:
Property | Aliases |
---|---|
devours | dev |
devouredby | dby |
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.
Property | Aliases |
---|---|
devours | dev |
devouredby | dby |
Examples
Query | Will 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
Query | Will match... |
---|---|
c>2 OR p=1 | all 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
Query | Will match... |
---|---|
c>2 XOR p=1 | all 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 (-
).
Query | Will match... |
---|---|
- h=2 | all 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 (!
).
Query | Will match... |
---|---|
!p>2 | all cards without power greater than 2 (including ones that don't have a power stat) |
You can use parentheses to create more complex negations.
Query | Will 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
Query | Will match... |
---|---|
p=2 SORT c ascending | all cards with power=2, sorted by cost, ascending |
d=3 h=1 SORT n descending | all cards with defense=3, health=2, sorted alphabetically by name, descending |