mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-01-25 19:04:48 -08:00
Update cipt parsing (#5712)
* refactor * move thing out * write unit tests * get thing to work * optimization? * fix build failure
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "oracleimporter.h"
|
||||
|
||||
#include "game/cards/card_database_parser/cockatrice_xml_4.h"
|
||||
#include "parsehelpers.h"
|
||||
#include "qt-json/json.h"
|
||||
|
||||
#include <QDebug>
|
||||
@@ -157,9 +158,7 @@ CardInfoPtr OracleImporter::addCard(QString name,
|
||||
// DETECT CARD POSITIONING INFO
|
||||
|
||||
// cards that enter the field tapped
|
||||
QRegularExpression ciptRegex("( it|" + QRegularExpression::escape(name) +
|
||||
") enters( the battlefield)? tapped(?! unless)");
|
||||
bool cipt = ciptRegex.match(text).hasMatch();
|
||||
bool cipt = parseCipt(name, text);
|
||||
|
||||
bool landscapeOrientation = properties.value("maintype").toString() == "Battle" ||
|
||||
properties.value("layout").toString() == "split" ||
|
||||
|
||||
Reference in New Issue
Block a user