replace cipt check with regex (#5094)

This commit is contained in:
ebbit1q 2024-08-25 02:31:01 +02:00 committed by GitHub
parent 95cd1c6f87
commit bbe125beee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -141,9 +141,9 @@ CardInfoPtr OracleImporter::addCard(QString name,
// DETECT CARD POSITIONING INFO // DETECT CARD POSITIONING INFO
// cards that enter the field tapped // cards that enter the field tapped
bool cipt = text.contains(" it enters the battlefield tapped") || QRegularExpression ciptRegex("( it|" + QRegularExpression::escape(name) +
(text.contains(name + " enters the battlefield tapped") && ") enters( the battlefield)? tapped(?! unless)");
!text.contains(name + " enters the battlefield tapped unless")); bool cipt = ciptRegex.match(text).hasMatch();
// table row // table row
int tableRow = 1; int tableRow = 1;