decks: improved deck import to support unicode card names from LTR, UGL and other sets, added verify tests for name converters (closes #10465)

This commit is contained in:
Oleg Agafonov 2023-06-14 03:16:24 +04:00
parent eebb82c591
commit d91147f01a
3 changed files with 78 additions and 16 deletions

View file

@ -65,6 +65,18 @@ public final class MtgJsonCard {
return getNameAsFace();
}
return asciiName != null ? asciiName : name;
return getNameAsASCII();
}
public String getNameAsUnicode() {
return this.name;
}
public String getNameAsASCII() {
return this.asciiName != null ? this.asciiName : this.name;
}
public boolean isUseUnicodeName() {
return this.asciiName != null && this.name != null && !this.asciiName.equals(this.name);
}
}