Fixed NPE on game.getState() usage

This commit is contained in:
Oleg Agafonov 2020-08-26 13:34:08 +04:00
parent cf5b474c29
commit 8ce5c7f907
21 changed files with 97 additions and 83 deletions

View file

@ -27,6 +27,9 @@ public class NamePredicate implements Predicate<MageObject> {
@Override
public boolean apply(MageObject input, Game game) {
if (name == null) {
return false;
}
// If a player names a card, the player may name either half of a split card, but not both.
// A split card has the chosen name if one of its two names matches the chosen name.
if (input instanceof SplitCard) {