From 060a69301ca1b1a697d7205f80dda8ed351b44ea Mon Sep 17 00:00:00 2001 From: Jason Gessner Date: Thu, 8 Feb 2024 23:51:59 -0600 Subject: [PATCH] Handle flip cards in updateDuplicatePrintings. --- src/updateDuplicatePrintings.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/updateDuplicatePrintings.ts b/src/updateDuplicatePrintings.ts index 82d311af..c00b4389 100644 --- a/src/updateDuplicatePrintings.ts +++ b/src/updateDuplicatePrintings.ts @@ -108,6 +108,11 @@ packsNeedingUpdates.forEach(p => { printing.stripped_title = newCard.stripped_title; printing.text = newCard.text; printing.stripped_text = newCard.stripped_text; + // Note: this only handles single flip cards, not cards with more than 2 faces. + if ('faces' in newCard) { + printing.text = `${printing.text}\nFlip side:\n${newCard.faces[0].text}`; + printing.stripped_text = `${printing.stripped_text} Flip side: ${newCard.faces[0].stripped_text}`; + } } v1.push(printing); });