mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07: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:
parent
068465143b
commit
3a11ccb854
7 changed files with 305 additions and 3 deletions
|
|
@ -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" ||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue