mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-26 11:24:53 -08:00
replace cipt check with regex (#5094)
This commit is contained in:
@@ -141,9 +141,9 @@ CardInfoPtr OracleImporter::addCard(QString name,
|
||||
// DETECT CARD POSITIONING INFO
|
||||
|
||||
// cards that enter the field tapped
|
||||
bool cipt = text.contains(" it enters the battlefield tapped") ||
|
||||
(text.contains(name + " enters the battlefield tapped") &&
|
||||
!text.contains(name + " enters the battlefield tapped unless"));
|
||||
QRegularExpression ciptRegex("( it|" + QRegularExpression::escape(name) +
|
||||
") enters( the battlefield)? tapped(?! unless)");
|
||||
bool cipt = ciptRegex.match(text).hasMatch();
|
||||
|
||||
// table row
|
||||
int tableRow = 1;
|
||||
|
||||
Reference in New Issue
Block a user