Show action rewards, simplify bonus choices and teach round flow
This commit is contained in:
parent
7b94489836
commit
8b798b4a9f
43 changed files with 524 additions and 82 deletions
|
|
@ -73,7 +73,7 @@
|
|||
"chapters": [
|
||||
{
|
||||
"id": "basics",
|
||||
"version": 1,
|
||||
"version": 2,
|
||||
"title": "Roles, production and trade",
|
||||
"description": "Choose a role, produce goods and sell them. See how unchosen roles gain coins."
|
||||
},
|
||||
|
|
|
|||
|
|
@ -615,12 +615,12 @@ function matched(values, have, amount = 1, amounts = null) {
|
|||
need[values[i]] = (need[values[i]] ?? 0) + (amounts?.[i] ?? amount);
|
||||
return Object.entries(need).every(([k, v]) => (have[k] ?? 0) >= v);
|
||||
}
|
||||
function checkFestival(s, p, e) {
|
||||
export function completedFestivals(s, p, e) {
|
||||
const a = s.players[p],
|
||||
est = {};
|
||||
for (const t of a.estates) est[t.id] = (est[t.id] ?? 0) + 1;
|
||||
for (const f of s.festivals) {
|
||||
if (f.claimed !== undefined) continue;
|
||||
return s.festivals.filter((f) => {
|
||||
if (f.claimed !== undefined) return false;
|
||||
const t = f.targets;
|
||||
let ok = false;
|
||||
if (f.goal === "estates") ok = matched(t.estates, est, f.amount);
|
||||
|
|
@ -645,7 +645,13 @@ function checkFestival(s, p, e) {
|
|||
(f.goal === "dispatchBig"
|
||||
? Math.max(...s.ships.map((x) => x.capacity))
|
||||
: Math.min(...s.ships.map((x) => x.capacity)));
|
||||
if (!ok) continue;
|
||||
return ok;
|
||||
});
|
||||
}
|
||||
function checkFestival(s, p, e) {
|
||||
const a = s.players[p];
|
||||
for (const f of completedFestivals(s, p, e)) {
|
||||
const t = f.targets;
|
||||
f.claimed = p;
|
||||
for (const g of t.goods) s.supply[g]++;
|
||||
s.bag.push(...t.estates);
|
||||
|
|
@ -1450,12 +1456,14 @@ function applyMove(state, m, p, historical = false) {
|
|||
new Set(m.decline).size === m.decline.length &&
|
||||
m.decline.every((id) => optionalPoints(s, p, m).includes(id)),
|
||||
);
|
||||
} else assert(
|
||||
legal(s, p).some((x) => sameMove(x, m)) ||
|
||||
// Preserve already-recorded payments from before mandatory quarry discounts.
|
||||
(historical && t.kind === "build" &&
|
||||
buildOptions(s, p, true).some((x) => sameMove(x, m))),
|
||||
);
|
||||
} else
|
||||
assert(
|
||||
legal(s, p).some((x) => sameMove(x, m)) ||
|
||||
// Preserve already-recorded payments from before mandatory quarry discounts.
|
||||
(historical &&
|
||||
t.kind === "build" &&
|
||||
buildOptions(s, p, true).some((x) => sameMove(x, m))),
|
||||
);
|
||||
if (m.target)
|
||||
extra.targetId =
|
||||
m.target === "reserve" ? "reserve" : tileRef(a, m.target).id;
|
||||
|
|
@ -1995,7 +2003,8 @@ export function replay(s, options = {}) {
|
|||
assert(integer(to) && to >= 1 && to <= logLength(s));
|
||||
const c = s.config;
|
||||
let r = init(c.n, c.expansions, c.options, c.seed);
|
||||
for (const h of s.history.slice(0, to - 1)) r = applyMove(r, h.move, h.p, true);
|
||||
for (const h of s.history.slice(0, to - 1))
|
||||
r = applyMove(r, h.move, h.p, true);
|
||||
r.players.forEach((p, i) => {
|
||||
p.name = s.players[i].name;
|
||||
p.bot = s.players[i].bot;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@boardgamers/puerto-rico",
|
||||
"version": "0.3.4",
|
||||
"version": "0.3.5",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"description": "Puerto Rico 1897 Special Edition for Boardgamers Space",
|
||||
|
|
|
|||
96
test/action-bonuses.test.js
Normal file
96
test/action-bonuses.test.js
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import * as E from "../engine/index.js";
|
||||
import { actionVictoryPoints } from "../viewer/action-bonuses.js";
|
||||
import { RELEASE } from "../release-config.js";
|
||||
|
||||
function fixture(role) {
|
||||
let s = E.init(
|
||||
3,
|
||||
RELEASE.expansions,
|
||||
{ ...RELEASE.options, chooseBuildings: false },
|
||||
"action-rewards",
|
||||
);
|
||||
while (s.tasks[0].kind !== "role") s = E.moveAI(s);
|
||||
s = E.move(s, { type: "role", id: role }, E.currentPlayer(s));
|
||||
s.festivals = [];
|
||||
s.players.forEach((p) => {
|
||||
p.achievements = [];
|
||||
});
|
||||
return s;
|
||||
}
|
||||
function verify(s, move) {
|
||||
const preview = actionVictoryPoints(s, 0, move);
|
||||
const after = E.move(s, move, 0);
|
||||
assert.equal(preview, after.players[0].vp - s.players[0].vp);
|
||||
return after;
|
||||
}
|
||||
test("shipping previews match engine totals, including first-shipment privileges and private ships", () => {
|
||||
const s = fixture("captain");
|
||||
s.tasks = [{ kind: "ship", p: 0 }];
|
||||
s.players[0].goods.corn = 5;
|
||||
s.players[0].buildings = [
|
||||
"harbor",
|
||||
"publishingHouse",
|
||||
"wharf",
|
||||
"smallWharf",
|
||||
].map((id) => ({ id, w: 1, c: 0 }));
|
||||
s.ships[0].good = "corn";
|
||||
s.ships[0].amount = 1;
|
||||
verify(s, { type: "ship", ship: 0, good: "corn" });
|
||||
verify(s, { type: "ship", ship: "wharf", good: "corn" });
|
||||
const goods = { ...s.players[0].goods, corn: 3 };
|
||||
verify(s, { type: "smallWharf", goods });
|
||||
s.captainBonus = true;
|
||||
verify(s, { type: "ship", ship: 0, good: "corn" });
|
||||
});
|
||||
test("plunder awards VP and returns goods to supply without adding them to the player", () => {
|
||||
const s = fixture("smuggler");
|
||||
s.trade = ["corn", "coffee", "fruit"];
|
||||
const after = verify(s, { type: "plunder" });
|
||||
assert.deepEqual(after.players[0].goods, s.players[0].goods);
|
||||
for (const good of s.trade)
|
||||
assert.equal(after.supply[good], s.supply[good] + 1);
|
||||
assert.deepEqual(after.trade, []);
|
||||
});
|
||||
test("Chapel preview covers both production and passing", () => {
|
||||
const s = fixture("craftsman");
|
||||
s.players[0].estates = [{ id: "corn", w: 1, c: 0 }];
|
||||
s.players[0].buildings = [{ id: "chapel", w: 0, c: 1 }];
|
||||
const move = E.legal(s).find((m) => m.type === "produce" && !m.decline);
|
||||
verify(s, move);
|
||||
verify(s, { type: "pass" });
|
||||
});
|
||||
test("Church, Pension Office, Park Authority and Assembly Hall show their immediate points", () => {
|
||||
const s = fixture("builder");
|
||||
s.players[0].coins = 20;
|
||||
s.players[0].buildings = [{ id: "church", w: 1, c: 0 }];
|
||||
s.market.cityHall = 1;
|
||||
verify(s, { type: "build", id: "cityHall" });
|
||||
s.tasks = [{ kind: "park", p: 0 }];
|
||||
s.players[0].buildings.push({ id: "parkAuthority", w: 0, c: 1 });
|
||||
s.players[0].estates = [];
|
||||
verify(s, { type: "parkReward" });
|
||||
s.tasks = [{ kind: "assembly", p: 0 }];
|
||||
s.players[0].goods = { corn: 3, fruit: 4, sugar: 1, tobacco: 0, coffee: 2 };
|
||||
verify(s, { type: "assembly" });
|
||||
s.tasks = [{ kind: "pension", p: 0, used: [], remaining: 1 }];
|
||||
verify(s, { type: "pension", good: "corn" });
|
||||
});
|
||||
test("action previews include Festival VP earned by production, shipping and plantations", () => {
|
||||
const festival = (goal, targets) => ({ id: "twins", goal, targets: { goods: [], estates: [], ...targets }, reward: { vp: 3 }, amount: 1 });
|
||||
const produced = fixture("craftsman");
|
||||
produced.players[0].estates = [{ id: "corn", w: 1, c: 0 }];
|
||||
produced.festivals = [festival("produce", { goods: ["corn"] })];
|
||||
verify(produced, E.legal(produced).find((m) => m.type === "produce" && !m.decline));
|
||||
const shipped = fixture("captain");
|
||||
shipped.tasks = [{ kind: "ship", p: 0 }];
|
||||
shipped.players[0].goods.corn = 2;
|
||||
shipped.festivals = [festival("ship", { goods: ["corn"] })];
|
||||
verify(shipped, { type: "ship", good: "corn", ship: 0 });
|
||||
const planted = fixture("planter");
|
||||
planted.players[0].estates = [];
|
||||
planted.offer = ["fruit"];
|
||||
planted.festivals = [festival("estates", { estates: ["fruit"] })];
|
||||
verify(planted, { type: "plant", id: "fruit" });
|
||||
});
|
||||
|
|
@ -367,12 +367,17 @@ try {
|
|||
);
|
||||
assert.equal(await overflow(), false, `No page overflow at ${width}`);
|
||||
await page.locator(".action-dock [data-actions]").click();
|
||||
assert.ok(await page.locator(".role-picker .role").count() > 0);
|
||||
assert.ok(await page.locator(".role-choice-warning").count() > 0);
|
||||
assert.equal(await page.locator(".recruitment-shares > span").count(), original.players.length);
|
||||
assert.ok((await page.locator(".role-picker .role").count()) > 0);
|
||||
assert.ok((await page.locator(".role-choice-warning").count()) > 0);
|
||||
assert.equal(
|
||||
await page.locator(".recruitment-shares > span").count(),
|
||||
original.players.length,
|
||||
);
|
||||
assert.equal(
|
||||
await page.locator('.role-picker [data-role-id="recruiter"]').innerHTML(),
|
||||
await page.locator('.shared-board [data-role-id="recruiter"]').innerHTML(),
|
||||
await page
|
||||
.locator('.shared-board [data-role-id="recruiter"]')
|
||||
.innerHTML(),
|
||||
"role picker reuses board role cards",
|
||||
);
|
||||
assert.equal(await overflow(), false);
|
||||
|
|
@ -781,7 +786,11 @@ try {
|
|||
await page.evaluate((s) => host.emit("state", s), full);
|
||||
for (let i = 0; i < full.players.length; i++) {
|
||||
const counter = page.locator(`.player-strip [data-score="${i}"]`);
|
||||
assert.ok((await counter.getAttribute("aria-label")).endsWith(`: ${E.scoreBreakdown(full, i).total}`));
|
||||
assert.ok(
|
||||
(await counter.getAttribute("aria-label")).endsWith(
|
||||
`: ${E.scoreBreakdown(full, i).total}`,
|
||||
),
|
||||
);
|
||||
}
|
||||
await page.locator('[data-panel="journal"]').click();
|
||||
const log = page.locator(".pr-modal .modal-body");
|
||||
|
|
@ -976,6 +985,46 @@ try {
|
|||
path: `.local/qa/${width}-production-comparison.png`,
|
||||
});
|
||||
await page.keyboard.press("Escape");
|
||||
const chapelProduction = E.move(original, { type: "role", id: "craftsman" }, 0);
|
||||
chapelProduction.tasks = [{ kind: "produce", p: 0 }];
|
||||
chapelProduction.role = "craftsman";
|
||||
chapelProduction.owner = 0;
|
||||
chapelProduction.players[0].estates = [{ id: "corn", w: 1, c: 0 }];
|
||||
chapelProduction.players[0].buildings = [{ id: "chapel", w: 0, c: 1 }];
|
||||
assert(
|
||||
E.legal(chapelProduction, 0).some((m) => m.decline?.includes("chapel")),
|
||||
);
|
||||
await page.evaluate(
|
||||
(s) => {
|
||||
host.emit("player", { index: 0 });
|
||||
host.emit("preferences", { locale: "en" });
|
||||
host.emit("state", s);
|
||||
},
|
||||
E.stripSecret(chapelProduction, 0),
|
||||
);
|
||||
assert.equal(await page.locator(".action-dock .produce-action").count(), 1);
|
||||
assert.equal(
|
||||
await page.locator(".action-dock .production-custom").count(),
|
||||
1,
|
||||
);
|
||||
assert.doesNotMatch(
|
||||
await page.locator(".action-dock").innerText(),
|
||||
/Without bonus/,
|
||||
);
|
||||
assert.match(
|
||||
await page.locator(".produce-action .action-bonus").getAttribute("title"),
|
||||
/Chapel: \+1 Victory points/,
|
||||
);
|
||||
assert.equal(await overflow(), false, `Production bonus at ${width}`);
|
||||
await page.screenshot({ path: `.local/qa/${width}-production-bonus.png` });
|
||||
await page.locator(".action-dock .produce-action").click();
|
||||
const productionMove = await page.evaluate(() => played.at(-1));
|
||||
assert.equal(productionMove.decline, undefined);
|
||||
assert.equal(
|
||||
E.move(chapelProduction, productionMove, 0).players[0].vp,
|
||||
chapelProduction.players[0].vp + 1,
|
||||
);
|
||||
await page.evaluate(() => host.emit("preferences", { locale: "fr" }));
|
||||
let parallel = E.init(3, [], {}, "browser-parallel");
|
||||
parallel = E.move(parallel, { type: "role", id: "recruiter" }, 0);
|
||||
parallel = E.move(parallel, { type: "recruitBonus" }, 0);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,9 @@ try {
|
|||
{ id, locale: width === 390 ? "fr" : "en" },
|
||||
);
|
||||
let state = chapters[id].initialState();
|
||||
if (await page.locator('[data-tutorial-control="continue"]').isVisible())
|
||||
while (
|
||||
await page.locator('[data-tutorial-control="continue"]').isVisible()
|
||||
)
|
||||
await page.locator('[data-tutorial-control="continue"]').click();
|
||||
assert.equal(
|
||||
await page.evaluate(
|
||||
|
|
|
|||
|
|
@ -133,11 +133,11 @@ for (const id of chapterIds) {
|
|||
const options = tutorialOptions(id, translate);
|
||||
assert.equal(
|
||||
options.steps.length,
|
||||
chapters[id].steps.length + Number(id === "basics"),
|
||||
chapters[id].steps.length + (id === "basics" ? 2 : 0),
|
||||
);
|
||||
assert(
|
||||
options.steps
|
||||
.filter((s) => s.id !== "intro")
|
||||
.filter((s) => !["intro", "round"].includes(s.id))
|
||||
.every(
|
||||
(s) => s.complete && s.validateMove && s.title && s.text && s.hint,
|
||||
),
|
||||
|
|
@ -164,6 +164,7 @@ for (const id of chapterIds) {
|
|||
const introState = clone(tutorial.snapshot.state);
|
||||
assert.equal(tutorial.snapshot.canContinue, true);
|
||||
assert.equal(await tutorial.continue(), true);
|
||||
assert.equal(await tutorial.continue(), true);
|
||||
assert.deepEqual(tutorial.snapshot.state, introState);
|
||||
}
|
||||
for (let index = 0; index < chapters[id].steps.length; index++) {
|
||||
|
|
@ -212,6 +213,7 @@ test("basics demonstrates accumulated role coins, production, privilege and unch
|
|||
assert.equal(produced.players[0].goods.fruit, 1);
|
||||
assert.equal(bonus.players[0].goods.fruit, 2);
|
||||
assert.equal(bonus.round, start.round + 1);
|
||||
assert.equal(bonus.governor, (start.governor + 1) % start.players.length);
|
||||
assert.equal(bonus.roles.find((r) => r.id === "builder").coins, 1);
|
||||
assert.equal(bonus.roles.find((r) => r.id === "craftsman").coins, 0);
|
||||
assert.equal(sold.players[0].coins, bonus.players[0].coins + 1);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Kapel og Notar: én borger hver. Begge plantager og frugtlageret: én arbejder hver.",
|
||||
"tutorial.citizens.produce.title": "Kapellet belønner sin beboer",
|
||||
"tutorial.citizens.produce.text": "En modstander valgte Håndværker. Producer én majs og én frugt. Din borger i Kapellet får også ét sejrspoint; en arbejder der ville få én mønt.",
|
||||
"tutorial.citizens.produce.hint": "Bekræft én majs og én frugt uden at afstå fra Kapellets point.",
|
||||
"tutorial.citizens.produce.hint": "Bekræft én majs og én frugt; kapellets point gives automatisk.",
|
||||
"tutorial.citizens.build.title": "Brug Notarens rabat",
|
||||
"tutorial.citizens.build.text": "En modstander valgte Bygmester. Din borger hos Notaren giver to mønters rabat på udvidede bygninger. Køb Rådhuset for otte. En arbejder hos Notaren ville i stedet give én mønts rabat på almindelige bygninger.",
|
||||
"tutorial.citizens.build.hint": "Vælg Rådhus. Prisen efter rabat er otte mønter.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Kapitel færdigt",
|
||||
"tutorial.guide.learn": "Lær at spille",
|
||||
"tutorial.basics.intro.title": "Udvikl din ø",
|
||||
"tutorial.basics.intro.text": "Få flest point ved at afskibe varer og bygge din by. Planteren tilføjer plantager, Bygmesteren køber bygninger, og Rekruttøren fordeler arbejdere. Denne ø er allerede bemandet: begynd med at producere."
|
||||
"tutorial.basics.intro.text": "Få flest point ved at afskibe varer og bygge din by. Planteren tilføjer plantager, Bygmesteren køber bygninger, og Rekruttøren fordeler arbejdere. Denne ø er allerede bemandet: begynd med at producere.",
|
||||
"tutorial.basics.round.title": "En runde med roller",
|
||||
"tutorial.basics.round.text": "Guvernøren vælger først en rolle. Ved de fleste roller udfører alle handlingen, begyndende med den, der valgte rollen og også får et privilegium. Derefter vælger næste spiller en anden rolle. Når alle har valgt, lægges en mønt på hver ubrugt rolle (undtagen Smugleren), og guvernøren går videre til næste spiller."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Kapelle und Notar: je ein Bürger. Beide Plantagen und das Obstlager: je ein Arbeiter.",
|
||||
"tutorial.citizens.produce.title": "Die Kapelle belohnt ihren Bewohner",
|
||||
"tutorial.citizens.produce.text": "Ein Gegner hat Handwerker gewählt. Produziere einen Mais und ein Obst. Dein Bürger in der Kapelle bringt zusätzlich einen Siegpunkt; ein Arbeiter dort brächte eine Münze.",
|
||||
"tutorial.citizens.produce.hint": "Bestätige einen Mais und ein Obst, ohne auf den Kapellenpunkt zu verzichten.",
|
||||
"tutorial.citizens.produce.hint": "Bestätige einen Mais und eine Frucht; den Kapellenpunkt erhältst du automatisch.",
|
||||
"tutorial.citizens.build.title": "Nutze den Notarrabatt",
|
||||
"tutorial.citizens.build.text": "Ein Gegner hat Baumeister gewählt. Dein Bürger beim Notar senkt die Kosten für Großgebäude um zwei Münzen. Kaufe das Rathaus für acht. Ein Arbeiter beim Notar würde stattdessen normale Gebäude um eine Münze verbilligen.",
|
||||
"tutorial.citizens.build.hint": "Wähle das Rathaus. Der Preis nach Rabatt beträgt acht Münzen.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Kapitel abgeschlossen",
|
||||
"tutorial.guide.learn": "Spielen lernen",
|
||||
"tutorial.basics.intro.title": "Entwickle deine Insel",
|
||||
"tutorial.basics.intro.text": "Erhalte die meisten Punkte durch Verschiffung und den Ausbau deiner Stadt. Pflanzer fügt Plantagen hinzu, Baumeister kauft Gebäude und Anwerber verteilt Arbeiter. Diese Insel ist bereits besetzt: Beginne mit der Produktion."
|
||||
"tutorial.basics.intro.text": "Erhalte die meisten Punkte durch Verschiffung und den Ausbau deiner Stadt. Pflanzer fügt Plantagen hinzu, Baumeister kauft Gebäude und Anwerber verteilt Arbeiter. Diese Insel ist bereits besetzt: Beginne mit der Produktion.",
|
||||
"tutorial.basics.round.title": "Eine Runde mit Rollen",
|
||||
"tutorial.basics.round.text": "Der Gouverneur wählt zuerst eine Rolle. Bei den meisten Rollen führen alle die Aktion aus, beginnend mit dem Wählenden, der auch ein Privileg erhält. Dann wählt der nächste Spieler eine andere Rolle. Nachdem jeder gewählt hat, legt ihr eine Münze auf jede ungenutzte Rolle (außer Schmuggler) und gebt den Gouverneur an den nächsten Spieler weiter."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Παρεκκλήσι και Συμβολαιογράφος: από ένας πολίτης. Και οι δύο φυτείες και η αποθήκη φρούτων: από ένας εργάτης.",
|
||||
"tutorial.citizens.produce.title": "Το Παρεκκλήσι ανταμείβει τον κάτοχό του",
|
||||
"tutorial.citizens.produce.text": "Ένας αντίπαλος επέλεξε Τεχνίτη. Παραγάγετε ένα καλαμπόκι και ένα φρούτο. Ο πολίτης στο Παρεκκλήσι δίνει επίσης έναν πόντο νίκης· ένας εργάτης εκεί θα έδινε ένα νόμισμα.",
|
||||
"tutorial.citizens.produce.hint": "Επιβεβαιώστε ένα καλαμπόκι και ένα φρούτο χωρίς να αρνηθείτε τον πόντο του Παρεκκλησιού.",
|
||||
"tutorial.citizens.produce.hint": "Επιβεβαίωσε ένα καλαμπόκι και ένα φρούτο· ο πόντος του Παρεκκλησίου δίνεται αυτόματα.",
|
||||
"tutorial.citizens.build.title": "Χρησιμοποιήστε την έκπτωση του Συμβολαιογράφου",
|
||||
"tutorial.citizens.build.text": "Ένας αντίπαλος επέλεξε Οικοδόμο. Ο πολίτης στον Συμβολαιογράφο δίνει έκπτωση δύο νομισμάτων στα διευρυμένα κτίρια. Αγοράστε το Δημαρχείο για οκτώ. Ένας εργάτης στον Συμβολαιογράφο θα έδινε έκπτωση ενός νομίσματος στα κανονικά κτίρια.",
|
||||
"tutorial.citizens.build.hint": "Επιλέξτε Δημαρχείο. Με την έκπτωση κοστίζει οκτώ νομίσματα.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Το κεφάλαιο ολοκληρώθηκε",
|
||||
"tutorial.guide.learn": "Μάθετε να παίζετε",
|
||||
"tutorial.basics.intro.title": "Αναπτύξτε το νησί σας",
|
||||
"tutorial.basics.intro.text": "Κερδίστε τους περισσότερους πόντους στέλνοντας αγαθά και χτίζοντας την πόλη σας. Ο Φυτευτής προσθέτει φυτείες, ο Οικοδόμος αγοράζει κτίρια και ο Στρατολόγος τοποθετεί εργάτες. Αυτό το νησί είναι ήδη στελεχωμένο: ξεκινήστε με την παραγωγή."
|
||||
"tutorial.basics.intro.text": "Κερδίστε τους περισσότερους πόντους στέλνοντας αγαθά και χτίζοντας την πόλη σας. Ο Φυτευτής προσθέτει φυτείες, ο Οικοδόμος αγοράζει κτίρια και ο Στρατολόγος τοποθετεί εργάτες. Αυτό το νησί είναι ήδη στελεχωμένο: ξεκινήστε με την παραγωγή.",
|
||||
"tutorial.basics.round.title": "Ένας γύρος ρόλων",
|
||||
"tutorial.basics.round.text": "Ο Κυβερνήτης επιλέγει πρώτος ρόλο. Για τους περισσότερους ρόλους, όλοι εκτελούν την ενέργεια, αρχίζοντας από αυτόν που τον επέλεξε, ο οποίος παίρνει και ένα προνόμιο. Έπειτα ο επόμενος παίκτης επιλέγει άλλο ρόλο. Όταν επιλέξουν όλοι, βάλτε ένα νόμισμα σε κάθε αχρησιμοποίητο ρόλο (εκτός του Λαθρέμπορου) και δώστε τον Κυβερνήτη στον επόμενο παίκτη."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Chapel and Notary: one citizen each. Both plantations and the fruit depot: one worker each.",
|
||||
"tutorial.citizens.produce.title": "The Chapel rewards its occupant",
|
||||
"tutorial.citizens.produce.text": "An opponent chose Craftsman. Produce one corn and one fruit. Your citizen in the Chapel also earns one victory point; a worker there would earn one coin.",
|
||||
"tutorial.citizens.produce.hint": "Confirm one corn and one fruit without declining the Chapel point.",
|
||||
"tutorial.citizens.produce.hint": "Confirm one corn and one fruit; the Chapel point is automatic.",
|
||||
"tutorial.citizens.build.title": "Use the Notary discount",
|
||||
"tutorial.citizens.build.text": "An opponent chose Builder. Your citizen in the Notary discounts expanded buildings by two coins. Buy City Hall for eight. A worker in the Notary would instead discount regular buildings by one.",
|
||||
"tutorial.citizens.build.hint": "Choose City Hall. Its discounted cost is eight coins.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Chapter complete",
|
||||
"tutorial.guide.learn": "Learn to play",
|
||||
"tutorial.basics.intro.title": "Build your island",
|
||||
"tutorial.basics.intro.text": "Earn the most points by shipping goods and building your city. Planter adds plantations, Builder buys buildings, and Recruiter assigns workers. This island is already staffed: start by producing."
|
||||
"tutorial.basics.intro.text": "Earn the most points by shipping goods and building your city. Planter adds plantations, Builder buys buildings, and Recruiter assigns workers. This island is already staffed: start by producing.",
|
||||
"tutorial.basics.round.title": "A round of roles",
|
||||
"tutorial.basics.round.text": "The Governor chooses a role first. For most roles, everyone takes the action, starting with its chooser, who also gets a privilege. Then the next player chooses another role. Once everyone has chosen, put one coin on each unused role (except Smuggler) and pass the Governor to the next player."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "نمازخانه و دفتر اسناد رسمی: هرکدام یک شهروند. هر دو کشتزار و انبار میوه: هرکدام یک کارگر.",
|
||||
"tutorial.citizens.produce.title": "نمازخانه به ساکنش پاداش میدهد",
|
||||
"tutorial.citizens.produce.text": "حریف صنعتگر را انتخاب کرده است. یک ذرت و یک میوه تولید کنید. شهروند شما در نمازخانه یک امتیاز پیروزی هم میگیرد؛ کارگر در آنجا یک سکه میگرفت.",
|
||||
"tutorial.citizens.produce.hint": "یک ذرت و یک میوه را بدون رد کردن امتیاز نمازخانه تأیید کنید.",
|
||||
"tutorial.citizens.produce.hint": "یک ذرت و یک میوه را تأیید کنید؛ امتیاز نمازخانه خودکار داده میشود.",
|
||||
"tutorial.citizens.build.title": "از تخفیف دفتر اسناد رسمی استفاده کنید",
|
||||
"tutorial.citizens.build.text": "حریف سازنده را انتخاب کرده است. شهروندتان در دفتر اسناد رسمی دو سکه به ساختمانهای توسعهیافته تخفیف میدهد. شهرداری را به هشت سکه بخرید. کارگر در آنجا بهجایش ساختمانهای معمولی را یک سکه ارزان میکرد.",
|
||||
"tutorial.citizens.build.hint": "شهرداری را انتخاب کنید. هزینهٔ پس از تخفیف هشت سکه است.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "فصل کامل شد",
|
||||
"tutorial.guide.learn": "یادگیری بازی",
|
||||
"tutorial.basics.intro.title": "جزیرهتان را بسازید",
|
||||
"tutorial.basics.intro.text": "با حمل کالا و ساخت شهر بیشترین امتیاز را بگیرید. کشاورز کشتزار اضافه میکند، سازنده ساختمان میخرد و استخدامکننده کارگران را میچیند. این جزیره از قبل نیرو دارد: با تولید شروع کنید."
|
||||
"tutorial.basics.intro.text": "با حمل کالا و ساخت شهر بیشترین امتیاز را بگیرید. کشاورز کشتزار اضافه میکند، سازنده ساختمان میخرد و استخدامکننده کارگران را میچیند. این جزیره از قبل نیرو دارد: با تولید شروع کنید.",
|
||||
"tutorial.basics.round.title": "یک دور انتخاب نقش",
|
||||
"tutorial.basics.round.text": "فرماندار نخست نقش را انتخاب میکند. در بیشتر نقشها، همه از انتخابکننده شروع کرده و اقدام را انجام میدهند؛ انتخابکننده امتیاز ویژهای هم دارد. سپس بازیکن بعدی نقش دیگری انتخاب میکند. وقتی همه انتخاب کردند، روی هر نقش انتخابنشده یک سکه بگذارید (بهجز قاچاقچی) و فرماندار را به بازیکن بعدی بدهید."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Chapelle et Notaire : un citoyen chacun. Les deux plantations et le dépôt de fruits : un ouvrier chacun.",
|
||||
"tutorial.citizens.produce.title": "La Chapelle récompense son occupant",
|
||||
"tutorial.citizens.produce.text": "Un adversaire a choisi l’Artisan. Produisez un maïs et un fruit. Votre citoyen dans la Chapelle rapporte aussi un point de victoire ; un ouvrier y rapporterait une pièce.",
|
||||
"tutorial.citizens.produce.hint": "Confirmez un maïs et un fruit sans renoncer au point de la Chapelle.",
|
||||
"tutorial.citizens.produce.hint": "Confirmez un maïs et un fruit ; le PV de la Chapelle est automatique.",
|
||||
"tutorial.citizens.build.title": "Utilisez la réduction du Notaire",
|
||||
"tutorial.citizens.build.text": "Un adversaire a choisi le Bâtisseur. Votre citoyen chez le Notaire réduit de deux pièces le coût des bâtiments étendus. Achetez l’Hôtel de ville pour huit. Un ouvrier chez le Notaire réduirait plutôt d’une pièce les bâtiments ordinaires.",
|
||||
"tutorial.citizens.build.hint": "Choisissez l’Hôtel de ville. Son coût réduit est de huit pièces.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Chapitre terminé",
|
||||
"tutorial.guide.learn": "Apprendre à jouer",
|
||||
"tutorial.basics.intro.title": "Développez votre île",
|
||||
"tutorial.basics.intro.text": "Gagnez le plus de points en expédiant des marchandises et en construisant votre ville. Le Planteur ajoute des plantations, le Bâtisseur achète des bâtiments et le Recruteur place les ouvriers. Cette île est déjà occupée : commencez par produire."
|
||||
"tutorial.basics.intro.text": "Gagnez le plus de points en expédiant des marchandises et en construisant votre ville. Le Planteur ajoute des plantations, le Bâtisseur achète des bâtiments et le Recruteur place les ouvriers. Cette île est déjà occupée : commencez par produire.",
|
||||
"tutorial.basics.round.title": "Le tour des rôles",
|
||||
"tutorial.basics.round.text": "Le gouverneur choisit un rôle en premier. Pour la plupart des rôles, tous en font l’action, en commençant par celui qui l’a choisi, qui reçoit aussi un privilège. Puis le joueur suivant choisit un autre rôle. Quand chacun a choisi, ajoutez une pièce sur chaque rôle inutilisé (sauf le Contrebandier) et passez le gouverneur au joueur suivant."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "प्रार्थनालय और नोटरी में एक-एक नागरिक। दोनों बागानों और फल भंडार में एक-एक कामगार।",
|
||||
"tutorial.citizens.produce.title": "प्रार्थनालय अपने कर्मचारी को पुरस्कार देता है",
|
||||
"tutorial.citizens.produce.text": "विरोधी ने कारीगर चुना है। एक मक्का और एक फल बनाएँ। प्रार्थनालय का नागरिक एक विजय अंक भी देता है; वहाँ कामगार होता तो एक सिक्का मिलता।",
|
||||
"tutorial.citizens.produce.hint": "प्रार्थनालय का अंक छोड़े बिना एक मक्का और एक फल की पुष्टि करें।",
|
||||
"tutorial.citizens.produce.hint": "एक मक्का और एक फल की पुष्टि करें; चैपल का अंक अपने आप मिलेगा।",
|
||||
"tutorial.citizens.build.title": "नोटरी की छूट लें",
|
||||
"tutorial.citizens.build.text": "विरोधी ने निर्माता चुना है। नोटरी का नागरिक विस्तृत इमारतों पर दो सिक्कों की छूट देता है। नगर भवन आठ में खरीदें। नोटरी में कामगार होता तो सामान्य इमारतों पर एक सिक्के की छूट देता।",
|
||||
"tutorial.citizens.build.hint": "नगर भवन चुनें। छूट के बाद लागत आठ सिक्के है।",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "अध्याय पूरा",
|
||||
"tutorial.guide.learn": "खेलना सीखें",
|
||||
"tutorial.basics.intro.title": "अपना द्वीप विकसित करें",
|
||||
"tutorial.basics.intro.text": "माल भेजकर और नगर बनाकर सबसे अधिक अंक पाएँ। बागान मालिक बागान जोड़ता है, निर्माता इमारतें खरीदता है और भर्तीकर्ता कामगार नियुक्त करता है। इस द्वीप पर कामगार पहले से हैं: उत्पादन से शुरू करें।"
|
||||
"tutorial.basics.intro.text": "माल भेजकर और नगर बनाकर सबसे अधिक अंक पाएँ। बागान मालिक बागान जोड़ता है, निर्माता इमारतें खरीदता है और भर्तीकर्ता कामगार नियुक्त करता है। इस द्वीप पर कामगार पहले से हैं: उत्पादन से शुरू करें।",
|
||||
"tutorial.basics.round.title": "भूमिकाओं का एक दौर",
|
||||
"tutorial.basics.round.text": "गवर्नर पहले भूमिका चुनता है। ज़्यादातर भूमिकाओं में, चुनने वाले से शुरू करके सभी कार्रवाई करते हैं; चुनने वाले को विशेषाधिकार भी मिलता है। फिर अगला खिलाड़ी दूसरी भूमिका चुनता है। सभी के चुन लेने पर हर बची भूमिका पर एक सिक्का रखें (तस्कर को छोड़कर) और गवर्नर अगले खिलाड़ी को दें।"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Cappella e Notaio: un cittadino ciascuno. Entrambe le piantagioni e il deposito di frutta: un lavoratore ciascuno.",
|
||||
"tutorial.citizens.produce.title": "La Cappella ricompensa chi la occupa",
|
||||
"tutorial.citizens.produce.text": "Un avversario ha scelto Artigiano. Produci un mais e una frutta. Il cittadino nella Cappella guadagna anche un punto vittoria; un lavoratore lì guadagnerebbe una moneta.",
|
||||
"tutorial.citizens.produce.hint": "Conferma un mais e una frutta senza rinunciare al punto della Cappella.",
|
||||
"tutorial.citizens.produce.hint": "Conferma un mais e un frutto; il punto della Cappella è automatico.",
|
||||
"tutorial.citizens.build.title": "Usa lo sconto del Notaio",
|
||||
"tutorial.citizens.build.text": "Un avversario ha scelto Costruttore. Il cittadino dal Notaio riduce di due monete il costo degli edifici ampliati. Compra il Municipio per otto. Un lavoratore dal Notaio ridurrebbe invece di una moneta il costo degli edifici normali.",
|
||||
"tutorial.citizens.build.hint": "Scegli Municipio. Il costo scontato è di otto monete.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Capitolo completato",
|
||||
"tutorial.guide.learn": "Impara a giocare",
|
||||
"tutorial.basics.intro.title": "Sviluppa la tua isola",
|
||||
"tutorial.basics.intro.text": "Ottieni più punti spedendo merci e costruendo la città. Il Piantatore aggiunge piantagioni, il Costruttore compra edifici e il Reclutatore assegna lavoratori. Quest’isola è già occupata: inizia producendo."
|
||||
"tutorial.basics.intro.text": "Ottieni più punti spedendo merci e costruendo la città. Il Piantatore aggiunge piantagioni, il Costruttore compra edifici e il Reclutatore assegna lavoratori. Quest’isola è già occupata: inizia producendo.",
|
||||
"tutorial.basics.round.title": "Un round di ruoli",
|
||||
"tutorial.basics.round.text": "Il Governatore sceglie per primo un ruolo. Per la maggior parte dei ruoli, tutti eseguono l’azione, iniziando da chi l’ha scelto, che riceve anche un privilegio. Poi il giocatore successivo sceglie un altro ruolo. Quando tutti hanno scelto, mettete una moneta su ogni ruolo inutilizzato (tranne il Contrabbandiere) e passate il Governatore al giocatore successivo."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "예배당과 공증소에 시민 한 명씩. 두 농장과 과일 창고에 일꾼 한 명씩.",
|
||||
"tutorial.citizens.produce.title": "예배당은 배치된 인원에 따라 보상합니다",
|
||||
"tutorial.citizens.produce.text": "상대가 장인을 선택했습니다. 옥수수 하나와 과일 하나를 생산하세요. 예배당의 시민은 승점 일 점도 받습니다. 일꾼이라면 동전 하나를 받습니다.",
|
||||
"tutorial.citizens.produce.hint": "예배당 점수를 포기하지 않고 옥수수 하나와 과일 하나를 확인하세요.",
|
||||
"tutorial.citizens.produce.hint": "옥수수 1개와 과일 1개를 확정하세요. 예배당 점수는 자동으로 받습니다.",
|
||||
"tutorial.citizens.build.title": "공증소 할인을 사용하세요",
|
||||
"tutorial.citizens.build.text": "상대가 건축가를 선택했습니다. 공증소의 시민은 확장 건물을 동전 두 개 할인합니다. 시청을 여덟 개에 사세요. 공증소에 일꾼이 있다면 대신 일반 건물을 동전 하나 할인합니다.",
|
||||
"tutorial.citizens.build.hint": "시청을 선택하세요. 할인된 가격은 동전 여덟 개입니다.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "챕터 완료",
|
||||
"tutorial.guide.learn": "게임 배우기",
|
||||
"tutorial.basics.intro.title": "섬을 발전시키세요",
|
||||
"tutorial.basics.intro.text": "상품을 선적하고 도시를 지어 가장 많은 점수를 얻으세요. 농장주는 농장을 추가하고, 건축가는 건물을 사고, 모집관은 일꾼을 배치합니다. 이 섬은 이미 인원이 배치되어 있으니 생산부터 시작하세요."
|
||||
"tutorial.basics.intro.text": "상품을 선적하고 도시를 지어 가장 많은 점수를 얻으세요. 농장주는 농장을 추가하고, 건축가는 건물을 사고, 모집관은 일꾼을 배치합니다. 이 섬은 이미 인원이 배치되어 있으니 생산부터 시작하세요.",
|
||||
"tutorial.basics.round.title": "한 라운드의 역할 선택",
|
||||
"tutorial.basics.round.text": "총독이 먼저 역할을 선택합니다. 대부분의 역할에서는 선택한 사람부터 모두 행동을 하며, 선택한 사람은 특권도 받습니다. 다음 플레이어가 다른 역할을 선택합니다. 모두 선택했다면 선택되지 않은 역할마다 동전 1개를 놓고(밀수업자 제외), 총독을 다음 플레이어에게 넘깁니다."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Kapel en Notaris: elk één burger. Beide plantages en het fruitdepot: elk één arbeider.",
|
||||
"tutorial.citizens.produce.title": "De Kapel beloont zijn bewoner",
|
||||
"tutorial.citizens.produce.text": "Een tegenstander koos Ambachtsman. Produceer één maïs en één fruit. Je burger in de Kapel verdient ook één overwinningspunt; een arbeider daar zou één munt verdienen.",
|
||||
"tutorial.citizens.produce.hint": "Bevestig één maïs en één fruit zonder het Kapelpunt af te slaan.",
|
||||
"tutorial.citizens.produce.hint": "Bevestig één maïs en één fruit; het kapelpunt krijg je automatisch.",
|
||||
"tutorial.citizens.build.title": "Gebruik de Notariskorting",
|
||||
"tutorial.citizens.build.text": "Een tegenstander koos Bouwmeester. Je burger bij de Notaris geeft twee munten korting op uitgebreide gebouwen. Koop het Stadhuis voor acht. Een arbeider bij de Notaris zou gewone gebouwen één munt goedkoper maken.",
|
||||
"tutorial.citizens.build.hint": "Kies Stadhuis. De prijs na korting is acht munten.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Hoofdstuk voltooid",
|
||||
"tutorial.guide.learn": "Leer spelen",
|
||||
"tutorial.basics.intro.title": "Ontwikkel je eiland",
|
||||
"tutorial.basics.intro.text": "Verdien de meeste punten door goederen te verschepen en je stad te bouwen. Planter voegt plantages toe, Bouwmeester koopt gebouwen en Ronselaar verdeelt arbeiders. Dit eiland is al bezet: begin met produceren."
|
||||
"tutorial.basics.intro.text": "Verdien de meeste punten door goederen te verschepen en je stad te bouwen. Planter voegt plantages toe, Bouwmeester koopt gebouwen en Ronselaar verdeelt arbeiders. Dit eiland is al bezet: begin met produceren.",
|
||||
"tutorial.basics.round.title": "Een ronde met rollen",
|
||||
"tutorial.basics.round.text": "De gouverneur kiest als eerste een rol. Bij de meeste rollen voert iedereen de actie uit, te beginnen met de speler die de rol koos en ook een privilege krijgt. Daarna kiest de volgende speler een andere rol. Als iedereen heeft gekozen, leg je een munt op elke ongekozen rol (behalve Smokkelaar) en geef je de gouverneur aan de volgende speler."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Kaplica i Notariusz: po jednym obywatelu. Obie plantacje i skład owoców: po jednym robotniku.",
|
||||
"tutorial.citizens.produce.title": "Kaplica nagradza swojego mieszkańca",
|
||||
"tutorial.citizens.produce.text": "Przeciwnik wybrał Rzemieślnika. Wyprodukuj kukurydzę i owoc. Obywatel w Kaplicy daje też punkt zwycięstwa; robotnik dałby tam monetę.",
|
||||
"tutorial.citizens.produce.hint": "Potwierdź kukurydzę i owoc, nie rezygnując z punktu Kaplicy.",
|
||||
"tutorial.citizens.produce.hint": "Potwierdź jedną kukurydzę i jeden owoc; punkt z Kaplicy otrzymasz automatycznie.",
|
||||
"tutorial.citizens.build.title": "Wykorzystaj zniżkę Notariusza",
|
||||
"tutorial.citizens.build.text": "Przeciwnik wybrał Budowniczego. Obywatel u Notariusza obniża koszt rozbudowanych budynków o dwie monety. Kup Ratusz za osiem. Robotnik u Notariusza obniżałby zamiast tego koszt zwykłych budynków o monetę.",
|
||||
"tutorial.citizens.build.hint": "Wybierz Ratusz. Koszt po zniżce to osiem monet.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Rozdział ukończony",
|
||||
"tutorial.guide.learn": "Naucz się grać",
|
||||
"tutorial.basics.intro.title": "Rozwijaj swoją wyspę",
|
||||
"tutorial.basics.intro.text": "Zdobądź najwięcej punktów, transportując towary i budując miasto. Plantator dodaje plantacje, Budowniczy kupuje budynki, a Werbownik rozmieszcza robotników. Ta wyspa jest już obsadzona: zacznij od produkcji."
|
||||
"tutorial.basics.intro.text": "Zdobądź najwięcej punktów, transportując towary i budując miasto. Plantator dodaje plantacje, Budowniczy kupuje budynki, a Werbownik rozmieszcza robotników. Ta wyspa jest już obsadzona: zacznij od produkcji.",
|
||||
"tutorial.basics.round.title": "Runda wyboru ról",
|
||||
"tutorial.basics.round.text": "Gubernator wybiera rolę jako pierwszy. W przypadku większości ról wszyscy wykonują ich akcję, zaczynając od wybierającego, który otrzymuje też przywilej. Następnie kolejny gracz wybiera inną rolę. Gdy wszyscy wybiorą, połóżcie monetę na każdej niewybranej roli (oprócz Przemytnika) i przekażcie gubernatora kolejnemu graczowi."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Capela e Cartório: um cidadão em cada. Ambas as plantações e o depósito de frutas: um trabalhador em cada.",
|
||||
"tutorial.citizens.produce.title": "A Capela recompensa seu ocupante",
|
||||
"tutorial.citizens.produce.text": "Um adversário escolheu Artesão. Produza um milho e uma fruta. Seu cidadão na Capela também ganha um ponto de vitória; um trabalhador ali ganharia uma moeda.",
|
||||
"tutorial.citizens.produce.hint": "Confirme um milho e uma fruta sem recusar o ponto da Capela.",
|
||||
"tutorial.citizens.produce.hint": "Confirme um milho e uma fruta; o ponto da Capela é automático.",
|
||||
"tutorial.citizens.build.title": "Use o desconto do Cartório",
|
||||
"tutorial.citizens.build.text": "Um adversário escolheu Construtor. Seu cidadão no Cartório dá duas moedas de desconto em edifícios ampliados. Compre a Prefeitura por oito. Um trabalhador no Cartório daria uma moeda de desconto em edifícios comuns.",
|
||||
"tutorial.citizens.build.hint": "Escolha Prefeitura. O custo com desconto é oito moedas.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Capítulo concluído",
|
||||
"tutorial.guide.learn": "Aprenda a jogar",
|
||||
"tutorial.basics.intro.title": "Desenvolva sua ilha",
|
||||
"tutorial.basics.intro.text": "Ganhe mais pontos embarcando mercadorias e construindo sua cidade. O Fazendeiro acrescenta plantações, o Construtor compra edifícios e o Recrutador distribui trabalhadores. Esta ilha já está ocupada: comece produzindo."
|
||||
"tutorial.basics.intro.text": "Ganhe mais pontos embarcando mercadorias e construindo sua cidade. O Fazendeiro acrescenta plantações, o Construtor compra edifícios e o Recrutador distribui trabalhadores. Esta ilha já está ocupada: comece produzindo.",
|
||||
"tutorial.basics.round.title": "Uma rodada de papéis",
|
||||
"tutorial.basics.round.text": "O Governador escolhe um papel primeiro. Na maioria dos papéis, todos realizam a ação, começando por quem o escolheu, que também recebe um privilégio. Depois, o próximo jogador escolhe outro papel. Quando todos tiverem escolhido, coloque uma moeda em cada papel não escolhido (exceto Contrabandista) e passe o Governador ao próximo jogador."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Capelă și Notar: câte un cetățean. Ambele plantații și depozitul de fructe: câte un muncitor.",
|
||||
"tutorial.citizens.produce.title": "Capela își recompensează ocupantul",
|
||||
"tutorial.citizens.produce.text": "Un adversar a ales Meșteșugar. Produce un porumb și un fruct. Cetățeanul din Capelă câștigă și un punct de victorie; un muncitor acolo ar primi o monedă.",
|
||||
"tutorial.citizens.produce.hint": "Confirmă un porumb și un fruct fără a refuza punctul Capelei.",
|
||||
"tutorial.citizens.produce.hint": "Confirmă un porumb și un fruct; punctul Capelei se acordă automat.",
|
||||
"tutorial.citizens.build.title": "Folosește reducerea Notarului",
|
||||
"tutorial.citizens.build.text": "Un adversar a ales Constructor. Cetățeanul de la Notar reduce cu două monede prețul clădirilor extinse. Cumpără Primăria pentru opt. Un muncitor la Notar ar reduce în schimb cu o monedă prețul clădirilor obișnuite.",
|
||||
"tutorial.citizens.build.hint": "Alege Primăria. Costul redus este de opt monede.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Capitol încheiat",
|
||||
"tutorial.guide.learn": "Învață să joci",
|
||||
"tutorial.basics.intro.title": "Dezvoltă-ți insula",
|
||||
"tutorial.basics.intro.text": "Obține cele mai multe puncte transportând bunuri și construind orașul. Plantatorul adaugă plantații, Constructorul cumpără clădiri, iar Recrutorul repartizează muncitori. Această insulă este deja ocupată: începe cu producția."
|
||||
"tutorial.basics.intro.text": "Obține cele mai multe puncte transportând bunuri și construind orașul. Plantatorul adaugă plantații, Constructorul cumpără clădiri, iar Recrutorul repartizează muncitori. Această insulă este deja ocupată: începe cu producția.",
|
||||
"tutorial.basics.round.title": "O rundă de roluri",
|
||||
"tutorial.basics.round.text": "Guvernatorul alege primul un rol. Pentru majoritatea rolurilor, toți execută acțiunea, începând cu cel care l-a ales și care primește și un privilegiu. Apoi următorul jucător alege alt rol. După ce toți au ales, puneți o monedă pe fiecare rol neales (exceptând Contrabandistul) și transmiteți guvernatorul următorului jucător."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Часовня и Нотариус: по одному горожанину. Обе плантации и фруктовый склад: по одному рабочему.",
|
||||
"tutorial.citizens.produce.title": "Часовня награждает своего обитателя",
|
||||
"tutorial.citizens.produce.text": "Соперник выбрал Ремесленника. Произведите кукурузу и фрукт. Ваш горожанин в Часовне также приносит победное очко; рабочий принёс бы монету.",
|
||||
"tutorial.citizens.produce.hint": "Подтвердите кукурузу и фрукт, не отказываясь от очка Часовни.",
|
||||
"tutorial.citizens.produce.hint": "Подтвердите одну кукурузу и один фрукт; очко Часовни начислится автоматически.",
|
||||
"tutorial.citizens.build.title": "Используйте скидку Нотариуса",
|
||||
"tutorial.citizens.build.text": "Соперник выбрал Строителя. Горожанин у Нотариуса удешевляет расширенные здания на две монеты. Купите Ратушу за восемь. Рабочий у Нотариуса вместо этого удешевлял бы обычные здания на монету.",
|
||||
"tutorial.citizens.build.hint": "Выберите Ратушу. Цена со скидкой — восемь монет.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Глава завершена",
|
||||
"tutorial.guide.learn": "Научиться играть",
|
||||
"tutorial.basics.intro.title": "Развивайте свой остров",
|
||||
"tutorial.basics.intro.text": "Наберите больше всех очков, перевозя товары и строя город. Плантатор добавляет плантации, Строитель покупает здания, а Вербовщик размещает рабочих. Этот остров уже заселён: начните с производства."
|
||||
"tutorial.basics.intro.text": "Наберите больше всех очков, перевозя товары и строя город. Плантатор добавляет плантации, Строитель покупает здания, а Вербовщик размещает рабочих. Этот остров уже заселён: начните с производства.",
|
||||
"tutorial.basics.round.title": "Раунд выбора ролей",
|
||||
"tutorial.basics.round.text": "Губернатор выбирает роль первым. Для большинства ролей все выполняют их действие, начиная с выбравшего роль, который также получает привилегию. Затем следующий игрок выбирает другую роль. Когда все выбрали, положите монету на каждую невыбранную роль (кроме Контрабандиста) и передайте губернатора следующему игроку."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "Nhà nguyện và Công chứng viên: mỗi nơi một công dân. Hai đồn điền và kho trái cây: mỗi nơi một công nhân.",
|
||||
"tutorial.citizens.produce.title": "Nhà nguyện thưởng theo người bên trong",
|
||||
"tutorial.citizens.produce.text": "Đối thủ đã chọn Thợ thủ công. Sản xuất một ngô và một trái cây. Công dân trong Nhà nguyện cũng nhận một điểm chiến thắng; công nhân ở đó sẽ nhận một đồng.",
|
||||
"tutorial.citizens.produce.hint": "Xác nhận một ngô và một trái cây mà không từ chối điểm Nhà nguyện.",
|
||||
"tutorial.citizens.produce.hint": "Xác nhận một ngô và một trái cây; điểm Nhà nguyện được cộng tự động.",
|
||||
"tutorial.citizens.build.title": "Dùng giảm giá của Công chứng viên",
|
||||
"tutorial.citizens.build.text": "Đối thủ đã chọn Thợ xây. Công dân trong Công chứng viên giảm hai đồng cho công trình mở rộng. Mua Tòa thị chính với tám đồng. Công nhân ở đó sẽ giảm một đồng cho công trình thường.",
|
||||
"tutorial.citizens.build.hint": "Chọn Tòa thị chính. Giá sau giảm là tám đồng.",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "Đã hoàn thành chương",
|
||||
"tutorial.guide.learn": "Học cách chơi",
|
||||
"tutorial.basics.intro.title": "Phát triển hòn đảo",
|
||||
"tutorial.basics.intro.text": "Giành nhiều điểm nhất bằng vận chuyển hàng và xây thành phố. Chủ đồn điền thêm đồn điền, Thợ xây mua công trình, Người tuyển dụng phân công công nhân. Đảo này đã có người làm: hãy bắt đầu sản xuất."
|
||||
"tutorial.basics.intro.text": "Giành nhiều điểm nhất bằng vận chuyển hàng và xây thành phố. Chủ đồn điền thêm đồn điền, Thợ xây mua công trình, Người tuyển dụng phân công công nhân. Đảo này đã có người làm: hãy bắt đầu sản xuất.",
|
||||
"tutorial.basics.round.title": "Một vòng chọn vai trò",
|
||||
"tutorial.basics.round.text": "Thống đốc chọn vai trò trước. Với hầu hết vai trò, mọi người đều thực hiện hành động, bắt đầu từ người chọn; người này còn được đặc quyền. Sau đó người chơi tiếp theo chọn vai trò khác. Khi mọi người đã chọn, đặt một đồng lên mỗi vai trò chưa được chọn (trừ Kẻ buôn lậu) và chuyển Thống đốc cho người tiếp theo."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
"tutorial.citizens.assign.hint": "小教堂和公證處:各一位市民。兩座種植園和水果倉庫:各一位工人。",
|
||||
"tutorial.citizens.produce.title": "小教堂獎勵其中的人員",
|
||||
"tutorial.citizens.produce.text": "對手選擇了工匠。生產一份玉米和一份水果。小教堂裡的市民還會獲得一分;如果是工人,則會獲得一枚金幣。",
|
||||
"tutorial.citizens.produce.hint": "確認一份玉米和一份水果,不要放棄小教堂的分數。",
|
||||
"tutorial.citizens.produce.hint": "確認生產 1 個玉米和 1 個水果;教堂的勝利點會自動獲得。",
|
||||
"tutorial.citizens.build.title": "使用公證處折扣",
|
||||
"tutorial.citizens.build.text": "對手選擇了建築師。公證處裡的市民讓擴建建築便宜兩枚金幣。以八枚購買市政廳。如果公證處裡是工人,則會讓一般建築便宜一枚金幣。",
|
||||
"tutorial.citizens.build.hint": "選擇市政廳。折扣後費用為八枚金幣。",
|
||||
|
|
@ -71,5 +71,7 @@
|
|||
"tutorial.guide.complete": "本章完成",
|
||||
"tutorial.guide.learn": "學習遊戲",
|
||||
"tutorial.basics.intro.title": "建設你的島嶼",
|
||||
"tutorial.basics.intro.text": "透過運輸貨物與建設城市取得最多分數。拓荒者增加種植園,建築師購買建築,招募者分配工人。這座島已安排好人員:先從生產開始。"
|
||||
"tutorial.basics.intro.text": "透過運輸貨物與建設城市取得最多分數。拓荒者增加種植園,建築師購買建築,招募者分配工人。這座島已安排好人員:先從生產開始。",
|
||||
"tutorial.basics.round.title": "一輪中的角色選擇",
|
||||
"tutorial.basics.round.text": "總督先選擇角色。大多數角色由選擇者開始,所有玩家依序執行行動,選擇者另享有特權。接著下一位玩家選擇其他角色。每人都選過後,在每個未被選擇的角色上放 1 枚錢幣(走私者除外),並將總督交給下一位玩家。"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -252,7 +252,7 @@ export const chapters = Object.fromEntries(
|
|||
id,
|
||||
{
|
||||
id,
|
||||
version: id === "shipping" ? 2 : 1,
|
||||
version: ["shipping", "basics"].includes(id) ? 2 : 1,
|
||||
titleKey: `tutorial.${id}.title`,
|
||||
descriptionKey: `tutorial.${id}.description`,
|
||||
initialState: definition.initialState,
|
||||
|
|
@ -299,6 +299,11 @@ export function tutorialOptions(id, translate) {
|
|||
title: translate("tutorial.basics.intro.title"),
|
||||
text: translate("tutorial.basics.intro.text"),
|
||||
},
|
||||
{
|
||||
id: "round",
|
||||
title: translate("tutorial.basics.round.title"),
|
||||
text: translate("tutorial.basics.round.text"),
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...chapter.steps.map(
|
||||
|
|
|
|||
144
viewer/action-bonuses.js
Normal file
144
viewer/action-bonuses.js
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
import { active, completedFestivals } from "../engine/index.js";
|
||||
import { BUILDINGS } from "../engine/catalog.js";
|
||||
|
||||
// Immediate building bonuses formerly offered as "without bonus" alternatives.
|
||||
export function actionBonuses(state, seat, move) {
|
||||
const player = state.players[seat];
|
||||
if (!player) return [];
|
||||
const bonuses = [];
|
||||
const add = (building, vp = 0, coins = 0) => {
|
||||
if (active(player, building) && !move.decline?.includes(building))
|
||||
bonuses.push({ building, vp, coins });
|
||||
};
|
||||
if (
|
||||
state.tasks[0]?.kind === "produce" &&
|
||||
["produce", "pass"].includes(move.type)
|
||||
) {
|
||||
const citizen = player.buildings.find((b) => b.id === "chapel")?.c > 0;
|
||||
add("chapel", citizen ? 1 : 0, citizen ? 0 : 1);
|
||||
}
|
||||
if (move.type === "build" && BUILDINGS[move.id]?.vp >= 2)
|
||||
add("church", BUILDINGS[move.id].size === 2 ? 2 : 1);
|
||||
if (["ship", "smallWharf"].includes(move.type)) {
|
||||
add("harbor", 1);
|
||||
// The regular Captain privilege already gives 1 VP; this is its extra VP.
|
||||
if (seat === state.owner && !state.captainBonus) add("publishingHouse", 1);
|
||||
}
|
||||
return bonuses;
|
||||
}
|
||||
|
||||
export function actionVictoryPoints(state, seat, move) {
|
||||
const player = state.players[seat];
|
||||
let points = actionBonuses(state, seat, move).reduce((n, b) => n + b.vp, 0);
|
||||
if (move.type === "ship") {
|
||||
points +=
|
||||
move.ship === "wharf"
|
||||
? player.goods[move.good]
|
||||
: Math.min(
|
||||
player.goods[move.good],
|
||||
state.ships[move.ship].capacity - state.ships[move.ship].amount,
|
||||
);
|
||||
}
|
||||
if (move.type === "smallWharf")
|
||||
points += Math.floor(
|
||||
Object.values(move.goods).reduce((a, b) => a + b, 0) / 2,
|
||||
);
|
||||
if (
|
||||
["ship", "smallWharf"].includes(move.type) &&
|
||||
seat === state.owner &&
|
||||
!state.captainBonus
|
||||
)
|
||||
points++;
|
||||
if (move.type === "plunder") points += state.trade.length;
|
||||
if (move.type === "pension") points++;
|
||||
if (move.type === "parkReward") points += 2;
|
||||
if (move.type === "assembly")
|
||||
points += Object.values(player.goods).reduce(
|
||||
(n, amount) => n + Math.floor(amount / 2),
|
||||
0,
|
||||
);
|
||||
return points + festivalPoints(state, seat, move);
|
||||
}
|
||||
|
||||
// Forecast only public, deterministic outcomes; never inspect future plantation draws.
|
||||
function festivalPoints(state, seat, move) {
|
||||
if (!state.festivals?.length) return 0;
|
||||
const preview = { ...state };
|
||||
let event;
|
||||
if (move.type === "build") event = { type: "build", id: move.id };
|
||||
if (["produce", "produceBonus"].includes(move.type)) {
|
||||
const goods = move.type === "produce" ? move.goods : { [move.good]: 1 };
|
||||
preview.production = (
|
||||
state.production ??
|
||||
state.players.map(() =>
|
||||
Object.fromEntries(
|
||||
Object.keys(playerGoods(state, seat)).map((g) => [g, 0]),
|
||||
),
|
||||
)
|
||||
).map((out, i) =>
|
||||
i === seat
|
||||
? Object.fromEntries(
|
||||
Object.entries(out).map(([g, n]) => [g, n + (goods[g] ?? 0)]),
|
||||
)
|
||||
: out,
|
||||
);
|
||||
event = { type: "produce" };
|
||||
}
|
||||
if (move.type === "trade" && !move.outpost) {
|
||||
preview.trade = [...state.trade, move.good];
|
||||
event = { type: "trade", good: move.good };
|
||||
}
|
||||
if (["plant", "forest"].includes(move.type)) {
|
||||
const id = move.forest
|
||||
? "forest"
|
||||
: move.type === "plant"
|
||||
? move.id
|
||||
: state.tasks[0].id;
|
||||
preview.players = state.players.map((p, i) =>
|
||||
i === seat ? { ...p, estates: [...p.estates, { id }] } : p,
|
||||
);
|
||||
event = { type: "estates" };
|
||||
}
|
||||
if (["ship", "smallWharf"].includes(move.type)) {
|
||||
const ship = Number.isInteger(move.ship) ? state.ships[move.ship] : null;
|
||||
const amount =
|
||||
move.type === "ship"
|
||||
? Math.min(
|
||||
state.players[seat].goods[move.good],
|
||||
ship ? ship.capacity - ship.amount : Infinity,
|
||||
)
|
||||
: 0;
|
||||
const goods =
|
||||
move.type === "smallWharf" ? move.goods : { [move.good]: amount };
|
||||
preview.shipped = (
|
||||
state.shipped ??
|
||||
state.players.map(() =>
|
||||
Object.fromEntries(
|
||||
Object.keys(playerGoods(state, seat)).map((g) => [g, 0]),
|
||||
),
|
||||
)
|
||||
).map((out, i) =>
|
||||
i === seat
|
||||
? Object.fromEntries(
|
||||
Object.entries(out).map(([g, n]) => [g, n + (goods[g] ?? 0)]),
|
||||
)
|
||||
: out,
|
||||
);
|
||||
event = {
|
||||
type: "ship",
|
||||
good: move.good,
|
||||
full: !!ship && ship.amount + amount === ship.capacity,
|
||||
capacity: ship?.capacity ?? null,
|
||||
};
|
||||
}
|
||||
return event
|
||||
? completedFestivals(preview, seat, event).reduce(
|
||||
(n, f) => n + (f.reward.vp ?? 0),
|
||||
0,
|
||||
)
|
||||
: 0;
|
||||
}
|
||||
|
||||
function playerGoods(state, seat) {
|
||||
return state.players[seat].goods;
|
||||
}
|
||||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Opbevar automatisk, når alt kan være der",
|
||||
"metadata.autoForcedActions": "Spil tvungne træk automatisk",
|
||||
"metadata.description": "Vælg roller, udvikl din ø, producer varer, og afskib dem for point. Omfatter alle seks udvidelser og solospil mod to Puertomaer.",
|
||||
"metadata.rules": "Vælg en rolle: alle udfører handlingen, og du får et privilegium. Plant, rekrutter, byg, producer, handl og afskib. Flest point fra afskibning, bygninger og bonusser vinder."
|
||||
"metadata.rules": "Vælg en rolle: alle udfører handlingen, og du får et privilegium. Plant, rekrutter, byg, producer, handl og afskib. Flest point fra afskibning, bygninger og bonusser vinder.",
|
||||
"smugglerRaidHelp": "Tag op til 3 varer fra ét skib; læg resten tilbage i forsyningen.",
|
||||
"smugglerPlunderHelp": "Læg alle handelshusets varer tilbage i forsyningen; få 1 sejrspoint pr. vare.",
|
||||
"smugglerPoachHelp": "Tag op til 3 overskydende arbejdere, og placér dem straks."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Automatisch lagern, wenn alles Platz hat",
|
||||
"metadata.autoForcedActions": "Erzwungene Züge automatisch ausführen",
|
||||
"metadata.description": "Wähle Rollen, entwickle deine Insel, produziere Waren und verschiffe sie für Punkte. Mit allen sechs Erweiterungen und Solospiel gegen zwei Puertomas.",
|
||||
"metadata.rules": "Wähle eine Rolle: Alle führen ihre Aktion aus, du erhältst ein Privileg. Pflanze, wirb an, baue, produziere, handle und verschiffe. Die meisten Punkte aus Verschiffung, Gebäuden und Boni gewinnen."
|
||||
"metadata.rules": "Wähle eine Rolle: Alle führen ihre Aktion aus, du erhältst ein Privileg. Pflanze, wirb an, baue, produziere, handle und verschiffe. Die meisten Punkte aus Verschiffung, Gebäuden und Boni gewinnen.",
|
||||
"smugglerRaidHelp": "Nimm bis zu 3 Waren von einem Schiff; lege den Rest in den Vorrat zurück.",
|
||||
"smugglerPlunderHelp": "Lege alle Waren des Handelshauses in den Vorrat zurück; erhalte 1 SP pro Ware.",
|
||||
"smugglerPoachHelp": "Nimm bis zu 3 überzählige Arbeiter und setze sie sofort ein."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Αυτόματη αποθήκευση όταν χωρούν όλα",
|
||||
"metadata.autoForcedActions": "Αυτόματη εκτέλεση αναγκαστικών κινήσεων",
|
||||
"metadata.description": "Επιλέξτε ρόλους, αναπτύξτε το νησί, παράγετε αγαθά και στείλτε τα για πόντους. Περιλαμβάνει και τις έξι επεκτάσεις και ατομικό παιχνίδι εναντίον δύο Πουέρτομα.",
|
||||
"metadata.rules": "Επιλέξτε ρόλο: όλοι εκτελούν την ενέργειά του και εσείς παίρνετε προνόμιο. Φυτέψτε, προσλάβετε, χτίστε, παράγετε, πουλήστε και στείλτε. Κερδίζουν οι περισσότεροι πόντοι από αποστολές, κτίρια και μπόνους."
|
||||
"metadata.rules": "Επιλέξτε ρόλο: όλοι εκτελούν την ενέργειά του και εσείς παίρνετε προνόμιο. Φυτέψτε, προσλάβετε, χτίστε, παράγετε, πουλήστε και στείλτε. Κερδίζουν οι περισσότεροι πόντοι από αποστολές, κτίρια και μπόνους.",
|
||||
"smugglerRaidHelp": "Πάρε έως 3 αγαθά από ένα πλοίο· επέστρεψε τα υπόλοιπα στο απόθεμα.",
|
||||
"smugglerPlunderHelp": "Επέστρεψε όλα τα αγαθά του εμπορικού οίκου στο απόθεμα· κέρδισε 1 ΠΝ ανά αγαθό.",
|
||||
"smugglerPoachHelp": "Πάρε έως 3 πλεονάζοντες εργάτες και τοποθέτησέ τους αμέσως."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Automatically store when everything fits",
|
||||
"metadata.autoForcedActions": "Automatically play forced moves",
|
||||
"metadata.description": "Choose roles, develop your island, produce goods and ship them for points. Includes all six expansions and solo play against two Puertomas.",
|
||||
"metadata.rules": "Choose a role: all players perform its action, and you receive a privilege. Plant, recruit, build, produce, trade and ship. Most points from shipping, buildings and bonuses wins."
|
||||
"metadata.rules": "Choose a role: all players perform its action, and you receive a privilege. Plant, recruit, build, produce, trade and ship. Most points from shipping, buildings and bonuses wins.",
|
||||
"smugglerRaidHelp": "Take up to 3 goods from one ship; return the rest to the supply.",
|
||||
"smugglerPlunderHelp": "Return all trading-house goods to the supply; gain 1 VP per good.",
|
||||
"smugglerPoachHelp": "Take up to 3 surplus workers and place them immediately."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "ذخیرهٔ خودکار وقتی همهٔ کالاها جا میشوند",
|
||||
"metadata.autoForcedActions": "اجرای خودکار حرکتهای اجباری",
|
||||
"metadata.description": "نقش انتخاب کنید، جزیره بسازید، کالا تولید و برای امتیاز ارسال کنید. شامل هر شش افزونه و بازی انفرادی برابر دو پورتوما.",
|
||||
"metadata.rules": "نقشی انتخاب کنید: همه اقدامش را انجام میدهند و شما امتیاز ویژه میگیرید. کشت، استخدام، ساخت، تولید، تجارت و ارسال کنید. بیشترین امتیاز از ارسال، ساختمانها و پاداشها برنده است."
|
||||
"metadata.rules": "نقشی انتخاب کنید: همه اقدامش را انجام میدهند و شما امتیاز ویژه میگیرید. کشت، استخدام، ساخت، تولید، تجارت و ارسال کنید. بیشترین امتیاز از ارسال، ساختمانها و پاداشها برنده است.",
|
||||
"smugglerRaidHelp": "از یک کشتی حداکثر ۳ کالا بردارید؛ باقی را به ذخیره برگردانید.",
|
||||
"smugglerPlunderHelp": "همهٔ کالاهای تجارتخانه را به ذخیره برگردانید؛ برای هر کالا ۱ امتیاز پیروزی بگیرید.",
|
||||
"smugglerPoachHelp": "حداکثر ۳ کارگر اضافی بردارید و فوراً آنها را مستقر کنید."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Stocker automatiquement si tout peut être conservé",
|
||||
"metadata.autoForcedActions": "Jouer automatiquement les coups forcés",
|
||||
"metadata.description": "Choisissez des rôles, développez votre île, produisez et expédiez des marchandises pour gagner des points. Les six extensions sont incluses, ainsi qu’un mode solo contre deux Puertomas.",
|
||||
"metadata.rules": "Choisissez un rôle : tous les joueurs effectuent son action et vous recevez un privilège. Plantez, recrutez, construisez, produisez, vendez et expédiez. Le plus de points grâce aux expéditions, bâtiments et bonus remporte la partie."
|
||||
"metadata.rules": "Choisissez un rôle : tous les joueurs effectuent son action et vous recevez un privilège. Plantez, recrutez, construisez, produisez, vendez et expédiez. Le plus de points grâce aux expéditions, bâtiments et bonus remporte la partie.",
|
||||
"smugglerRaidHelp": "Prenez jusqu’à 3 marchandises sur un bateau ; remettez le reste dans la réserve.",
|
||||
"smugglerPlunderHelp": "Remettez toutes les marchandises du comptoir dans la réserve ; gagnez 1 PV par marchandise.",
|
||||
"smugglerPoachHelp": "Prenez jusqu’à 3 ouvriers excédentaires et placez-les immédiatement."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "सब कुछ समाने पर अपने आप भंडारण करें",
|
||||
"metadata.autoForcedActions": "एकमात्र संभव चाल अपने आप चलें",
|
||||
"metadata.description": "भूमिकाएँ चुनें, द्वीप विकसित करें, माल बनाएँ और अंक पाने के लिए भेजें। सभी छह विस्तार और दो पुर्तोमा के विरुद्ध एकल खेल शामिल हैं।",
|
||||
"metadata.rules": "भूमिका चुनें: सभी उसकी कार्रवाई करते हैं और आपको विशेषाधिकार मिलता है। बागान लें, भर्ती करें, बनाएँ, उत्पादन करें, व्यापार करें और माल भेजें। माल भेजने, इमारतों और बोनस से सबसे अधिक अंक पाने वाला जीतता है।"
|
||||
"metadata.rules": "भूमिका चुनें: सभी उसकी कार्रवाई करते हैं और आपको विशेषाधिकार मिलता है। बागान लें, भर्ती करें, बनाएँ, उत्पादन करें, व्यापार करें और माल भेजें। माल भेजने, इमारतों और बोनस से सबसे अधिक अंक पाने वाला जीतता है।",
|
||||
"smugglerRaidHelp": "एक जहाज़ से अधिकतम 3 माल लें; बाकी भंडार में लौटाएँ।",
|
||||
"smugglerPlunderHelp": "व्यापार गृह का सारा माल भंडार में लौटाएँ; हर माल के लिए 1 विजय अंक पाएँ।",
|
||||
"smugglerPoachHelp": "अधिकतम 3 अतिरिक्त श्रमिक लें और उन्हें तुरंत तैनात करें।"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Conserva automaticamente quando c’è spazio per tutto",
|
||||
"metadata.autoForcedActions": "Esegui automaticamente le mosse obbligate",
|
||||
"metadata.description": "Scegli ruoli, sviluppa l’isola, produci merci e spediscile per ottenere punti. Include tutte le sei espansioni e il solitario contro due Puertoma.",
|
||||
"metadata.rules": "Scegli un ruolo: tutti eseguono la sua azione e tu ricevi un privilegio. Pianta, recluta, costruisci, produci, commercia e spedisci. Vince chi ottiene più punti da spedizioni, edifici e bonus."
|
||||
"metadata.rules": "Scegli un ruolo: tutti eseguono la sua azione e tu ricevi un privilegio. Pianta, recluta, costruisci, produci, commercia e spedisci. Vince chi ottiene più punti da spedizioni, edifici e bonus.",
|
||||
"smugglerRaidHelp": "Prendi fino a 3 merci da una nave; rimetti le altre nella riserva.",
|
||||
"smugglerPlunderHelp": "Rimetti tutte le merci dell’emporio nella riserva; ottieni 1 PV per merce.",
|
||||
"smugglerPoachHelp": "Prendi fino a 3 lavoratori in eccedenza e collocali subito."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "모두 보관할 수 있으면 자동 보관",
|
||||
"metadata.autoForcedActions": "강제 행동 자동 실행",
|
||||
"metadata.description": "역할을 골라 섬을 발전시키고 상품을 생산하고 배송해 점수를 얻으세요. 여섯 확장과 푸에르토마 두 명을 상대하는 1인 플레이가 포함됩니다.",
|
||||
"metadata.rules": "역할을 고르면 모두 그 행동을 하고 선택자는 특권을 받습니다. 경작, 모집, 건설, 생산, 교역, 배송을 하세요. 배송, 건물, 보너스로 가장 많은 점수를 얻으면 승리합니다."
|
||||
"metadata.rules": "역할을 고르면 모두 그 행동을 하고 선택자는 특권을 받습니다. 경작, 모집, 건설, 생산, 교역, 배송을 하세요. 배송, 건물, 보너스로 가장 많은 점수를 얻으면 승리합니다.",
|
||||
"smugglerRaidHelp": "배 한 척에서 상품을 최대 3개 가져오고, 나머지는 공급처에 돌려놓습니다.",
|
||||
"smugglerPlunderHelp": "교역소의 상품을 모두 공급처에 돌려놓고, 상품마다 승점 1점을 얻습니다.",
|
||||
"smugglerPoachHelp": "남는 일꾼을 최대 3명 가져와 즉시 배치합니다."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Automatisch opslaan als alles past",
|
||||
"metadata.autoForcedActions": "Gedwongen zetten automatisch spelen",
|
||||
"metadata.description": "Kies rollen, ontwikkel je eiland, produceer goederen en verscheep ze voor punten. Met alle zes uitbreidingen en solospel tegen twee Puertoma’s.",
|
||||
"metadata.rules": "Kies een rol: iedereen voert de actie uit en jij krijgt een privilege. Plant, rekruteer, bouw, produceer, handel en verscheep. De meeste punten uit verscheping, gebouwen en bonussen winnen."
|
||||
"metadata.rules": "Kies een rol: iedereen voert de actie uit en jij krijgt een privilege. Plant, rekruteer, bouw, produceer, handel en verscheep. De meeste punten uit verscheping, gebouwen en bonussen winnen.",
|
||||
"smugglerRaidHelp": "Neem maximaal 3 goederen van één schip; leg de rest terug in de voorraad.",
|
||||
"smugglerPlunderHelp": "Leg alle goederen uit het handelshuis terug in de voorraad; ontvang 1 overwinningspunt per goed.",
|
||||
"smugglerPoachHelp": "Neem maximaal 3 overtollige arbeiders en plaats ze onmiddellijk."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Przechowuj automatycznie, gdy wszystko się mieści",
|
||||
"metadata.autoForcedActions": "Automatycznie wykonuj wymuszone ruchy",
|
||||
"metadata.description": "Wybieraj role, rozwijaj wyspę, produkuj towary i wysyłaj je za punkty. Wszystkie sześć rozszerzeń i gra solo przeciwko dwóm Puertomom.",
|
||||
"metadata.rules": "Wybierz rolę: wszyscy wykonują jej akcję, a ty otrzymujesz przywilej. Sadź, werbuj, buduj, produkuj, handluj i wysyłaj. Wygrywa najwięcej punktów za wysyłkę, budynki i premie."
|
||||
"metadata.rules": "Wybierz rolę: wszyscy wykonują jej akcję, a ty otrzymujesz przywilej. Sadź, werbuj, buduj, produkuj, handluj i wysyłaj. Wygrywa najwięcej punktów za wysyłkę, budynki i premie.",
|
||||
"smugglerRaidHelp": "Weź do 3 towarów z jednego statku; resztę zwróć do zasobów.",
|
||||
"smugglerPlunderHelp": "Zwróć wszystkie towary z domu handlowego do zasobów; zdobądź 1 PZ za każdy towar.",
|
||||
"smugglerPoachHelp": "Weź do 3 nadmiarowych robotników i natychmiast ich rozmieść."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Armazenar automaticamente quando tudo couber",
|
||||
"metadata.autoForcedActions": "Jogar automaticamente as jogadas obrigatórias",
|
||||
"metadata.description": "Escolha papéis, desenvolva sua ilha, produza mercadorias e embarque-as por pontos. Inclui as seis expansões e jogo solo contra dois Puertomas.",
|
||||
"metadata.rules": "Escolha um papel: todos realizam a ação e você recebe um privilégio. Plante, recrute, construa, produza, negocie e embarque. Vence quem tiver mais pontos de embarques, edifícios e bônus."
|
||||
"metadata.rules": "Escolha um papel: todos realizam a ação e você recebe um privilégio. Plante, recrute, construa, produza, negocie e embarque. Vence quem tiver mais pontos de embarques, edifícios e bônus.",
|
||||
"smugglerRaidHelp": "Pegue até 3 mercadorias de um navio; devolva o restante à reserva.",
|
||||
"smugglerPlunderHelp": "Devolva todas as mercadorias da casa de comércio à reserva; ganhe 1 PV por mercadoria.",
|
||||
"smugglerPoachHelp": "Pegue até 3 trabalhadores excedentes e coloque-os imediatamente."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Depozitează automat când încape totul",
|
||||
"metadata.autoForcedActions": "Execută automat mutările forțate",
|
||||
"metadata.description": "Alege roluri, dezvoltă insula, produce bunuri și expediază-le pentru puncte. Include toate cele șase extensii și joc solo contra a două Puertoma.",
|
||||
"metadata.rules": "Alege un rol: toți îi efectuează acțiunea, iar tu primești un privilegiu. Plantează, recrutează, construiește, produce, vinde și expediază. Câștigă cele mai multe puncte din expedieri, clădiri și bonusuri."
|
||||
"metadata.rules": "Alege un rol: toți îi efectuează acțiunea, iar tu primești un privilegiu. Plantează, recrutează, construiește, produce, vinde și expediază. Câștigă cele mai multe puncte din expedieri, clădiri și bonusuri.",
|
||||
"smugglerRaidHelp": "Ia până la 3 mărfuri de pe o navă; returnează restul în rezervă.",
|
||||
"smugglerPlunderHelp": "Returnează toate mărfurile din casa de comerț în rezervă; câștigă 1 PV pentru fiecare.",
|
||||
"smugglerPoachHelp": "Ia până la 3 muncitori excedentari și plasează-i imediat."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Хранить автоматически, если всё помещается",
|
||||
"metadata.autoForcedActions": "Автоматически выполнять вынужденные ходы",
|
||||
"metadata.description": "Выбирайте роли, развивайте остров, производите и отправляйте товары за очки. Все шесть дополнений и одиночная игра против двух Пуэртом.",
|
||||
"metadata.rules": "Выберите роль: все выполняют её действие, а вы получаете привилегию. Создавайте плантации, нанимайте, стройте, производите, торгуйте и отправляйте товары. Побеждает набравший больше очков за отправки, здания и бонусы."
|
||||
"metadata.rules": "Выберите роль: все выполняют её действие, а вы получаете привилегию. Создавайте плантации, нанимайте, стройте, производите, торгуйте и отправляйте товары. Побеждает набравший больше очков за отправки, здания и бонусы.",
|
||||
"smugglerRaidHelp": "Возьмите до 3 товаров с одного корабля; остальные верните в запас.",
|
||||
"smugglerPlunderHelp": "Верните все товары из торгового дома в запас; получите по 1 ПО за каждый товар.",
|
||||
"smugglerPoachHelp": "Возьмите до 3 лишних рабочих и сразу разместите их."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "Tự động lưu kho khi đủ chỗ cho tất cả",
|
||||
"metadata.autoForcedActions": "Tự động thực hiện nước đi bắt buộc",
|
||||
"metadata.description": "Chọn vai trò, phát triển đảo, sản xuất và giao hàng lấy điểm. Gồm cả sáu bản mở rộng và chơi đơn với hai Puertoma.",
|
||||
"metadata.rules": "Chọn vai trò: mọi người thực hiện hành động, bạn nhận đặc quyền. Trồng trọt, tuyển người, xây dựng, sản xuất, buôn bán và giao hàng. Ai có nhiều điểm nhất từ giao hàng, tòa nhà và thưởng sẽ thắng."
|
||||
"metadata.rules": "Chọn vai trò: mọi người thực hiện hành động, bạn nhận đặc quyền. Trồng trọt, tuyển người, xây dựng, sản xuất, buôn bán và giao hàng. Ai có nhiều điểm nhất từ giao hàng, tòa nhà và thưởng sẽ thắng.",
|
||||
"smugglerRaidHelp": "Lấy tối đa 3 hàng hóa từ một tàu; trả số còn lại về kho chung.",
|
||||
"smugglerPlunderHelp": "Trả toàn bộ hàng hóa trong nhà buôn về kho chung; nhận 1 điểm chiến thắng cho mỗi hàng hóa.",
|
||||
"smugglerPoachHelp": "Lấy tối đa 3 công nhân dư và bố trí ngay."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -591,5 +591,8 @@
|
|||
"metadata.autoStore": "可全部儲存時自動儲存",
|
||||
"metadata.autoForcedActions": "自動執行唯一可行的行動",
|
||||
"metadata.description": "選擇角色、發展島嶼、生產貨物並運出賺分。包含全部六個擴充,以及對抗兩個 Puertoma 的單人模式。",
|
||||
"metadata.rules": "選擇角色:所有玩家執行其行動,而你獲得特權。開墾、招募、建造、生產、交易及運輸。運輸、建築與獎勵總分最高者獲勝。"
|
||||
"metadata.rules": "選擇角色:所有玩家執行其行動,而你獲得特權。開墾、招募、建造、生產、交易及運輸。運輸、建築與獎勵總分最高者獲勝。",
|
||||
"smugglerRaidHelp": "從一艘船上拿取最多 3 個貨物,其餘貨物放回供應區。",
|
||||
"smugglerPlunderHelp": "將交易所內所有貨物放回供應區,每個貨物獲得 1 勝利點。",
|
||||
"smugglerPoachHelp": "拿取最多 3 名多餘的工人並立即配置。"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2828,3 +2828,6 @@ body:has(.pr-game) {
|
|||
}
|
||||
.pr-game .action-dock .produce-action { flex: 1 1 auto; }
|
||||
}
|
||||
|
||||
.pr-game .action-bonus { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 6px; white-space: nowrap; font-size: .85em; }
|
||||
.pr-game .action-bonus .icon, .pr-game .action-bonus .score-token { width: 20px; height: 20px; }
|
||||
|
|
|
|||
76
viewer/ui.js
76
viewer/ui.js
|
|
@ -1,3 +1,4 @@
|
|||
import { actionBonuses, actionVictoryPoints } from "./action-bonuses.js";
|
||||
import { recruitmentShares, recruitmentBonus } from "./recruitment.js";
|
||||
import { showBuildingPayment } from "./building-payment.js";
|
||||
import { FORCE_DARK_THEME } from "./theme.js";
|
||||
|
|
@ -227,12 +228,32 @@ export function mountGame(
|
|||
const isTurn = () => enabled && seat === state?.tasks[0]?.p;
|
||||
const allowed = () => isTurn() && !pending;
|
||||
const moveButton = (m, label, pictogram, classes = "", description = "") => {
|
||||
const hint =
|
||||
description +
|
||||
(description && m.decline?.length
|
||||
? ` · ${t("withoutBonus")} : ${m.decline.map((id) => t(id)).join(", ")}`
|
||||
: "");
|
||||
return `<button type="button" class="move ${classes}" data-move="${encode(m)}" ${hint ? `title="${esc(hint)}" aria-label="${esc(hint)}"` : ""} ${allowed() || (enabled && !pending && m.type === "bohio") ? "" : "disabled"}>${pictogram ? icon(pictogram, 26) : ""}<span>${label}${m.decline?.length ? `<small>${t("withoutBonus")} · ${m.decline.map((id) => t(id)).join(", ")}</small>` : ""}</span></button>`;
|
||||
const bonuses = actionBonuses(state, seat, m);
|
||||
const bonusTitle = bonuses
|
||||
.map(
|
||||
(b) =>
|
||||
`${t(b.building)}: +${b.vp || b.coins} ${t(b.vp ? "vp" : "coins")}`,
|
||||
)
|
||||
.join(" · ");
|
||||
const smugglerHint = {
|
||||
raid: "smugglerRaidHelp",
|
||||
plunder: "smugglerPlunderHelp",
|
||||
poach: "smugglerPoachHelp",
|
||||
}[m.type];
|
||||
const vp = actionVictoryPoints(state, seat, m);
|
||||
const hint = [
|
||||
description || (smugglerHint ? t(smugglerHint) : ""),
|
||||
vp ? `+${vp} ${t("vp")}` : "",
|
||||
bonusTitle,
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(" · ");
|
||||
const coins = bonuses.reduce((n, b) => n + b.coins, 0);
|
||||
const bonus =
|
||||
vp || coins
|
||||
? `<span class="action-bonus" title="${esc(bonusTitle)}">(+${vp ? metric("vp", vp) : ""}${vp && coins ? " +" : ""}${coins ? metric("coin", coins) : ""})</span>`
|
||||
: "";
|
||||
return `<button type="button" class="move ${classes}" data-move="${encode(m)}" ${hint ? `title="${esc(hint)}" ${description ? `aria-label="${esc(hint)}"` : ""}` : ""} ${allowed() || (enabled && !pending && m.type === "bohio") ? "" : "disabled"}>${pictogram ? icon(pictogram, 26) : ""}<span>${label}${bonus}</span></button>`;
|
||||
};
|
||||
function show(title, html, mode = "") {
|
||||
if (!modal.open) lastFocus = document.activeElement;
|
||||
|
|
@ -366,7 +387,9 @@ export function mountGame(
|
|||
case "zoneSell":
|
||||
return `${t(m.type === "park" ? "park" : "zoneSell")} · ${t(state.players[seat].estates[m.estate].id)}`;
|
||||
case "raid":
|
||||
return `${t("raid")} · ${state.ships[m.ship].capacity} ${metric(state.ships[m.ship].good, m.amount)}`;
|
||||
return `${t("raid")} · ${metric("ship", state.ships[m.ship].capacity)} → ${metric(state.ships[m.ship].good, m.amount)}`;
|
||||
case "plunder":
|
||||
return t("plunder");
|
||||
case "capture":
|
||||
return `${t("capture")} · ${t(m.id)}`;
|
||||
default:
|
||||
|
|
@ -422,7 +445,7 @@ export function mountGame(
|
|||
}
|
||||
case "pension":
|
||||
return [
|
||||
`${metric(m.good, 1)}${arrow}${metric("vp", 1)}`,
|
||||
`${metric(m.good, 1)}${arrow}`,
|
||||
`${t("pensionOffice")} : ${t(m.good)} → 1 ${t("vp")}`,
|
||||
];
|
||||
default:
|
||||
|
|
@ -434,8 +457,8 @@ export function mountGame(
|
|||
(m) =>
|
||||
m.type !== "bohio" &&
|
||||
showBuildingPayment(state.players[seat], m) &&
|
||||
(m.type !== "pass" || m.decline?.length) &&
|
||||
// Zero production has the same bonus choices as passing.
|
||||
m.type !== "pass" &&
|
||||
// Zero production is already available through passing.
|
||||
!(m.type === "produce" && !GOODS.some((g) => m.goods[g])),
|
||||
);
|
||||
}
|
||||
|
|
@ -876,6 +899,9 @@ export function mountGame(
|
|||
}
|
||||
function render(s, awaitingMove = false) {
|
||||
if (s) {
|
||||
// Present the bonus-taking version of every action, including dialogs.
|
||||
// Keep engine support for declined bonuses so historical moves still replay.
|
||||
s = { ...s, legal: s.legal.filter((m) => !m.decline?.length) };
|
||||
state = s.finished
|
||||
? {
|
||||
...s,
|
||||
|
|
@ -957,7 +983,19 @@ export function mountGame(
|
|||
function roleReference(id) {
|
||||
const solo = id === "smuggler" || id.startsWith("adventurer");
|
||||
const privilege = t.rolePrivilege(id);
|
||||
return `<article class="role-reference"><h3>${icon(id.startsWith("adventurer") ? "adventurer" : id, 32)}${t(id)}</h3><div><small>${t(solo ? "chooserOnly" : "everyone")}</small><p>${t.roleActionHtml(id)}</p>${id === "trader" ? `<div class="trade-prices"><small>${t("baseSalePrices")}</small><div>${GOODS.map((good, price) => `<span title="${esc(t(good))}">${icon(good, 22)}${icon("arrow", 14)}${metric("coin", price)}</span>`).join("")}</div></div>` : ""}</div>${privilege ? `<div class="role-privilege"><small>${t(solo ? "roleNote" : "privilege")}</small><p>${t.rolePrivilegeHtml(id)}</p></div>` : ""}</article>`;
|
||||
return `<article class="role-reference"><h3>${icon(id.startsWith("adventurer") ? "adventurer" : id, 32)}${t(id)}</h3><div><small>${t(solo ? "chooserOnly" : "everyone")}</small>${
|
||||
id === "smuggler"
|
||||
? `<ul class="smuggler-effects">${[
|
||||
["raid", "smugglerRaidHelp"],
|
||||
["plunder", "smugglerPlunderHelp"],
|
||||
["poach", "smugglerPoachHelp"],
|
||||
]
|
||||
.map(
|
||||
([action, help]) => `<li><b>${t(action)}</b> — ${t(help)}</li>`,
|
||||
)
|
||||
.join("")}<li><b>${t("capture")}</b></li></ul>`
|
||||
: `<p>${t.roleActionHtml(id)}</p>`
|
||||
}${id === "trader" ? `<div class="trade-prices"><small>${t("baseSalePrices")}</small><div>${GOODS.map((good, price) => `<span title="${esc(t(good))}">${icon(good, 22)}${icon("arrow", 14)}${metric("coin", price)}</span>`).join("")}</div></div>` : ""}</div>${privilege ? `<div class="role-privilege"><small>${t(solo ? "roleNote" : "privilege")}</small><p>${t.rolePrivilegeHtml(id)}</p></div>` : ""}</article>`;
|
||||
}
|
||||
function confirmRole(m) {
|
||||
const warning = state.roleWarnings?.[m.id];
|
||||
|
|
@ -1429,7 +1467,21 @@ export function mountGame(
|
|||
"",
|
||||
)}<button type="submit" class="primary">${t("confirm")}</button></form>`,
|
||||
);
|
||||
body.querySelector("form").onsubmit = (ev) => {
|
||||
const form = body.querySelector("form");
|
||||
const chosenGoods = () =>
|
||||
Object.fromEntries(
|
||||
GOODS.map((g) => [g, Number(new FormData(form).get(g) ?? 0)]),
|
||||
);
|
||||
const updateReward = () => {
|
||||
const goods = chosenGoods();
|
||||
const points = actionVictoryPoints(state, seat, { ...m, goods });
|
||||
const button = form.querySelector('[type="submit"]');
|
||||
button.innerHTML = `${t("confirm")} ${goodsRow(goods)}${points ? ` <span class="action-bonus">(+${metric("vp", points)})</span>` : ""}`;
|
||||
button.disabled = m.type === "smallWharf" && !sum(Object.values(goods));
|
||||
};
|
||||
form.oninput = updateReward;
|
||||
updateReward();
|
||||
form.onsubmit = (ev) => {
|
||||
ev.preventDefault();
|
||||
const data = new FormData(ev.currentTarget),
|
||||
goods = Object.fromEntries(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue