mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
Merge branch 'master' of https://github.com/magefree/mage
This commit is contained in:
commit
b7cf08bee4
23 changed files with 1492 additions and 3 deletions
|
|
@ -33,6 +33,7 @@ import mage.abilities.effects.OneShotEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
|
||||
|
|
@ -42,9 +43,16 @@ import mage.players.Player;
|
|||
*/
|
||||
public class ExileGraveyardAllPlayersEffect extends OneShotEffect {
|
||||
|
||||
private final FilterCard filter;
|
||||
|
||||
public ExileGraveyardAllPlayersEffect() {
|
||||
this(new FilterCard("cards"));
|
||||
}
|
||||
|
||||
public ExileGraveyardAllPlayersEffect(FilterCard filter) {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "exile all cards from all graveyards";
|
||||
staticText = "exile all " + filter.getMessage() + " from all graveyards";
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -64,7 +72,7 @@ public class ExileGraveyardAllPlayersEffect extends OneShotEffect {
|
|||
if (player != null) {
|
||||
for (UUID cid : player.getGraveyard().copy()) {
|
||||
Card card = game.getCard(cid);
|
||||
if (card != null) {
|
||||
if (card != null && filter.match(card, game)) {
|
||||
controller.moveCardToExileWithInfo(card, null, "", source.getSourceId(), game, Zone.GRAVEYARD, true);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue