mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-03-21 17:55:21 -05:00
replace cipt check with regex (#5094)
This commit is contained in:
parent
95cd1c6f87
commit
bbe125beee
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user