-
Notifications
You must be signed in to change notification settings - Fork 745
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
Conversation
…een shuffled before its damage step
} | ||
|
||
// Based on PhyrexianVindicatorEffect | ||
class WeepingAngelDamageEffect extends ReplacementEffectImpl { |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
#10653