Add group Expeditions with a Guild board to Sokko TCG
- A player opens a group with one card and a chosen role; others join from the board with a free role, and the creator launches it once enough players are in. - At departure the Veilleur de la Guilde holds empty places without a role, each member rolls their own loot multiplied by the number of players, and distinct collections add a cohesion bonus. - An unlaunched group departs on its own at the end of recruitment with enough players, or dissolves and tells its members; leaving, dissolving and deleted accounts free cards or forfeit shares. - The Guild tile flags joinable groups; Administration › Guilde tunes group places, players, stars, recruitment, loot multipliers, keeper stats, cohesion and the score bonus cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
8bb1d53d70
commit
6b7605d04e
24 changed files with 858 additions and 99 deletions
|
|
@ -1,12 +1,13 @@
|
|||
// Rôle : recense les quêtes que la Guilde des Veilleurs propose au joueur et celles qui l'attendent.
|
||||
// Chaque quête (Carte du jour, Expéditions…) s'ajoute à cette liste avec sa tuile dans GuildPanel.
|
||||
|
||||
// Expéditions en attente : un butin à récupérer, ou aucune expédition lancée aujourd'hui alors que le joueur a de quoi partir.
|
||||
// Au plus un rappel par jour, plus les retours ; un joueur sans cartes jouables n'est jamais sollicité.
|
||||
// Expéditions en attente : un butin à récupérer, un groupe que le joueur peut rejoindre, ou aucune expédition lancée aujourd'hui
|
||||
// alors qu'il a de quoi partir. Au plus un rappel par jour, plus les retours et les groupes ; sans cartes jouables, aucun rappel.
|
||||
export function expeditionsPending(summary, now = Date.now()) {
|
||||
if (!summary) return false;
|
||||
if (summary.returned > 0 || (summary.nextReturnAt != null && summary.nextReturnAt <= now)) return true;
|
||||
return summary.enabled && !summary.running && !summary.launchedToday && summary.eligible >= summary.soloCards;
|
||||
if (summary.joinableGroups > 0) return true;
|
||||
return summary.enabled && !summary.running && !summary.forming && !summary.launchedToday && summary.eligible >= summary.soloCards;
|
||||
}
|
||||
|
||||
// Une quête : identifiant (qui choisit sa tuile), état fourni par le serveur et `pending` tant qu'elle attend le joueur.
|
||||
|
|
@ -15,7 +16,7 @@ export function guildQuests(state, now = Date.now()) {
|
|||
const quests = [];
|
||||
if (state.daily) quests.push({ id: "daily", pending: state.daily.status === "playing", summary: state.daily });
|
||||
const expeditions = state.expeditions;
|
||||
if (expeditions && (expeditions.enabled || expeditions.running || expeditions.returned)) quests.push({ id: "expeditions", pending: expeditionsPending(expeditions, now), summary: expeditions });
|
||||
if (expeditions && (expeditions.enabled || expeditions.running || expeditions.returned || expeditions.forming)) quests.push({ id: "expeditions", pending: expeditionsPending(expeditions, now), summary: expeditions });
|
||||
return quests;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue