puerto-rico/engine/catalog.js

150 lines
3.3 KiB
JavaScript

export const GOODS = ["corn", "fruit", "sugar", "tobacco", "coffee"];
export const ESTATES = {
corn: 10,
fruit: 12,
sugar: 11,
tobacco: 9,
coffee: 8,
};
export const CRATES = { corn: 10, fruit: 11, sugar: 11, tobacco: 9, coffee: 9 };
export const ROLES = [
"planter",
"recruiter",
"builder",
"craftsman",
"trader",
"captain",
];
// Cost, printed points, worker capacity, copies; expanded buildings use two city spaces.
const rows = [
["smallFruit", 1, 1, 1, 4, "fruit"],
["smallSugar", 2, 1, 1, 4, "sugar"],
["largeFruit", 3, 2, 3, 3, "fruit"],
["largeSugar", 4, 2, 3, 3, "sugar"],
["tobaccoStorage", 5, 3, 3, 3, "tobacco"],
["coffeeRoaster", 6, 3, 2, 3, "coffee"],
["smallMarket", 1, 1],
["buildersYard", 2, 1],
["hacienda", 2, 1],
["smallWarehouse", 3, 1],
["hospital", 4, 2],
["office", 5, 2],
["largeMarket", 5, 2],
["largeWarehouse", 6, 2],
["factory", 7, 3],
["school", 8, 3],
["harbor", 8, 3],
["wharf", 9, 3],
["fireStation", 10, 4],
["residence", 10, 4],
["fortress", 10, 4],
["customsHouse", 10, 4],
["cityHall", 10, 4],
["canal", 1, 1],
["lumberyard", 2, 1],
["hiddenMarket", 2, 1],
["storehouse", 3, 1],
["bohio", 4, 2, 2],
["merchantOutpost", 5, 2],
["church", 5, 2],
["smallWharf", 6, 2],
["lighthouse", 7, 3],
["distillery", 8, 3],
["publishingHouse", 8, 3],
["assemblyHall", 9, 3],
["monument", 10, 8],
["cathedral", 10, 4],
["zoningOffice", 2, 1],
["chapel", 3, 1],
["parkAuthority", 4, 2],
["notary", 5, 2],
["pensionOffice", 6, 2],
["villa", 7, 3],
["tailorShop", 8, 3, 1, 2, "tailor"],
["townSquare", 10, 4],
];
export const BUILDINGS = Object.fromEntries(
rows.map(([id, cost, vp, workers = 1, copies, good], i) => [
id,
{
id,
cost,
vp,
workers,
copies: copies ?? (cost === 10 ? 1 : 2),
good: good ?? null,
size: cost === 10 ? 2 : 1,
expansion: i < 23 ? "base" : i < 37 ? "new-buildings" : "citizens",
},
]),
);
export const MARKET_SLOTS = {
1: 1,
2: 2,
3: 1,
4: 1,
5: 2,
6: 1,
7: 1,
8: 2,
9: 1,
10: 5,
};
export const EXPANSIONS = [
"new-buildings",
"citizens",
"smuggler",
"festival",
"festival-cards",
"achievements",
];
export const FESTIVALS = [
{
id: "weightOff",
goods: 1,
goal: "produce",
amount: 3,
reward: { workers: 1, coins: 1, vp: 1 },
},
{
id: "cocktail",
goods: 3,
goal: "produce",
amount: 1,
reward: { coins: 3 },
},
{ id: "closingShops", goods: 1, goal: "tradeFull", reward: { workers: 2 } },
{
id: "connoisseur",
estates: 1,
goal: "estates",
amount: 3,
reward: { workers: 3 },
},
{
id: "farming",
estates: 2,
goods: 2,
goal: "farmProduce",
amount: 1,
reward: { coins: 3 },
},
{
id: "delivery",
goods: 2,
goal: "ship",
amounts: [1, 2],
reward: { workers: 2, vp: 2 },
},
{ id: "twins", estates: 2, goal: "estates", amount: 2, reward: { vp: 3 } },
{ id: "baskets", goods: 2, goal: "produce", amount: 2, reward: { coins: 3 } },
{ id: "grandSendoff", goods: 1, goal: "dispatchBig", reward: { workers: 3 } },
{ id: "pioneer", building: 3, goal: "build", reward: { vp: 3 } },
{ id: "patron", building: 4, goal: "build", reward: { vp: 3 } },
{
id: "traditionalSendoff",
goods: 1,
goal: "dispatchSmall",
reward: { coins: 2 },
},
];