Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've noticed that the existing constructors for
ProtectionAbility
tempt card implementers into using incorrect filters, specificallyFilterPermanent
(which is completely wrong for "protection from enchantments", and more subtly wrong for "protection from artifacts" or "protection from creatures"). This PR adds a newProtectionAbility.from
helper for card types (and, when it is done, will also add one for subtypes) that will generate an appropriate filter. To do this, I needed to add a plural String field toCardType
(which I think is useful to have anyway).I also intend to clean up the various Effect classes (both common and per-card) that temporarily give protection to something, since many of them seem to be excessively convoluted. See Wishmonger for an example.
This PR also implements the missing TOR card Floating Shield.