Skip to content

Commit

Permalink
Merge pull request #811 from plural/handle-flips-in-update-duplicate-…
Browse files Browse the repository at this point in the history
…printings

Handle flip cards in updateDuplicatePrintings.
  • Loading branch information
plural authored Feb 9, 2024
2 parents aac0af4 + 060a693 commit 72ef164
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/updateDuplicatePrintings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand Down

0 comments on commit 72ef164

Please sign in to comment.