improvements for alternate state cards in editors (desktop)

This commit is contained in:
Bug Hunter
2021-01-31 05:13:09 +00:00
committed by Michael Kamensky
parent fcbafef37f
commit cb6d39231d
5 changed files with 36 additions and 5 deletions

View File

@@ -350,7 +350,11 @@ public final class CardRulesPredicates {
boolean shouldContain;
switch (this.field) {
case NAME:
return op(card.getName(), this.operand);
boolean otherName = false;
if (card.getOtherPart() != null) {
otherName = op(card.getOtherPart().getName(), this.operand);
}
return otherName || op(card.getName(), this.operand);
case SUBTYPE:
shouldContain = (this.getOperator() == StringOp.CONTAINS) || (this.getOperator() == StringOp.EQUALS);
return shouldContain == card.getType().hasSubtype(this.operand);