This is a tiny web game for Magic: The Gathering fans, powered by the Scryfall API. Play alone, or challenge your friends!
TODO: soon I'll try to publish this game as an app on the Google Play Store!
- Click the "Generate a random card" button to reveal a random Magic card matching a secret Scryfall search.
- Try to guess the search criteria based on the cards you see.
- You can switch between English and French using the language toggle at the bottom.
- When you're ready, reveal the solution to see if you guessed correctly (at the end of the page)!
- Random card generation from a hidden Scryfall search, updated every week (if I think about it).
- Bilingual interface with a button to swap languages (English π¬π§ and French π«π·).
- Responsive and simple design.
- Not affiliated with Scryfall or Wizards of the Coast β just for fun!
If you'd like to change the Scryfall search used by the game (for example to set a new "search of the week"), simply edit the JavaScript constant in index.html:
- Open
index.htmland look for the JS configuration section. Find the constantSCRYFALL_SEARCH_QUERY(current example:t=cleric id=boros game=paper). - Replace the string with the Scryfall query you want to use. The script will URL-encode the query automatically.
Example, to search for green 2/2 bear creatures with converted mana cost 2:
// in index.html
const SCRYFALL_SEARCH_QUERY = 't=creature t=bear color=green cmc=2 power=2 toughness=2';Notes:
- Use the Scryfall search syntax, to build advanced filters.
- The configuration is client-side: anyone viewing the page source can read the query. If you want to keep the query truly secret, do not publish it in
index.html(or remove the<details>"Solution" block that reveals the search explicitly). - The script automatically appends
unique=cards&as=grid&order=nameand performs URL-encoding, so only provide theq=part in plain text.
Enjoy the challenge, and see how quickly you can deduce the weekly query I used!
In its traditional mode: I edit the request every Sunday!
I'm working on a different mode of this game, where it could be used without the need of a manual modification every week or so. It's a prototype right now, but you can test it!
In the new "random mode": the request is randomly generated by a JavaScript code, with a new request every time the page is reloaded and displayed on your device.
MIT License (file LICENSE). Β© Lilian Besson, 2025.
