mtg-calculator
Version:
an MtG calculator for computing the probability of being able to draw and play cards from a deck
102 lines • 2.38 kB
TypeScript
/**
* @ScryfallType
*/
export interface PartialScryfallCard {
name: string;
type_line?: string;
oracle_text?: string;
mana_cost?: string;
produced_mana?: string[];
card_faces?: CardFace[];
quantity?: number;
[key: string]: any;
}
export interface CardFace {
name?: string;
type_line?: string;
oracle_text?: string;
mana_cost?: string;
}
/**
* @AlgoOutputs
*/
export type Probability = string;
export declare enum ProbabilityTypes {
independent = "independent",
conditionalTargetDrawn = "conditionalTargetDrawn",
conditionalEnoughLand = "conditionalEnoughLand"
}
export type ProbabilitiesOnGivenTurn = {
[key in ProbabilityTypes]: Probability;
};
export type AlgoResult = ProbabilitiesOnGivenTurn[];
export type Calculations = {
calculations: ProbabilitiesOnGivenTurn[];
simulated: boolean;
};
/**
* @AlgoInputs
*/
export type AlgoOptions = {
maxComplexity?: number;
upToTurn?: number;
simulationOptions?: {
iterations?: number;
};
};
export declare enum CardType {
Nonland = "Nonland",
Land = "Land"
}
export type Card = {
name: string;
mana_cost: string;
types: string;
type: CardType;
producible_mana_colors: string;
tap_land: boolean;
quantity: number;
};
export type Deck = Card[];
export type DeckLookup = {
[deckname: string]: Deck;
};
export type DeckBins = {
[mana_types: string]: number;
} | {};
export type CostBins = {
[mana_type: string]: number;
} | {};
export type TapBins = {
[mana_types: string]: number;
} | {};
export type RelevantBinsMap = {
[mana_type: string]: number[];
} | {};
export type RelevantBinsReverseMap = {
[mana_types: string]: number[];
} | {};
export type DeckInfo = {
targetCardCount: number;
landCount: number;
} | {};
export type PreprocessedAlgoInput = {
deckBins: DeckBins;
costBins: CostBins;
tapBins: TapBins;
relevantBinsMap: RelevantBinsMap;
relevantBinsReverseMap: RelevantBinsReverseMap;
deckInfo: DeckInfo;
totalDraws?: number;
};
export type AlgoInput = {
deckBins: DeckBins;
costBins: CostBins;
tapBins: TapBins;
relevantBinsMap: RelevantBinsMap;
relevantBinsReverseMap: RelevantBinsReverseMap;
deckInfo: DeckInfo;
totalDraws: number;
};
export type AlgoInputsHash = string;
//# sourceMappingURL=types.d.ts.map