mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
[M20] fixed Flood of Tears
This commit is contained in:
parent
d074846386
commit
f264ac5032
1 changed files with 16 additions and 8 deletions
|
@ -27,7 +27,8 @@ public final class FloodOfTears extends CardImpl {
|
|||
public FloodOfTears(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{U}{U}");
|
||||
|
||||
// Return all nonland permanents to their owners' hands. If you return four or more nontoken permanents you control this way, you may put a permanent card from your hand onto the battlefield.
|
||||
// Return all nonland permanents to their owners' hands. If you return four or more nontoken permanents you control this way,
|
||||
// you may put a permanent card from your hand onto the battlefield.
|
||||
this.getSpellAbility().addEffect(new FloodOfTearsEffect());
|
||||
}
|
||||
|
||||
|
@ -45,7 +46,8 @@ class FloodOfTearsEffect extends OneShotEffect {
|
|||
|
||||
FloodOfTearsEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "";
|
||||
staticText = "Return all nonland permanents to their owners' hands. If you return four or more nontoken permanents you control this way,"
|
||||
+ " you may put a permanent card from your hand onto the battlefield.";
|
||||
}
|
||||
|
||||
private FloodOfTearsEffect(final FloodOfTearsEffect effect) {
|
||||
|
@ -67,12 +69,18 @@ class FloodOfTearsEffect extends OneShotEffect {
|
|||
StaticFilters.FILTER_PERMANENT_NON_LAND, source.getControllerId(), source.getSourceId(), game
|
||||
);
|
||||
Cards cards = new CardsImpl();
|
||||
nonlands.stream().forEach(permanent -> cards.add(permanent));
|
||||
boolean putIntoPlay = nonlands.stream().filter(permanent -> !(permanent instanceof Token)).count() > 3;
|
||||
player.moveCards(cards, Zone.HAND, source, game);
|
||||
if (putIntoPlay) {
|
||||
return new PutCardFromHandOntoBattlefieldEffect().apply(game, source);
|
||||
if (cards.size() > 0) {
|
||||
nonlands.stream().forEach(permanent -> cards.add(permanent));
|
||||
boolean putIntoPlay = nonlands.stream()
|
||||
.filter(permanent -> permanent.isControlledBy(player.getId()))
|
||||
.filter(permanent -> !(permanent instanceof Token))
|
||||
.count() > 3;
|
||||
player.moveCards(cards, Zone.HAND, source, game);
|
||||
if (putIntoPlay) {
|
||||
new PutCardFromHandOntoBattlefieldEffect().apply(game, source);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue