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

[WHO] Implement Weeping Angel #12236

Merged
merged 8 commits into from
May 21, 2024
Merged

Conversation

jimga150
Copy link
Contributor

@jimga150 jimga150 commented May 9, 2024

}

// Based on PhyrexianVindicatorEffect
class WeepingAngelDamageEffect extends ReplacementEffectImpl {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This ideally ought to extend PreventionEffectImpl instead.

(I don't like the code you referenced... there's actually a lot of refactoring cleanup that ought to be done on damage prevention but that would require writing a lot of thorough tests.)

@Override
public boolean replaceEvent(GameEvent event, Ability source, Game game) {
game.preventDamage(event, source, game, Integer.MAX_VALUE);
Card card = game.getCard(event.getTargetId());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure you should be getting Permanent, not Card, since it's on the battlefield.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shuffleCardsToLibrary takes a Card (or Cards)--is this about making sure its also a permanent before shuffling it away?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Permanent extends Card so no issue with that method signature. It's about instanceof checks in zone handling, to perform necessary battlefield-related cleanup.

see #10226 (comment) for example, it can cause phantom image of permanent on the battlefield

Mage.Sets/src/mage/cards/w/WeepingAngel.java Outdated Show resolved Hide resolved
@xenohedron xenohedron merged commit f8a1598 into magefree:master May 21, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants