Switch to deno
This commit is contained in:
105
src/types.ts
105
src/types.ts
@ -9,7 +9,16 @@ export type DominionColor = {
|
||||
|
||||
export type DominionBasicCardType = {
|
||||
typeType: "basic";
|
||||
name: "Action" | "Treasure" | "Victory" | "Reaction" | "Duration" | "Reserve" | "Night" | "Attack" | "Command";
|
||||
name:
|
||||
| "Action"
|
||||
| "Treasure"
|
||||
| "Victory"
|
||||
| "Reaction"
|
||||
| "Duration"
|
||||
| "Reserve"
|
||||
| "Night"
|
||||
| "Attack"
|
||||
| "Command";
|
||||
color: null | DominionColor;
|
||||
};
|
||||
export type DominionBasicLandscapeType = {
|
||||
@ -19,30 +28,34 @@ export type DominionBasicLandscapeType = {
|
||||
};
|
||||
|
||||
export type DominionCardType = DominionBasicCardType | DominionCustomCardType;
|
||||
export type DominionLandscapeType = DominionBasicLandscapeType | DominionCustomLandscapeType;
|
||||
export type DominionLandscapeType =
|
||||
| DominionBasicLandscapeType
|
||||
| DominionCustomLandscapeType;
|
||||
|
||||
export type DominionCard = {
|
||||
orientation: "card";
|
||||
title: string;
|
||||
description: DominionText;
|
||||
types: Array<DominionCardType>;
|
||||
image: string;
|
||||
artist: string;
|
||||
author: string;
|
||||
version: string;
|
||||
price: DominionText;
|
||||
preview?: DominionText;
|
||||
} | {
|
||||
orientation: "landscape";
|
||||
title: string;
|
||||
description: DominionText;
|
||||
types: Array<DominionLandscapeType>;
|
||||
image: string;
|
||||
artist: string;
|
||||
author: string;
|
||||
version: string;
|
||||
price: DominionText;
|
||||
};
|
||||
export type DominionCard =
|
||||
| {
|
||||
orientation: "card";
|
||||
title: string;
|
||||
description: DominionText;
|
||||
types: Array<DominionCardType>;
|
||||
image: string;
|
||||
artist: string;
|
||||
author: string;
|
||||
version: string;
|
||||
price: DominionText;
|
||||
preview?: DominionText;
|
||||
}
|
||||
| {
|
||||
orientation: "landscape";
|
||||
title: string;
|
||||
description: DominionText;
|
||||
types: Array<DominionLandscapeType>;
|
||||
image: string;
|
||||
artist: string;
|
||||
author: string;
|
||||
version: string;
|
||||
price: DominionText;
|
||||
};
|
||||
|
||||
export type DominionCustomSymbol = {
|
||||
image: string;
|
||||
@ -51,12 +64,12 @@ export type DominionCustomSymbol = {
|
||||
export type DominionCustomCardType = {
|
||||
typeType: "custom";
|
||||
name: string;
|
||||
color: DominionColor
|
||||
color: DominionColor;
|
||||
};
|
||||
export type DominionCustomLandscapeType = {
|
||||
typeType: "custom";
|
||||
name: string;
|
||||
color: DominionColor
|
||||
color: DominionColor;
|
||||
};
|
||||
|
||||
export type DominionExpansion = {
|
||||
@ -65,7 +78,7 @@ export type DominionExpansion = {
|
||||
customSymbols: Array<DominionCustomSymbol>;
|
||||
customCardTypes: Array<DominionCustomCardType>;
|
||||
customLandscapeTypes: Array<DominionCustomLandscapeType>;
|
||||
}
|
||||
};
|
||||
|
||||
export const TYPE_ACTION: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
@ -73,8 +86,8 @@ export const TYPE_ACTION: DominionBasicCardType = {
|
||||
color: {
|
||||
value: "white",
|
||||
priority: 6,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const TYPE_TREASURE: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
@ -82,8 +95,8 @@ export const TYPE_TREASURE: DominionBasicCardType = {
|
||||
color: {
|
||||
value: "yellow",
|
||||
priority: 5,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const TYPE_VICTORY: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
@ -91,8 +104,8 @@ export const TYPE_VICTORY: DominionBasicCardType = {
|
||||
color: {
|
||||
value: "green",
|
||||
priority: 4,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const TYPE_REACTION: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
@ -101,8 +114,8 @@ export const TYPE_REACTION: DominionBasicCardType = {
|
||||
value: "blue",
|
||||
priority: 1,
|
||||
overridesAction: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const TYPE_DURATION: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
@ -111,18 +124,18 @@ export const TYPE_DURATION: DominionBasicCardType = {
|
||||
value: "orange",
|
||||
priority: 3,
|
||||
overridesAction: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const TYPE_RESERVE: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
name: "Duration",
|
||||
color: {
|
||||
value: "orange",
|
||||
value: "brown",
|
||||
priority: 2, // unknown whether this should be above or below reaction/duration?
|
||||
overridesAction: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const TYPE_NIGHT: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
@ -131,17 +144,17 @@ export const TYPE_NIGHT: DominionBasicCardType = {
|
||||
value: "black",
|
||||
priority: 6,
|
||||
onConflictDescriptionOnly: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export const TYPE_ATTACK: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
name: "Attack",
|
||||
color: null
|
||||
}
|
||||
color: null,
|
||||
};
|
||||
|
||||
export const TYPE_COMMAND: DominionBasicCardType = {
|
||||
typeType: "basic",
|
||||
name: "Command",
|
||||
color: null
|
||||
}
|
||||
color: null,
|
||||
};
|
||||
|
Reference in New Issue
Block a user