# dev.malpercio.cards.set

> A card set manifest, published by a provider. Declares every card in the set with its rarity, supply cap, and canonical art. Print runs are auditable against this record.

- Kind: record
- Record key: tid
- Authority: cards.malpercio.dev
- Lexicon: 1
- Published by [cards.malpercio.dev](https://lexicon.garden/identity/did:plc:kmg2eqexpdefljft34crzesc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:kmg2eqexpdefljft34crzesc/dev.malpercio.cards.set)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:kmg2eqexpdefljft34crzesc/dev.malpercio.cards.set/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:kmg2eqexpdefljft34crzesc/dev.malpercio.cards.set/analytics)

## Record (`dev.malpercio.cards.set`)

Type: record · key tid

### Properties

- `cards` (array, required)
  - Constraints: minLength: 1
  - `items` (ref)
    - Reference: `#cardDef`
- `code` (string): Short set code printed on every card, e.g. 'EXM'. Uppercase letters and digits. A reissue is a new set record with a new code, tied to the original by series.
  - Constraints: maxLength: 8
- `createdAt` (string · datetime, required)
- `description` (string)
  - Constraints: maxLength: 2048
- `name` (string, required)
  - Constraints: maxLength: 128
- `packDefs` (array)
  - `items` (ref)
    - Reference: `#packDef`
- `series` (string): Optional grouping across sets (e.g. a season or year).
  - Constraints: maxLength: 128

## #attribute (`dev.malpercio.cards.set#attribute`)

Type: object

### Properties

- `name` (string, required)
  - Constraints: maxLength: 64
- `value` (string, required)
  - Constraints: maxLength: 256

## #cardDef (`dev.malpercio.cards.set#cardDef`)

Type: object

### Properties

- `artists` (array): Who made the art. A provider's claim; see #credit.
  - Constraints: maxLength: 8
  - `items` (ref)
    - Reference: `#credit`
- `asset` (blob, required): Canonical full-size art, stored in the provider repo so the PDS retains the blob. assetCid is its fingerprint.
  - Constraints: maxSize: 5000000, accept: image/*
- `assetCid` (string · cid, required): CID of the canonical full-size art. Owner copies must match.
- `attributes` (array): Free-form stats or flavor fields (team, position, year...).
  - `items` (ref)
    - Reference: `#attribute`
- `cardId` (string, required): Stable identifier within this set, e.g. 'the_one_ring'.
  - Constraints: maxLength: 64
- `description` (string)
  - Constraints: maxLength: 2048
- `flavor` (string): Flavor text shown with the card. Separate from description, which is reserved for rules text.
  - Constraints: maxLength: 2000, maxGraphemes: 200
- `icon` (blob)
  - Constraints: maxSize: 1000000, accept: image/*
- `iconCid` (string · cid)
- `maxSupply` (integer): Hard cap on gives for this cardId across all variants. Omit for unlimited.
  - Constraints: minimum: 1
- `number` (integer): Collector number within the set, printed with the set code (e.g. EXM 001). Explicit so editing the cards array never renumbers cards.
  - Constraints: minimum: 1
- `rarity` (ref, required)
  - Reference: `#rarity`
- `title` (string, required)
  - Constraints: maxLength: 128
- `variants` (array): Optional finishes (foil, etc). Each may carry its own cap and art.
  - `items` (ref)
    - Reference: `#variantDef`

## #credit (`dev.malpercio.cards.set#credit`)

Type: object

Attribution for card art. Give did when the artist has an atproto identity, name otherwise (at least one). Listed by the provider, so it is a claim until the artist confirms it from their own repo.

### Properties

- `did` (string · did)
- `name` (string): Display name, for artists without a DID or as a fallback.
  - Constraints: maxLength: 256, maxGraphemes: 64
- `role` (string): What they did, when a card has more than one artist.
  - Constraints: maxLength: 64, knownValues: art | animation | color

## #odds (`dev.malpercio.cards.set#odds`)

Type: object

### Properties

- `rarity` (ref, required)
  - Reference: `#rarity`
- `variantId` (string): Weights this variant of cards of this rarity. Omit to weight the base cards.
  - Constraints: maxLength: 64
- `weight` (integer, required)
  - Constraints: minimum: 1

## #packDef (`dev.malpercio.cards.set#packDef`)

Type: object

### Properties

- `asset` (blob): Sealed pack art.
  - Constraints: maxSize: 5000000, accept: image/*
- `assetCid` (string · cid): Sealed pack art.
- `cardCount` (integer, required)
  - Constraints: minimum: 1
- `description` (string)
  - Constraints: maxLength: 2048
- `maxSupply` (integer)
  - Constraints: minimum: 1
- `odds` (array): Weights for drawing pack contents, per rarity and optionally per variant. Printings not listed have weight 0. Omit for a uniform draw over base cards.
  - `items` (ref)
    - Reference: `#odds`
- `packId` (string, required)
  - Constraints: maxLength: 64
- `title` (string, required)
  - Constraints: maxLength: 128

## #rarity (`dev.malpercio.cards.set#rarity`)

Type: string

Constraints: knownValues: common | uncommon | rare | legendary | unique

## #variantDef (`dev.malpercio.cards.set#variantDef`)

Type: object

### Properties

- `artists` (array): Overrides the card's artists for this variant, e.g. when an animated version has its own animator.
  - Constraints: maxLength: 8
  - `items` (ref)
    - Reference: `#credit`
- `asset` (blob): Overrides the card art for this variant.
  - Constraints: maxSize: 5000000, accept: image/*
- `assetCid` (string · cid): Overrides the card's assetCid for this variant.
- `flavor` (string): Overrides the card's flavor for this variant.
  - Constraints: maxLength: 2000, maxGraphemes: 200
- `icon` (blob)
  - Constraints: maxSize: 1000000, accept: image/*
- `iconCid` (string · cid)
- `maxSupply` (integer)
  - Constraints: minimum: 1
- `title` (string)
  - Constraints: maxLength: 128
- `variantId` (string, required): e.g. 'foil', 'signed'.
  - Constraints: maxLength: 64

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "attribute": {
      "properties": {
        "name": {
          "maxLength": 64,
          "type": "string"
        },
        "value": {
          "maxLength": 256,
          "type": "string"
        }
      },
      "required": [
        "name",
        "value"
      ],
      "type": "object"
    },
    "cardDef": {
      "properties": {
        "artists": {
          "description": "Who made the art. A provider's claim; see #credit.",
          "items": {
            "ref": "#credit",
            "type": "ref"
          },
          "maxLength": 8,
          "type": "array"
        },
        "asset": {
          "accept": [
            "image/*"
          ],
          "description": "Canonical full-size art, stored in the provider repo so the PDS retains the blob. assetCid is its fingerprint.",
          "maxSize": 5000000,
          "type": "blob"
        },
        "assetCid": {
          "description": "CID of the canonical full-size art. Owner copies must match.",
          "format": "cid",
          "type": "string"
        },
        "attributes": {
          "description": "Free-form stats or flavor fields (team, position, year...).",
          "items": {
            "ref": "#attribute",
            "type": "ref"
          },
          "type": "array"
        },
        "cardId": {
          "description": "Stable identifier within this set, e.g. 'the_one_ring'.",
          "maxLength": 64,
          "type": "string"
        },
        "description": {
          "maxLength": 2048,
          "type": "string"
        },
        "flavor": {
          "description": "Flavor text shown with the card. Separate from description, which is reserved for rules text.",
          "maxGraphemes": 200,
          "maxLength": 2000,
          "type": "string"
        },
        "icon": {
          "accept": [
            "image/*"
          ],
          "maxSize": 1000000,
          "type": "blob"
        },
        "iconCid": {
          "format": "cid",
          "type": "string"
        },
        "maxSupply": {
          "description": "Hard cap on gives for this cardId across all variants. Omit for unlimited.",
          "minimum": 1,
          "type": "integer"
        },
        "number": {
          "description": "Collector number within the set, printed with the set code (e.g. EXM 001). Explicit so editing the cards array never renumbers cards.",
          "minimum": 1,
          "type": "integer"
        },
        "rarity": {
          "ref": "#rarity",
          "type": "ref"
        },
        "title": {
          "maxLength": 128,
          "type": "string"
        },
        "variants": {
          "description": "Optional finishes (foil, etc). Each may carry its own cap and art.",
          "items": {
            "ref": "#variantDef",
            "type": "ref"
          },
          "type": "array"
        }
      },
      "required": [
        "cardId",
        "title",
        "rarity",
        "asset",
        "assetCid"
      ],
      "type": "object"
    },
    "credit": {
      "description": "Attribution for card art. Give did when the artist has an atproto identity, name otherwise (at least one). Listed by the provider, so it is a claim until the artist confirms it from their own repo.",
      "properties": {
        "did": {
          "format": "did",
          "type": "string"
        },
        "name": {
          "description": "Display name, for artists without a DID or as a fallback.",
          "maxGraphemes": 64,
          "maxLength": 256,
          "type": "string"
        },
        "role": {
          "description": "What they did, when a card has more than one artist.",
          "knownValues": [
            "art",
            "animation",
            "color"
          ],
          "maxLength": 64,
          "type": "string"
        }
      },
      "type": "object"
    },
    "main": {
      "description": "A card set manifest, published by a provider. Declares every card in the set with its rarity, supply cap, and canonical art. Print runs are auditable against this record.",
      "key": "tid",
      "record": {
        "properties": {
          "cards": {
            "items": {
              "ref": "#cardDef",
              "type": "ref"
            },
            "minLength": 1,
            "type": "array"
          },
          "code": {
            "description": "Short set code printed on every card, e.g. 'EXM'. Uppercase letters and digits. A reissue is a new set record with a new code, tied to the original by series.",
            "maxLength": 8,
            "type": "string"
          },
          "createdAt": {
            "format": "datetime",
            "type": "string"
          },
          "description": {
            "maxLength": 2048,
            "type": "string"
          },
          "name": {
            "maxLength": 128,
            "type": "string"
          },
          "packDefs": {
            "items": {
              "ref": "#packDef",
              "type": "ref"
            },
            "type": "array"
          },
          "series": {
            "description": "Optional grouping across sets (e.g. a season or year).",
            "maxLength": 128,
            "type": "string"
          }
        },
        "required": [
          "name",
          "cards",
          "createdAt"
        ],
        "type": "object"
      },
      "type": "record"
    },
    "odds": {
      "properties": {
        "rarity": {
          "ref": "#rarity",
          "type": "ref"
        },
        "variantId": {
          "description": "Weights this variant of cards of this rarity. Omit to weight the base cards.",
          "maxLength": 64,
          "type": "string"
        },
        "weight": {
          "minimum": 1,
          "type": "integer"
        }
      },
      "required": [
        "rarity",
        "weight"
      ],
      "type": "object"
    },
    "packDef": {
      "properties": {
        "asset": {
          "accept": [
            "image/*"
          ],
          "description": "Sealed pack art.",
          "maxSize": 5000000,
          "type": "blob"
        },
        "assetCid": {
          "description": "Sealed pack art.",
          "format": "cid",
          "type": "string"
        },
        "cardCount": {
          "minimum": 1,
          "type": "integer"
        },
        "description": {
          "maxLength": 2048,
          "type": "string"
        },
        "maxSupply": {
          "minimum": 1,
          "type": "integer"
        },
        "odds": {
          "description": "Weights for drawing pack contents, per rarity and optionally per variant. Printings not listed have weight 0. Omit for a uniform draw over base cards.",
          "items": {
            "ref": "#odds",
            "type": "ref"
          },
          "type": "array"
        },
        "packId": {
          "maxLength": 64,
          "type": "string"
        },
        "title": {
          "maxLength": 128,
          "type": "string"
        }
      },
      "required": [
        "packId",
        "title",
        "cardCount"
      ],
      "type": "object"
    },
    "rarity": {
      "knownValues": [
        "common",
        "uncommon",
        "rare",
        "legendary",
        "unique"
      ],
      "type": "string"
    },
    "variantDef": {
      "properties": {
        "artists": {
          "description": "Overrides the card's artists for this variant, e.g. when an animated version has its own animator.",
          "items": {
            "ref": "#credit",
            "type": "ref"
          },
          "maxLength": 8,
          "type": "array"
        },
        "asset": {
          "accept": [
            "image/*"
          ],
          "description": "Overrides the card art for this variant.",
          "maxSize": 5000000,
          "type": "blob"
        },
        "assetCid": {
          "description": "Overrides the card's assetCid for this variant.",
          "format": "cid",
          "type": "string"
        },
        "flavor": {
          "description": "Overrides the card's flavor for this variant.",
          "maxGraphemes": 200,
          "maxLength": 2000,
          "type": "string"
        },
        "icon": {
          "accept": [
            "image/*"
          ],
          "maxSize": 1000000,
          "type": "blob"
        },
        "iconCid": {
          "format": "cid",
          "type": "string"
        },
        "maxSupply": {
          "minimum": 1,
          "type": "integer"
        },
        "title": {
          "maxLength": 128,
          "type": "string"
        },
        "variantId": {
          "description": "e.g. 'foil', 'signed'.",
          "maxLength": 64,
          "type": "string"
        }
      },
      "required": [
        "variantId"
      ],
      "type": "object"
    }
  },
  "id": "dev.malpercio.cards.set",
  "lexicon": 1
}
```
