-
Notifications
You must be signed in to change notification settings - Fork 36
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
14 changed files
with
164 additions
and
161 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {Cards} from 'root/models/cards'; | ||
import {Request} from 'root/app/request'; | ||
|
||
export async function getCards(): Promise<Cards> { | ||
const res = await Request.get('/snap/do.php?cmd=getcards', { | ||
url: 'https://static2.marvelsnap.pro/snap/do.php?cmd=getcards', | ||
}); | ||
|
||
return res; | ||
} |
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
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,127 +1,87 @@ | ||
export interface Card { | ||
id: number; | ||
doublelink: number; | ||
cardid: string; | ||
multiverseid: number; | ||
CardDefId: string; | ||
name: string; | ||
slug: string; | ||
kw: string; | ||
flavor: string; | ||
power: number; | ||
market: number; | ||
toughness: number; | ||
expansion: number; | ||
rarity: number; | ||
mana: string; | ||
convmana: number; | ||
text: string; | ||
loyalty: number; | ||
type: number; | ||
subtype: number; | ||
txttype: string; | ||
pict: string; | ||
date_in: number; | ||
colorindicator: string; | ||
mtga_id: number; | ||
is_collectible: number; | ||
reprint: number; | ||
draftrate: number; | ||
drafteval: number; | ||
is_land: number; | ||
colorarr: string; | ||
currentstandard: number; | ||
currenthistoric: number; | ||
art: string; | ||
has_hiresimg: number; | ||
willbeoutsoon: number; | ||
drafteval2: number; | ||
wleval: number; | ||
battleusage: number; | ||
wleval_draft: number; | ||
battleusage_draft: number; | ||
is_boostable: number; | ||
is_craftable: number; | ||
TraditionalStandardBan: number; | ||
TraditionalHistoricBan: number; | ||
StandardBan: number; | ||
HistoricBan: number; | ||
wleval_1sthand: number; | ||
description: string; | ||
abilities: string; | ||
cost: string; | ||
power: string; | ||
category: string; | ||
source: string; | ||
variants: Variant[]; | ||
use_count: string; | ||
connected_cards: string; | ||
is_Token: string; | ||
share_cube_earned: number; | ||
share_cube_lost: number; | ||
share_cube_won: number; | ||
share_loss: number; | ||
share_total: number; | ||
share_win: number; | ||
stats_cuberate: number; | ||
stats_winrate: number; | ||
collectible: string; | ||
stats_cube_lost: string; | ||
stats_cube_won: string; | ||
stats_loss: string; | ||
stats_win: string; | ||
stats_position: string; | ||
PrimaryColor: string; | ||
RingColor: string; | ||
SecondaryColor: string; | ||
stats_winrate_played: string; | ||
stats_cuberate_played: string; | ||
CardSeriesDefId: string; | ||
SeriesStartDates: string; | ||
} | ||
|
||
export interface Cardnfo { | ||
battleusage: number; | ||
battleusage_draft: number; | ||
drafteval2: number; | ||
id: number; | ||
market: number; | ||
mtga_id: number; | ||
reprints: number[]; | ||
wleval: number; | ||
wleval_draft: number; | ||
export interface Variant { | ||
id: string; | ||
source: string; | ||
category: string; | ||
credits?: string; | ||
released?: string; | ||
possession?: string | null; | ||
usage_count?: string | null; | ||
ReleaseDate?: string; | ||
wasAddedIn?: string; | ||
} | ||
|
||
export interface Expcount { | ||
cardcount: number; | ||
rar_1: number; | ||
rar_2: number; | ||
rar_3: number; | ||
rar_4: number; | ||
} | ||
|
||
export interface CardFilterResult { | ||
data: Cardnfo[]; | ||
maxdrafteval2: number; | ||
maxprice: number; | ||
maxusage: number; | ||
minusage: number; | ||
maxusagedraft: number; | ||
minusagedraft: number; | ||
maxwleval: number; | ||
maxwleval_draft: number; | ||
mindrafteval2: number; | ||
minwleval: number; | ||
minwleval_draft: number; | ||
} | ||
export type Cards = Record<string, Card>; | ||
|
||
export interface CardRequestFilters { | ||
color: string[]; | ||
expansion: string; | ||
mana: string; | ||
type: string; | ||
subtype: string; | ||
export interface Location { | ||
CardDefId: string; | ||
abilities: string; | ||
description: string; | ||
difficulty: string; | ||
name: string; | ||
rarity: string; | ||
rulings: string; | ||
srt: string; | ||
direct: string; | ||
smrtsrhc: string; | ||
collection?: string; | ||
booster: string; | ||
TraditionalStandardBan: string; | ||
TraditionalHistoricBan: string; | ||
StandardBan: string; | ||
HistoricBan: string; | ||
tip: string; | ||
released: string; | ||
} | ||
|
||
export interface CardFilterReq { | ||
direct: number; | ||
filter: {[index: string]: string[] | number[]}; | ||
lib: number; | ||
limit: number; | ||
page: number; | ||
srt: number; | ||
} | ||
export type Locations = Record<string, Location>; | ||
|
||
export interface CardPriceData { | ||
date: string; | ||
bid: number; | ||
ask: number; | ||
market: number; | ||
} | ||
export type VariantFiltersStrings = 'status' | 'srt' | 'direct' | 'rarity' | 'category' | 'smrtsrhc' | 'clearfilters'; | ||
|
||
export type CardFiltersStrings = | ||
| 'cost' | ||
| 'power' | ||
| 'pool' | ||
| 'srt' | ||
| 'direct' | ||
| 'smrtsrhc' | ||
| 'clearfilters' | ||
| 'usecount' | ||
| 'collection' | ||
| 'dataToShow' | ||
| 'releaseStatus' | ||
| 'tokenStatus'; | ||
|
||
export type LocationFiltersStrings = 'smrtsrhc' | 'released' | 'rarity' | 'difficulty' | 'clearfilters'; | ||
|
||
export interface CardPlayed { | ||
grpId: number; | ||
instanceId: number; | ||
ownerSeatId: number; | ||
visibility: string; | ||
zoneId: number; | ||
export interface CardBack { | ||
CardBackDefId: string; | ||
Name: string; | ||
Enabled: string; | ||
source: string; | ||
} |
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
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,13 +1,18 @@ | ||
import {currentMatch, overlayConfig} from 'root/windows/overlay/overlay'; | ||
|
||
export function makeCard(cardDefId: string, side: boolean, rarity?: string, variant?: string): string { | ||
const today = new Date(); | ||
const yyyy = today.getFullYear(); | ||
const mm = today.getMonth() + 1; // Months start at 0! | ||
const dd = today.getDate(); | ||
const formattedToday = dd + '-' + mm + '-' + yyyy; | ||
return ` | ||
<div class="DcDrow CardMainWrapper" data-cid="${cardDefId}" data-side="${ | ||
side ? 'me' : 'opp' | ||
}" id="card${cardDefId}${side ? 'me' : 'opp'}" style="width: 80px; height:104px;"> | ||
side ? 'me' : 'opp' | ||
}" id="card${cardDefId}${side ? 'me' : 'opp'}" style="width: 80px; height:104px;"> | ||
<div class="CardPicRenderer" style="width: 80px; height:104px; background-image: url('https://static.marvelsnap.pro/cards/${ | ||
variant !== undefined && variant !== '' ? variant : cardDefId | ||
}${rarity && rarity != '' && rarity !== 'Common' ? `-${rarity.toLowerCase()}` : ''}.webp')"></div> | ||
}${ | ||
rarity && rarity != '' && rarity !== 'Common' ? `-${rarity.toLowerCase()}` : '' | ||
}.webp?anticache=${formattedToday}')"></div> | ||
</div> | ||
`; | ||
} |
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.