Let expedition and shop cards awaken with duplicates from any collection
Les Carnets des Veilleurs and Poussières d'étoiles do not come from regular openings, so their own duplicates are too rare for awakenings. Their cards now follow the rule of closed collections: duplicates of the same rarity from any collection, at the same count. The balance guide records the reasons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
268e9faa88
commit
6726a59285
10 changed files with 35 additions and 20 deletions
|
|
@ -325,7 +325,7 @@ export function validateSiteContent(site) {
|
|||
"cards.cardSheet.awakenExact",
|
||||
"cards.cardSheet.awakenLegendary",
|
||||
"cards.cardSheet.awakenPoolCount",
|
||||
"cards.cardSheet.awakenClosed",
|
||||
"cards.cardSheet.awakenAnyCollection",
|
||||
"cards.cardSheet.awakenPoolCountAny",
|
||||
"cards.cardSheet.awakenConfirm",
|
||||
"cards.cardSheet.awakenChoose",
|
||||
|
|
|
|||
|
|
@ -848,22 +848,24 @@ test("a card at an awakening tier awakens with its own duplicate or duplicates o
|
|||
assert.deepEqual([mythicAwakened.progress.level, mythicAwakened.progress.power, service.quantityOf(player.id, legendary)], [3, 100, 1]);
|
||||
});
|
||||
|
||||
test("a card of a closed collection awakens with duplicates of its rarity from any collection, at the same count", () => {
|
||||
test("a card of a closed, expedition or shop collection awakens with duplicates of its rarity from any collection, at the same count", () => {
|
||||
const { service, admin, player, open, rares, database } = expeditionService();
|
||||
open();
|
||||
const [card] = rares;
|
||||
const arcade = editionsOf("rare", "dream-arcade")[0];
|
||||
const logbook = editionsOf("legendary", "watchers-logbooks")[0];
|
||||
const shopLegendary = editionsOf("legendary", "stardust")[0];
|
||||
const nebulaLegendary = editionsOf("legendary")[0];
|
||||
const awakeningOf = (editionId) => service.getState(player.id).cardProgress.find((item) => item.editionId === editionId).awakening;
|
||||
// Une rare de la Nébuleuse devant le palier de 70, six rares de l'Arcade en double ; une légendaire des Carnets devant celui de 85.
|
||||
// Une rare de la Nébuleuse devant le palier de 70, six rares de l'Arcade en double ; une légendaire des Carnets et une de la boutique devant celui de 85.
|
||||
database.transaction(() => {
|
||||
for (let count = 0; count < 7; count += 1) service.addCard(player.id, arcade);
|
||||
service.addCard(player.id, logbook);
|
||||
service.addCard(player.id, shopLegendary);
|
||||
service.addCard(player.id, nebulaLegendary);
|
||||
service.addCard(player.id, nebulaLegendary);
|
||||
});
|
||||
database.db.prepare("INSERT INTO card_progress(player_id, edition_id, level, field_xp, updated_at) VALUES (?, ?, 5, 0, 0), (?, ?, 2, 0, 0)").run(player.id, card, player.id, logbook);
|
||||
database.db.prepare("INSERT INTO card_progress(player_id, edition_id, level, field_xp, updated_at) VALUES (?, ?, 5, 0, 0), (?, ?, 2, 0, 0), (?, ?, 2, 0, 0)").run(player.id, card, player.id, logbook, player.id, shopLegendary);
|
||||
assert.deepEqual([awakeningOf(card).anyCollection, awakeningOf(card).candidates], [false, []]);
|
||||
|
||||
// La Nébuleuse fermée, ses paquets ne s'ouvrent plus : les rares de toute collection conviennent, toujours six.
|
||||
|
|
@ -876,8 +878,17 @@ test("a card of a closed collection awakens with duplicates of its rarity from a
|
|||
const awakened = service.expeditions.upgradeCard(player.id, { editionId: card, method: "awaken", editionIds: Array(6).fill(arcade) });
|
||||
assert.deepEqual([awakened.progress.level, awakened.progress.power, service.quantityOf(player.id, arcade)], [6, 70, 1]);
|
||||
|
||||
// Les Carnets des Veilleurs n'ont pas de paquet mais se gagnent toujours en expédition : jamais fermés.
|
||||
assert.deepEqual([awakeningOf(logbook).anyCollection, awakeningOf(logbook).needed, awakeningOf(logbook).candidates], [false, 1, []]);
|
||||
// Les Carnets des Veilleurs (expéditions) et les Scintillants (boutique, même ouverte) ne sortent pas des ouvertures : toute collection
|
||||
// convient, toujours une seule légendaire ; le doublon exact reste accepté.
|
||||
service.setCollectionActive(admin.id, "stardust", true);
|
||||
for (const editionId of [logbook, shopLegendary]) {
|
||||
assert.deepEqual(awakeningOf(editionId), { power: 85, exact: null, anyCollection: true, needed: 1, available: 1, candidates: [{ editionId: nebulaLegendary, spare: 1 }] });
|
||||
}
|
||||
const logbookAwakened = service.expeditions.upgradeCard(player.id, { editionId: logbook, method: "awaken", editionIds: [nebulaLegendary] });
|
||||
assert.deepEqual([logbookAwakened.progress.level, logbookAwakened.progress.power, service.quantityOf(player.id, nebulaLegendary)], [3, 85, 1]);
|
||||
assert.deepEqual([awakeningOf(shopLegendary).anyCollection, awakeningOf(shopLegendary).available], [true, 0]);
|
||||
database.transaction(() => service.addCard(player.id, shopLegendary));
|
||||
assert.equal(awakeningOf(shopLegendary).exact, shopLegendary);
|
||||
database.close();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue