Card Lookup
This skill provides efficient access to the Terraforming Mars card database.
Card Data Location
The card database is located at:
backend/assets/terraforming_mars_cards.json
This file contains 453 cards and should NOT be read directly (too large). Always use jq commands to query specific data.
Card Structure
Each card has the following fields:
| Field | Type | Description |
|---|---|---|
id |
string | Unique identifier (e.g., "001", "B01" for corporations) |
name |
string | Card name |
type |
string | One of: automated, active, event, corporation, prelude |
cost |
number | Megacredit cost to play |
description |
string | Card effect description |
pack |
string | Expansion pack the card belongs to |
tags |
array | Card tags (optional) |
requirements |
array | Play requirements (optional) |
behaviors |
array | Card effects/triggers (optional) |
vpConditions |
array | Victory point conditions (optional) |
resourceStorage |
object | Resource storage info (optional) |
Card Types
automated- One-time effect cards (green border)active- Ongoing effect cards (blue border)event- One-time event cards (red border)corporation- Starting corporation cardsprelude- Prelude expansion cards
Tags
Available tags: animal, building, city, earth, jovian, microbe, plant, power, science, space, venus, wild
Packs
Available packs: base-game, corporate-era, prelude, venus-next, colonies, turmoil, promo
jq Commands
Find a card by name (case-insensitive)
jq '.[] | select(.name | test("Mining"; "i"))' backend/assets/terraforming_mars_cards.json
Find a card by exact name
jq '.[] | select(.name == "Mining Rights")' backend/assets/terraforming_mars_cards.json
Find a card by ID
jq '.[] | select(.id == "001")' backend/assets/terraforming_mars_cards.json
List all corporations
jq '[.[] | select(.type == "corporation")] | .[] | {id, name, description}' backend/assets/terraforming_mars_cards.json
Find corporation by name
jq '.[] | select(.type == "corporation") | select(.name | test("Ecoline"; "i"))' backend/assets/terraforming_mars_cards.json
Find cards by type
jq '[.[] | select(.type == "event")] | length' backend/assets/terraforming_mars_cards.json # Count
jq '[.[] | select(.type == "event")] | .[0:5]' backend/assets/terraforming_mars_cards.json # First 5
Find cards by tag
jq '[.[] | select(.tags != null) | select(.tags | contains(["science"]))]' backend/assets/terraforming_mars_cards.json
Find cards by pack
jq '[.[] | select(.pack == "venus-next")] | .[] | {name, type, cost}' backend/assets/terraforming_mars_cards.json
Find cards by cost range
jq '[.[] | select(.cost >= 20 and .cost <= 30)] | .[] | {name, cost, type}' backend/assets/terraforming_mars_cards.json
Find cards with specific requirements
jq '[.[] | select(.requirements != null) | select(.requirements[] | .type == "oxygen")]' backend/assets/terraforming_mars_cards.json
List all card names (quick reference)
jq '[.[] | .name] | sort' backend/assets/terraforming_mars_cards.json
Get card summary (name, type, cost, tags)
jq '.[] | select(.name | test("Birds"; "i")) | {name, type, cost, tags, description}' backend/assets/terraforming_mars_cards.json
Usage Guidelines
- Always use
jqto query the card database - never read the entire file - For partial name matches, use
test("pattern"; "i")for case-insensitive search - Pipe results to
heador use array slicing.[0:N]when expecting many results - Use
{field1, field2}projection to limit output to relevant fields
Converted and distributed by TomeVault — claim your Tome and manage your conversions.