Keep risk alive with the Talisman and the treasure map, and add an Adaptation power for weak stats

- The Talisman turns a near miss into a Réussite only from a 60 % score, still without Triomphe, so a weak team can fail and the Mad compass keeps its risk.
- The treasure map brings its rare object back only from a successful expedition.
- Adaptation, a power for a future common, adds 4 points to its card's weakest stat among those the destination requires, chosen for each destination.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Shinuwa 2026-11-18 22:27:27 +01:00
parent ea5f5c9a51
commit feeab57711
11 changed files with 70 additions and 21 deletions

View file

@ -271,6 +271,7 @@ export function validateSiteContent(site) {
"cards.expeditions.powers.starNet",
"cards.expeditions.powers.stormLantern",
"cards.expeditions.powers.fogBell",
"cards.expeditions.powers.attunement",
"cards.cardSheet.tabs.card",
"cards.cardSheet.tabs.improve",
"cards.cardSheet.owned",
@ -342,6 +343,7 @@ export function validateSiteContent(site) {
"cards.expeditions.powerText.starNet",
"cards.expeditions.powerText.stormLantern",
"cards.expeditions.powerText.fogBell",
"cards.expeditions.powerText.attunement",
"cards.expeditions.hiddenRequirements",
"cards.expeditions.requirementFactor",
"cards.expeditions.requirementsUncertain",

View file

@ -1133,6 +1133,18 @@ test("the Carnets des Veilleurs never come from packs, and their cards only drop
assert.ok(service.quantityOf(player.id, logbooksOf(reward.cards)[0]) >= 1);
});
test("a treasure map brings its rare object back only from a successful expedition", () => {
const { service, open } = expeditionService();
open();
const settings = service.expeditions.settings;
const expected = { eclats: 0, stardust: 0, cards: 0, objects: 0 };
const hidden = ["fragment", "engraving", "plan"];
const won = service.expeditions.rollReward(expected, settings, { powers: ["treasureMap"], tier: "success" });
assert.equal(won.items.length, 1);
assert.ok(hidden.includes(won.items[0]));
assert.deepEqual(service.expeditions.rollReward(expected, settings, { powers: ["treasureMap"], tier: "struggle" }).items, []);
});
test("power commons equip one per card, change travel time and hide requirements, and the workshop crafts them", () => {
const { service, player, open, rares, database } = expeditionService();
open();

View file

@ -483,10 +483,17 @@ test("powers trade an advantage for a cost and count once per team", () => {
const evaluate = (powers, stats) => evaluateTeam({ destination, entry, stars: 2, durationIndex: 0, slots: [{ ...slot(), stats }, { ...slot(), stats }], powers }, settings);
const weak = { bravoure: 1, endurance: 1, fortune: 1, orientation: 1 };
const strong = { bravoure: 90, endurance: 90, fortune: 90, orientation: 90 };
// Talisman : ni échec ni triomphe.
// Talisman : un Retour difficile de justesse (score d'au moins 60 %) devient une Réussite, un échec net le reste ; jamais de Triomphe.
const close = { bravoure: 8, endurance: 8, fortune: 8, orientation: 8 };
assert.ok(evaluate([], close).scorePct >= settings.powers.talismanFloorPct && evaluate([], close).tier === "struggle");
assert.equal(evaluate(["talisman"], close).tier, "success");
assert.equal(evaluate([], weak).tier, "struggle");
assert.equal(evaluate(["talisman"], weak).tier, "success");
assert.equal(evaluate(["talisman"], weak).tier, "struggle");
assert.equal(evaluate(["talisman"], strong).tier, "success");
// Adaptation : +4 sur la stat exigée la plus faible de la carte qui le porte, choisie pour la destination.
const attuned = evaluateTeam({ destination, entry, stars: 2, durationIndex: 0, slots: [{ ...slot(["attunement"]), stats: { bravoure: 10, endurance: 10, fortune: 10, orientation: 10, [destination.stats[1]]: 6 } }] }, settings);
assert.deepEqual(attuned.attunement.map((item) => item.stat), [destination.stats[1]]);
assert.equal(attuned.baseStats[destination.stats[1]], 10);
// Carte au trésor : une part du score en moins ; Filet : un peu de Fortune en moins.
const plain = evaluate([], { bravoure: 10, endurance: 10, fortune: 10, orientation: 10 });
assert.ok(Math.abs(evaluate(["treasureMap"], { bravoure: 10, endurance: 10, fortune: 10, orientation: 10 }).scorePct - plain.scorePct * 0.9) < 1e-9);