add test for Role token not created if target has protection (#11281)

This commit is contained in:
xenohedron 2023-10-08 17:53:33 -04:00 committed by GitHub
parent 2d9f29b60e
commit 1a6bbfa873
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 4 deletions

View file

@ -39,7 +39,7 @@ public class CreateRoleAttachedTargetEffect extends OneShotEffect {
}
Token token = roleType.createToken(permanent, game, source);
// The token may not be created, for instance if the creature has protection from enchantments.
return token.getLastAddedTokenIds().size() > 0;
return !token.getLastAddedTokenIds().isEmpty();
}
@Override