-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
1,746 additions
and
1,383 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"jsxSingleQuote": true | ||
"jsxSingleQuote": true, | ||
"semi": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { ReefClientConfig, Stage } from '.'; | ||
import { ReefClientConfig, Stage } from '.' | ||
|
||
const config: ReefClientConfig = { | ||
stage: Stage.Dev, | ||
apiUrl: 'http://127.0.0.1:1337', | ||
}; | ||
} | ||
|
||
export default config; | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { ReefClientConfig, Stage } from '.'; | ||
import { ReefClientConfig, Stage } from '.' | ||
|
||
const config: ReefClientConfig = { | ||
stage: Stage.Prod, | ||
apiUrl: 'http://api.reef.sosk.watch', | ||
}; | ||
} | ||
|
||
export default config; | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ module.exports = { | |
transform: { | ||
'tsx?$': ['@swc/jest'], | ||
}, | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,92 @@ | ||
import {Card} from "scryfall-sdk"; | ||
import {ObjectValues} from "../types"; | ||
import { Card } from 'scryfall-sdk' | ||
import { ObjectValues } from '../types' | ||
|
||
export const DOUBLE_FACED_LAYOUTS = ['transform', 'modal_dfc', 'meld', 'double_sided', 'double_faced_token'] | ||
export const DOUBLE_FACED_LAYOUTS = [ | ||
'transform', | ||
'modal_dfc', | ||
'meld', | ||
'double_sided', | ||
'double_faced_token', | ||
] | ||
|
||
export const BASIC_LAND_TYPES = ['plains', 'island', 'swamp', 'mountain', 'forest'] | ||
export const BASIC_LAND_TYPES = [ | ||
'plains', | ||
'island', | ||
'swamp', | ||
'mountain', | ||
'forest', | ||
] | ||
|
||
export const SHOCKLAND_REGEX = /As .* enters the battlefield, you may pay 2 life. If you don't, it enters the battlefield tapped\./ | ||
export const SHOCKLAND_REGEX = | ||
/As .* enters the battlefield, you may pay 2 life. If you don't, it enters the battlefield tapped\./ | ||
|
||
export const isValues = { | ||
gold: "gold" , | ||
hybrid: "hybrid" , | ||
phyrexian: "phyrexian" , | ||
promo: "promo" , | ||
reprint: "reprint" , | ||
firstprint: "firstprint" , | ||
firstprinting: "firstprinting" , | ||
digital: "digital" , | ||
dfc: "dfc" , | ||
mdfc: "mdfc" , | ||
tdfc: "tdfc" , | ||
meld: "meld", | ||
transform: "transform" , | ||
split: "split" , | ||
flip: "flip" , | ||
leveler: "leveler" , | ||
commander: "commander" , | ||
spell: "spell" , | ||
permanent: "permanent" , | ||
historic: "historic" , | ||
vanilla: "vanilla" , | ||
modal: "modal" , | ||
fullart: "fullart" , | ||
foil: "foil" , | ||
nonfoil: "nonfoil" , | ||
etched: "etched" , | ||
bikeland: "bikeland" , | ||
cycleland: "cycleland" , | ||
bicycleland: "bicycleland" , | ||
bounceland: "bounceland" , | ||
karoo: "karoo" , | ||
canopyland: "canopyland" , | ||
canland: "canland" , | ||
fetchland: "fetchland" , | ||
checkland: "checkland" , | ||
dual: "dual" , | ||
fastland: "fastland" , | ||
filterland: "filterland" , | ||
gainland: "gainland" , | ||
painland: "painland" , | ||
scryland: "scryland" , | ||
shadowland: "shadowland" , | ||
snarl: "snarl" , | ||
slowland: "slowland" , | ||
shockland: "shockland" , | ||
storageland: "storageland" , | ||
creatureland: "creatureland" , | ||
manland: "manland" , | ||
triland: "triland" , | ||
triome: "triome" , | ||
tangoland: "tangoland" , | ||
battleland: "battleland" | ||
gold: 'gold', | ||
hybrid: 'hybrid', | ||
phyrexian: 'phyrexian', | ||
promo: 'promo', | ||
reprint: 'reprint', | ||
firstprint: 'firstprint', | ||
firstprinting: 'firstprinting', | ||
digital: 'digital', | ||
dfc: 'dfc', | ||
mdfc: 'mdfc', | ||
tdfc: 'tdfc', | ||
meld: 'meld', | ||
transform: 'transform', | ||
split: 'split', | ||
flip: 'flip', | ||
leveler: 'leveler', | ||
commander: 'commander', | ||
spell: 'spell', | ||
permanent: 'permanent', | ||
historic: 'historic', | ||
vanilla: 'vanilla', | ||
modal: 'modal', | ||
fullart: 'fullart', | ||
foil: 'foil', | ||
nonfoil: 'nonfoil', | ||
etched: 'etched', | ||
bikeland: 'bikeland', | ||
cycleland: 'cycleland', | ||
bicycleland: 'bicycleland', | ||
bounceland: 'bounceland', | ||
karoo: 'karoo', | ||
canopyland: 'canopyland', | ||
canland: 'canland', | ||
fetchland: 'fetchland', | ||
checkland: 'checkland', | ||
dual: 'dual', | ||
fastland: 'fastland', | ||
filterland: 'filterland', | ||
gainland: 'gainland', | ||
painland: 'painland', | ||
scryland: 'scryland', | ||
shadowland: 'shadowland', | ||
snarl: 'snarl', | ||
slowland: 'slowland', | ||
shockland: 'shockland', | ||
storageland: 'storageland', | ||
creatureland: 'creatureland', | ||
manland: 'manland', | ||
triland: 'triland', | ||
triome: 'triome', | ||
tangoland: 'tangoland', | ||
battleland: 'battleland', | ||
} as const | ||
export type IsValue = ObjectValues<typeof isValues> | ||
|
||
export const isDual = (card: Card) => | ||
card.type_line.includes("Land") && | ||
/Add \{.} or \{.}\./.test(card.oracle_text) | ||
card.type_line.includes('Land') && /Add \{.} or \{.}\./.test(card.oracle_text) | ||
export const hasNumLandTypes = (card: Card, num: number) => | ||
BASIC_LAND_TYPES.filter(type => card.type_line.toLowerCase().includes(type)).length === num | ||
BASIC_LAND_TYPES.filter((type) => card.type_line.toLowerCase().includes(type)) | ||
.length === num | ||
|
||
export const oracleTextContains = (card: Card, value: string): boolean => | ||
card.oracle_text.toLowerCase().includes(value) || | ||
card.card_faces.filter((face) => face.oracle_text.toLowerCase().includes(value)).length > 0 | ||
card.oracle_text.toLowerCase().includes(value) || | ||
card.card_faces.filter((face) => | ||
face.oracle_text.toLowerCase().includes(value) | ||
).length > 0 | ||
|
||
export const noReminderText = (text: string): string => | ||
text.replace(/\(.*\)/, "") | ||
text.replace(/\(.*\)/, '') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.