mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 17:44:01 -07:00
Consider text and name in a special way.
Took 11 minutes
This commit is contained in:
parent
cbd485f13d
commit
ecd3c7b269
1 changed files with 8 additions and 1 deletions
|
|
@ -5,7 +5,14 @@
|
|||
bool cardMatchesCondition(const CardInfo &card, const CardCondition &cond)
|
||||
{
|
||||
CardMatchType type = matchTypeFromString(cond.matchType);
|
||||
QString fieldValue = card.getProperty(cond.field);
|
||||
QString fieldValue;
|
||||
if (cond.field == "name") {
|
||||
fieldValue = card.getName();
|
||||
} else if (cond.field == "text") {
|
||||
fieldValue = card.getText();
|
||||
} else {
|
||||
fieldValue = card.getProperty(cond.field);
|
||||
}
|
||||
|
||||
switch (type) {
|
||||
case CardMatchType::Equals:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue