Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up protection (WIP) #9503

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft

Conversation

awjackson
Copy link
Contributor

@awjackson awjackson commented Sep 10, 2022

I've noticed that the existing constructors for ProtectionAbility tempt card implementers into using incorrect filters, specifically FilterPermanent (which is completely wrong for "protection from enchantments", and more subtly wrong for "protection from artifacts" or "protection from creatures"). This PR adds a new ProtectionAbility.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 to CardType (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.

@awjackson
Copy link
Contributor Author

Just pushed Floating Shield into master since it doesn't depend on any of the other changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant