Cross out the tourist action when its supply is empty
This commit is contained in:
parent
c8526548f0
commit
3e81a38088
19 changed files with 97 additions and 21 deletions
|
|
@ -104,7 +104,7 @@ for (const locale of [
|
|||
.locator(".action-dock [data-action]")
|
||||
.evaluateAll((buttons) => buttons.map((button) => button.title));
|
||||
assert.equal(titles.length, 9);
|
||||
for (const title of titles) {
|
||||
for (const title of titles.flatMap((text) => text.split("\n"))) {
|
||||
assert.ok(
|
||||
Object.values(catalog).includes(title),
|
||||
`${locale}: tooltip must come from its catalogue`,
|
||||
|
|
@ -340,6 +340,35 @@ assert.equal(
|
|||
);
|
||||
for (const width of [1440, 390]) {
|
||||
await page.setViewportSize({ width, height: width === 390 ? 844 : 1000 });
|
||||
// An empty supply blocks transport, but must not prevent retrieving markers.
|
||||
const noTourists = actionState();
|
||||
noTourists.tourists = 0;
|
||||
noTourists.players[0].markers = Object.fromEntries(
|
||||
E.ACTIONS.map((action) => [action, action === "tourist" ? 1 : 0]),
|
||||
);
|
||||
noTourists.players[1].markers.rest = 1;
|
||||
await page.evaluate((s) => window.vanuatuDemo.setState(s), noTourists);
|
||||
const touristAction = page.locator('[data-action="tourist"]');
|
||||
assert.match(
|
||||
await touristAction.getAttribute("title"),
|
||||
/No tourists available this round/,
|
||||
);
|
||||
await touristAction.click();
|
||||
assert.equal(await page.locator(".cell-highlight.legal").count(), 0);
|
||||
await page.locator(".action-dock").screenshot({
|
||||
path: `.local/qa/tourists-empty-${width}.png`,
|
||||
});
|
||||
await page.locator(".turn-tray .retrieve-warning").click();
|
||||
assert.equal(
|
||||
await page.evaluate(
|
||||
() => window.vanuatuDemo.state.players[0].markers.tourist,
|
||||
),
|
||||
0,
|
||||
);
|
||||
await page.evaluate((s) => window.vanuatuDemo.setState(s), actionState());
|
||||
await touristAction.click();
|
||||
assert.equal(await page.locator(".action-dock .supply-empty").count(), 0);
|
||||
assert.ok((await page.locator(".cell-highlight.legal").count()) > 0);
|
||||
for (const [index, good] of E.GOODS.entries()) {
|
||||
const s = actionState();
|
||||
s.demands = [{ id: 1, goods: [...E.GOODS], filled: [false, false, false] }];
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Afslut runden",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "Den sidste stak tillod ingen handling og blev derfor taget tilbage automatisk. Hvilebonusserne er nu udbetalt; Mayas startspillerbrik lader hende starte næste runde.",
|
||||
"A complete round": "En hel runde",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Du spillede en hel runde: Hvile → Fiskeri → Salg og tog derefter to ubrugelige stakke tilbage. Din hvilebonus er udbetalt. Planlæg alternativer: en markør reserverer hverken en handling, dens ressourcer eller dens plads i rækkefølgen."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Du spillede en hel runde: Hvile → Fiskeri → Salg og tog derefter to ubrugelige stakke tilbage. Din hvilebonus er udbetalt. Planlæg alternativer: en markør reserverer hverken en handling, dens ressourcer eller dens plads i rækkefølgen.",
|
||||
"No tourists available this round.": "Ingen turister til rådighed i denne runde."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Beende die Runde",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "Der letzte Stapel erlaubte keine Aktion und wurde automatisch zurückgenommen. Die Ruheboni werden ausgezahlt; Mayas Startspieler-Plättchen lässt sie die nächste Runde beginnen.",
|
||||
"A complete round": "Eine ganze Runde",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Du hast eine ganze Runde gespielt: Ausruhen → Fischen → Verkaufen, dann zwei unbrauchbare Stapel zurückgenommen. Dein Ruhebonus ist ausgezahlt. Plane Alternativen: Ein Marker reserviert weder eine Aktion noch ihre Ressourcen oder ihre Position in deiner Reihenfolge."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Du hast eine ganze Runde gespielt: Ausruhen → Fischen → Verkaufen, dann zwei unbrauchbare Stapel zurückgenommen. Dein Ruhebonus ist ausgezahlt. Plane Alternativen: Ein Marker reserviert weder eine Aktion noch ihre Ressourcen oder ihre Position in deiner Reihenfolge.",
|
||||
"No tourists available this round.": "In dieser Runde sind keine Touristen verfügbar."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Ολοκληρώστε τον γύρο",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "Η τελευταία στοίβα δεν επέτρεπε καμία ενέργεια και ανακτήθηκε αυτόματα. Τα μπόνους Ανάπαυσης αποδόθηκαν· το πλακίδιο Πρώτου παίκτη της Maya την κάνει να αρχίσει τον επόμενο γύρο.",
|
||||
"A complete round": "Ένας ολόκληρος γύρος",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Παίξατε ολόκληρο γύρο: Ανάπαυση → Ψάρεμα → Πώληση και ανακτήσατε δύο άχρηστες στοίβες. Το μπόνους Ανάπαυσης αποδόθηκε. Σχεδιάστε εναλλακτικές: ένας δείκτης δεν δεσμεύει ενέργεια, πόρους ή θέση στην ακολουθία σας."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Παίξατε ολόκληρο γύρο: Ανάπαυση → Ψάρεμα → Πώληση και ανακτήσατε δύο άχρηστες στοίβες. Το μπόνους Ανάπαυσης αποδόθηκε. Σχεδιάστε εναλλακτικές: ένας δείκτης δεν δεσμεύει ενέργεια, πόρους ή θέση στην ακολουθία σας.",
|
||||
"No tourists available this round.": "Δεν υπάρχουν διαθέσιμοι τουρίστες σε αυτόν τον γύρο."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Finish the round",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.",
|
||||
"A complete round": "A complete round",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.",
|
||||
"No tourists available this round.": "No tourists available this round."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "دور را تمام کنید",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "آخرین دسته هیچ اقدام ممکنی نداشت، پس خودکار پس گرفته شد. پاداشهای استراحت پرداخت شدند؛ توکن بازیکن اول مایا باعث میشود او دور بعد را آغاز کند.",
|
||||
"A complete round": "یک دور کامل",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "یک دور کامل بازی کردید: استراحت، سپس ماهیگیری و فروش، و بعد پس گرفتن دو دستهٔ بیاستفاده. پاداش استراحت پرداخت شد. گزینههای جایگزین داشته باشید: نشانگر، اقدام یا منابع یا جای آن در ترتیب شما را رزرو نمیکند."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "یک دور کامل بازی کردید: استراحت، سپس ماهیگیری و فروش، و بعد پس گرفتن دو دستهٔ بیاستفاده. پاداش استراحت پرداخت شد. گزینههای جایگزین داشته باشید: نشانگر، اقدام یا منابع یا جای آن در ترتیب شما را رزرو نمیکند.",
|
||||
"No tourists available this round.": "در این دور هیچ گردشگری در دسترس نیست."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Terminez la manche",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "La dernière pile ne permettait aucune action : elle a donc été retirée automatiquement. Les bonus Repos sont versés ; le jeton Premier joueur de Maya lui fera commencer la prochaine manche.",
|
||||
"A complete round": "Une manche complète",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Vous avez joué une manche entière : Se reposer → Pêcher → Vendre, puis retiré deux piles inutilisables. Votre bonus Repos est versé. Prévoyez des alternatives utiles : un marqueur ne réserve ni une action, ni ses ressources, ni sa place dans votre enchaînement."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Vous avez joué une manche entière : Se reposer → Pêcher → Vendre, puis retiré deux piles inutilisables. Votre bonus Repos est versé. Prévoyez des alternatives utiles : un marqueur ne réserve ni une action, ni ses ressources, ni sa place dans votre enchaînement.",
|
||||
"No tourists available this round.": "Aucun touriste disponible pour cette manche."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "राउंड पूरा करें",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "आखिरी ढेर से कोई क्रिया संभव नहीं थी, इसलिए वह अपने-आप वापस आ गया। आराम के बोनस मिल गए हैं; माया का पहला खिलाड़ी टोकन उसे अगला राउंड शुरू करने देगा।",
|
||||
"A complete round": "एक पूरा राउंड",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "आपने पूरा राउंड खेला: आराम → मछली पकड़ना → बेचना, फिर दो अनुपयोगी ढेर वापस लिए। आराम का बोनस मिल गया है। उपयोगी विकल्प रखें: मार्कर किसी क्रिया, उसके संसाधनों या उसके क्रम को आरक्षित नहीं करता।"
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "आपने पूरा राउंड खेला: आराम → मछली पकड़ना → बेचना, फिर दो अनुपयोगी ढेर वापस लिए। आराम का बोनस मिल गया है। उपयोगी विकल्प रखें: मार्कर किसी क्रिया, उसके संसाधनों या उसके क्रम को आरक्षित नहीं करता।",
|
||||
"No tourists available this round.": "इस दौर में कोई पर्यटक उपलब्ध नहीं है।"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Termina il round",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "L'ultima pila non permetteva alcuna azione, quindi è stata ritirata automaticamente. I bonus Riposo vengono assegnati; il gettone Primo giocatore di Maya le farà iniziare il prossimo round.",
|
||||
"A complete round": "Un round completo",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Hai giocato un round intero: Riposare → Pescare → Vendere, poi hai ritirato due pile inutilizzabili. Il bonus Riposo è stato assegnato. Prevedi alternative: un segnalino non riserva un'azione, le sue risorse o il suo posto nella sequenza."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Hai giocato un round intero: Riposare → Pescare → Vendere, poi hai ritirato due pile inutilizzabili. Il bonus Riposo è stato assegnato. Prevedi alternative: un segnalino non riserva un'azione, le sue risorse o il suo posto nella sequenza.",
|
||||
"No tourists available this round.": "Nessun turista disponibile in questo round."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "라운드를 마치세요",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "마지막 더미로 가능한 행동이 없으므로 자동으로 회수됐습니다. 휴식 보너스가 지급됐으며 선 플레이어 토큰을 가진 Maya가 다음 라운드를 시작합니다.",
|
||||
"A complete round": "한 라운드 완료",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "휴식 → 낚시 → 판매 후 사용할 수 없는 두 더미를 회수하며 한 라운드를 마쳤습니다. 휴식 보너스도 받았습니다. 대안을 준비하세요. 마커는 행동, 자원, 실행 순서를 예약하지 않습니다."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "휴식 → 낚시 → 판매 후 사용할 수 없는 두 더미를 회수하며 한 라운드를 마쳤습니다. 휴식 보너스도 받았습니다. 대안을 준비하세요. 마커는 행동, 자원, 실행 순서를 예약하지 않습니다.",
|
||||
"No tourists available this round.": "이번 라운드에 남은 관광객이 없습니다."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Rond de ronde af",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "De laatste stapel had geen mogelijke actie en werd automatisch teruggenomen. De rustbonussen zijn nu toegekend; dankzij haar startspelertoken begint Maya de volgende ronde.",
|
||||
"A complete round": "Een volledige ronde",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Je speelde een hele ronde: Rusten → Vissen → Verkopen, daarna nam je twee onbruikbare stapels terug. Je rustbonus is toegekend. Plan alternatieven: een marker reserveert geen actie, grondstoffen of plek in je volgorde."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Je speelde een hele ronde: Rusten → Vissen → Verkopen, daarna nam je twee onbruikbare stapels terug. Je rustbonus is toegekend. Plan alternatieven: een marker reserveert geen actie, grondstoffen of plek in je volgorde.",
|
||||
"No tourists available this round.": "Deze ronde zijn er geen toeristen beschikbaar."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Zakończ rundę",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "Ostatni stos nie umożliwiał żadnej akcji, więc zabrano go automatycznie. Premie Odpoczynku zostały wypłacone; żeton Pierwszego gracza pozwoli Mayi rozpocząć kolejną rundę.",
|
||||
"A complete round": "Cała runda",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Rozegrałeś całą rundę: Odpoczynek → Łowienie → Sprzedaż, potem zabrałeś dwa bezużyteczne stosy. Premia Odpoczynku została wypłacona. Planuj alternatywy: znacznik nie rezerwuje akcji, jej zasobów ani miejsca w kolejności."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Rozegrałeś całą rundę: Odpoczynek → Łowienie → Sprzedaż, potem zabrałeś dwa bezużyteczne stosy. Premia Odpoczynku została wypłacona. Planuj alternatywy: znacznik nie rezerwuje akcji, jej zasobów ani miejsca w kolejności.",
|
||||
"No tourists available this round.": "W tej rundzie nie ma dostępnych turystów."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Termine a rodada",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "A última pilha não permitia nenhuma ação e foi retirada automaticamente. Os bônus de descanso foram pagos; a ficha de Primeiro jogador de Maya faz com que ela comece a próxima rodada.",
|
||||
"A complete round": "Uma rodada completa",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Você jogou uma rodada inteira: Descansar → Pescar → Vender, depois retirou duas pilhas inutilizáveis. Seu bônus de descanso foi pago. Planeje alternativas: um marcador não reserva uma ação, seus recursos ou sua posição na sequência."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Você jogou uma rodada inteira: Descansar → Pescar → Vender, depois retirou duas pilhas inutilizáveis. Seu bônus de descanso foi pago. Planeje alternativas: um marcador não reserva uma ação, seus recursos ou sua posição na sequência.",
|
||||
"No tourists available this round.": "Nenhum turista disponível nesta rodada."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Încheie runda",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "Ultimul teanc nu permitea nicio acțiune, așa că a fost retras automat. Bonusurile de Odihnă sunt acordate; jetonul Primul jucător al Mayei o face să înceapă runda următoare.",
|
||||
"A complete round": "O rundă completă",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Ai jucat o rundă întreagă: Odihnă → Pescuit → Vânzare, apoi ai retras două teancuri inutilizabile. Bonusul de Odihnă este acordat. Planifică alternative: un jeton nu rezervă o acțiune, resursele ei sau locul ei în secvență."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Ai jucat o rundă întreagă: Odihnă → Pescuit → Vânzare, apoi ai retras două teancuri inutilizabile. Bonusul de Odihnă este acordat. Planifică alternative: un jeton nu rezervă o acțiune, resursele ei sau locul ei în secvență.",
|
||||
"No tourists available this round.": "Nu sunt turiști disponibili în această rundă."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Завершите раунд",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "Последняя стопка не позволяла выполнить действие и была убрана автоматически. Бонусы Отдыха выплачены; жетон Первого игрока Майи позволит ей начать следующий раунд.",
|
||||
"A complete round": "Полный раунд",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Вы сыграли весь раунд: Отдых → Рыбалка → Продажа, затем забрали две бесполезные стопки. Бонус Отдыха выплачен. Планируйте альтернативы: маркер не резервирует действие, его ресурсы или место в вашей цепочке."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Вы сыграли весь раунд: Отдых → Рыбалка → Продажа, затем забрали две бесполезные стопки. Бонус Отдыха выплачен. Планируйте альтернативы: маркер не резервирует действие, его ресурсы или место в вашей цепочке.",
|
||||
"No tourists available this round.": "В этом раунде нет доступных туристов."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "Kết thúc vòng",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "Chồng dấu cuối không có hành động khả thi nên được thu tự động. Thưởng Nghỉ ngơi đã được trao; thẻ Người đi đầu của Maya giúp cô ấy bắt đầu vòng tiếp theo.",
|
||||
"A complete round": "Một vòng hoàn chỉnh",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Bạn đã chơi trọn vòng: Nghỉ ngơi → Câu cá → Bán, rồi thu hai chồng dấu không dùng được. Thưởng Nghỉ ngơi đã được trao. Hãy có phương án khác: dấu không giữ trước hành động, tài nguyên hay thứ tự thực hiện."
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "Bạn đã chơi trọn vòng: Nghỉ ngơi → Câu cá → Bán, rồi thu hai chồng dấu không dùng được. Thưởng Nghỉ ngơi đã được trao. Hãy có phương án khác: dấu không giữ trước hành động, tài nguyên hay thứ tự thực hiện.",
|
||||
"No tourists available this round.": "Không còn khách du lịch trong vòng này."
|
||||
}
|
||||
|
|
|
|||
|
|
@ -891,5 +891,6 @@
|
|||
"Finish the round": "完成這個回合",
|
||||
"The last stack had no possible action, so it was retrieved automatically. Rest bonuses are now paid; Maya's First player token makes her start the next round.": "最後一堆標記沒有可執行的行動,因此自動收回。休息獎勵已發放;Maya 的起始玩家標記讓她開始下一回合。",
|
||||
"A complete round": "一個完整回合",
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "你玩完了一整個回合:休息 → 捕魚 → 賣魚,接著收回兩堆無法使用的標記。休息獎勵已發放。規劃有用的替代方案:標記不會預留行動、資源或執行順序。"
|
||||
"You played a whole round: Rest → Fish → Sell, then retrieved two unusable stacks. Your Rest bonus is now paid. Plan useful alternatives: a marker does not reserve an action, its resources or its place in your sequence.": "你玩完了一整個回合:休息 → 捕魚 → 賣魚,接著收回兩堆無法使用的標記。休息獎勵已發放。規劃有用的替代方案:標記不會預留行動、資源或執行順序。",
|
||||
"No tourists available this round.": "本回合沒有可用的遊客。"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -219,6 +219,27 @@
|
|||
height: 30px;
|
||||
width: 30px;
|
||||
}
|
||||
.vanuatu .action-dock .supply-empty .action-symbol {
|
||||
position: relative;
|
||||
}
|
||||
.vanuatu .action-dock .supply-empty .action-symbol::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 50%;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
border-radius: 2px;
|
||||
background: #963f35;
|
||||
box-shadow: 0 0 0 1px #fcf8e9;
|
||||
transform: rotate(-45deg);
|
||||
pointer-events: none;
|
||||
}
|
||||
.vanuatu .action-dock .supply-empty .action-label {
|
||||
text-decoration: line-through;
|
||||
text-decoration-thickness: 2px;
|
||||
text-decoration-color: #963f35;
|
||||
}
|
||||
.vanuatu .action-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
|||
18
viewer/ui.js
18
viewer/ui.js
|
|
@ -262,6 +262,7 @@ export function mountGame(target, options = {}) {
|
|||
const planning = ["plan", "neutral"].includes(s.phase) && working().length;
|
||||
return `<nav class="action-dock" aria-label="${t("actions")}">${ACTIONS.map(
|
||||
(a) => {
|
||||
const emptySupply = a === "tourist" && s.tourists === 0;
|
||||
const countDraft = draft.filter((x) => x === a).length;
|
||||
const allowed = planning
|
||||
? working().some((m) =>
|
||||
|
|
@ -292,8 +293,9 @@ export function mountGame(target, options = {}) {
|
|||
s.phase === "plan" &&
|
||||
!allowed &&
|
||||
draft.length < (s.planningPass === 2 ? 1 : 2));
|
||||
const hint =
|
||||
explain && s.phase === "actions"
|
||||
const hint = emptySupply
|
||||
? "No tourists available this round."
|
||||
: explain && s.phase === "actions"
|
||||
? blockingText(s, player, a, lang)
|
||||
: explain
|
||||
? ({
|
||||
|
|
@ -306,6 +308,14 @@ export function mountGame(target, options = {}) {
|
|||
}[a] ??
|
||||
"This action is not possible with your current resources and planned actions. Plan its prerequisites first.")
|
||||
: "";
|
||||
const help = [
|
||||
translateText(actionHelp[a], lang),
|
||||
hint && translateText(hint, lang),
|
||||
retrieveOnly && translateText("Retrieve without acting", lang),
|
||||
retrieveOnly && blockingText(s, player, a, lang),
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join("\n");
|
||||
const stacks = s.players
|
||||
.map((p, i) =>
|
||||
p.markers[a]
|
||||
|
|
@ -315,8 +325,8 @@ export function mountGame(target, options = {}) {
|
|||
.join("");
|
||||
return btn(
|
||||
`<span class="action-symbol">${icon(a)}</span><span class="action-content"><span class="action-label">${t(a)}</span><span class="action-stacks">${stacks}${retrieveOnly ? `<span class="retrieve-only-icon">${icon("warning", "Retrieve without acting")}</span>` : ""}${s.neutral[a] ? `<span class="marker-stack neutral" title="${"Neutral markers"}">${s.neutral[a]}</span>` : ""}${countDraft ? `<span class="draft-marker" title="${"Markers being placed"}">+${countDraft}</span>` : ""}</span></span>`,
|
||||
`data-action="${a}" title="${esc(translateText(actionHelp[a], lang) + (retrieveOnly ? "\n" + translateText("Retrieve without acting", lang) + "\n" + blockingText(s, player, a, lang) : hint ? "\n" + translateText(hint, lang) : ""))}" ${allowed ? "" : explain ? `aria-disabled="true" data-unavailable="${esc(hint)}"` : "disabled"} aria-pressed="${action === a}"`,
|
||||
`${action === a ? "chosen" : ""} ${allowed ? "available" : ""} ${retrieveOnly ? "retrieve-only" : ""}`,
|
||||
`data-action="${a}" title="${esc(help)}" ${allowed ? "" : explain ? `aria-disabled="true" data-unavailable="${esc(hint)}"` : "disabled"} aria-pressed="${action === a}"`,
|
||||
`${action === a ? "chosen" : ""} ${allowed ? "available" : ""} ${retrieveOnly ? "retrieve-only" : ""} ${emptySupply ? "supply-empty" : ""}`,
|
||||
);
|
||||
},
|
||||
).join("")}</nav>`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue