Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle flip cards in updateDuplicatePrintings. #811

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading