mantimon-tcg/backend/data/raw/a1/209-porygon.json
Cal Corum 934aa4c443 Add CardService and card data conversion pipeline
- Rename data/cards/ to data/raw/ for scraped data
- Add data/definitions/ as authoritative card data source
- Add convert_cards.py script to transform raw -> definitions
- Generate 378 card definitions (344 Pokemon, 24 Trainers, 10 Energy)
- Add CardService for loading and querying card definitions
  - In-memory indexes for fast lookups by type, set, pokemon_type
  - search() with multiple filter criteria
  - get_all_cards() for GameEngine integration
- Add SetInfo model for set metadata
- Update Attack model with damage_display field for variable damage
- Update CardDefinition with image_path, illustrator, flavor_text
- Add 45 tests (21 converter + 24 CardService)
- Update scraper output path to data/raw/

Card data is JSON-authoritative (no database) to support offline fork goal.
2026-01-27 14:16:40 -06:00

44 lines
1015 B
JSON

{
"id": "a1-209-porygon",
"name": "Porygon",
"set_code": "a1",
"set_name": "Genetic Apex",
"card_number": 209,
"rarity": "Uncommon",
"card_type": "pokemon",
"image_url": "https://assets.pokemon-zone.com/game-assets/CardPreviews/cPK_10_002070_00_PORYGON_U.webp",
"image_file": null,
"source_url": "https://www.pokemon-zone.com/cards/a1/209/porygon/",
"hp": 50,
"pokemon_type": "colorless",
"stage": "basic",
"evolves_from": null,
"is_ex": false,
"abilities": [
{
"name": "Data Scan",
"effect_text": "Once during your turn, you may look at the top card of your deck.",
"effect_id": null
}
],
"attacks": [
{
"name": "Sharpen",
"cost": [
"colorless"
],
"damage": 20,
"damage_modifier": null,
"effect_text": null,
"effect_id": null
}
],
"weakness": {
"type": "fighting",
"value": 20
},
"resistance": null,
"retreat_cost": 1,
"flavor_text": null,
"illustrator": "Ayaka Yoshida"
}