👁️
5
fork

Configure Feed

Select the types of activity you want to include in your feed.

update for SOS

+15 -12
+1
.gitignore
··· 14 14 # Scryfall data (downloaded during build) 15 15 public/data/ 16 16 public/symbols/ 17 + public/fonts/keyrune/ 17 18 src/lib/card-manifest.ts 18 19 src/lib/set-symbols.ts 19 20 .cache/
public/fonts/keyrune/keyrune.woff2

This is a binary file and will not be displayed.

+1
src/lib/search/describe.ts
··· 135 135 leveler: "level up cards", 136 136 saga: "sagas", 137 137 adventure: "adventure cards", 138 + prepared: "cards with a prepared spell", 138 139 battle: "battles", 139 140 prototype: "prototype cards", 140 141 token: "tokens",
+2
src/lib/search/fields.ts
··· 726 726 leveler: (card) => card.layout === "leveler", 727 727 saga: (card) => card.layout === "saga", 728 728 adventure: (card) => card.layout === "adventure", 729 + prepared: (card) => card.layout === "prepare", 729 730 battle: (card) => card.layout === "battle", 730 731 prototype: (card) => card.layout === "prototype", 731 732 token: (card) => card.layout === "token", ··· 1075 1076 creatureland: "manland", 1076 1077 fullart: "full", 1077 1078 pdhcommander: "paupercommander", 1079 + prepare: "prepared", 1078 1080 }; 1079 1081 1080 1082 /**
+4 -4
src/workers/__tests__/cards.worker.test.ts
··· 21 21 22 22 describe("restrictions", () => { 23 23 it("applies format legality restriction", () => { 24 - // Search for a card that's banned in some formats 24 + // Time Walk is restricted in vintage (legal) but not in standard 25 25 const results = worker.searchCards( 26 - "ancestral recall", 26 + "time walk", 27 27 { format: "vintage" }, 28 28 10, 29 29 ); 30 30 expect(results.length).toBeGreaterThan(0); 31 31 32 - // Should not find it in standard (banned) 32 + // Should not find it in standard 33 33 const standardResults = worker.searchCards( 34 - "ancestral recall", 34 + "time walk", 35 35 { format: "standard" }, 36 36 10, 37 37 );
+7 -8
src/workers/__tests__/syntax-search.test.ts
··· 197 197 198 198 describe("deduplication", () => { 199 199 it("returns one result per oracle_id", () => { 200 - // Lightning Bolt has many printings across sets 201 - const result = worker.syntaxSearch('!"Lightning Bolt"', 100); 200 + // Ponder has many printings across sets but only one oracle_id 201 + const result = worker.syntaxSearch('!"Ponder"', 100); 202 202 expect(result.ok).toBe(true); 203 203 if (result.ok) { 204 - // Should only have one result despite many printings 205 204 expect(result.cards.length).toBe(1); 206 - expect(result.cards[0].name).toBe("Lightning Bolt"); 205 + expect(result.cards[0].name).toBe("Ponder"); 207 206 } 208 207 }); 209 208 ··· 611 610 } 612 611 }); 613 612 614 - it("is:gainland returns exactly 15 cards (two cycles)", () => { 613 + it("is:gainland returns at least 15 cards (two cycles)", () => { 615 614 const result = worker.syntaxSearch("is:gainland", 100); 616 615 expect(result.ok).toBe(true); 617 616 if (result.ok) { 618 - expect(result.cards.length).toBe(15); 617 + expect(result.cards.length).toBeGreaterThanOrEqual(15); 619 618 for (const card of result.cards) { 620 619 expect(card.type_line).toContain("Land"); 621 620 expect(card.oracle_text).toMatch(/gain 1 life/i); ··· 623 622 } 624 623 }); 625 624 626 - it("is:tangoland returns exactly 8 cards", () => { 625 + it("is:tangoland returns at least 8 cards", () => { 627 626 const result = worker.syntaxSearch("is:tangoland", 100); 628 627 expect(result.ok).toBe(true); 629 628 if (result.ok) { 630 - expect(result.cards.length).toBe(8); 629 + expect(result.cards.length).toBeGreaterThanOrEqual(8); 631 630 for (const card of result.cards) { 632 631 expect(card.type_line).toContain("Land"); 633 632 expect(card.oracle_text).toMatch(/two or more basic/i);