mirror of
https://github.com/magefree/mage.git
synced 2026-01-23 03:39:54 -08:00
Minor formatting.
This commit is contained in:
parent
5785c23b4d
commit
8090522e3c
7 changed files with 36 additions and 18 deletions
|
|
@ -28,20 +28,16 @@
|
|||
package mage.sets.magic2014;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.FightTargetsEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Rarity;
|
||||
import mage.constants.TargetController;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.permanent.ControllerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetControlledCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
|
|||
|
|
@ -74,6 +74,11 @@ public class GrislySalvage extends CardImpl<GrislySalvage> {
|
|||
}
|
||||
class GrislySalvageEffect extends OneShotEffect<GrislySalvageEffect> {
|
||||
|
||||
private static final FilterCard filterPutInHand = new FilterCard("creature or land card to put in hand");
|
||||
static {
|
||||
filterPutInHand.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND)));
|
||||
}
|
||||
|
||||
public GrislySalvageEffect() {
|
||||
super(Outcome.DrawCard);
|
||||
this.staticText = "Reveal the top five cards of your library. You may put a creature or land card from among them into your hand. Put the rest into your graveyard";
|
||||
|
|
@ -100,7 +105,7 @@ class GrislySalvageEffect extends OneShotEffect<GrislySalvageEffect> {
|
|||
Card card = player.getLibrary().removeFromTop(game);
|
||||
if (card != null) {
|
||||
cards.add(card);
|
||||
if (card.getCardType().contains(CardType.CREATURE) || card.getCardType().contains(CardType.LAND)) {
|
||||
if (filterPutInHand.match(card, source.getSourceId(), source.getControllerId(), game)) {
|
||||
properCardFound = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -108,9 +113,7 @@ class GrislySalvageEffect extends OneShotEffect<GrislySalvageEffect> {
|
|||
|
||||
if (!cards.isEmpty()) {
|
||||
player.revealCards("Grisly Salvage", cards, game);
|
||||
FilterCard filter = new FilterCard("creature or land card to put in hand");
|
||||
filter.add(Predicates.or(new CardTypePredicate(CardType.CREATURE), new CardTypePredicate(CardType.LAND)));
|
||||
TargetCard target = new TargetCard(Zone.PICK, filter);
|
||||
TargetCard target = new TargetCard(Zone.PICK, filterPutInHand);
|
||||
if (properCardFound && player.choose(Outcome.DrawCard, cards, target, game)) {
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
if (card != null) {
|
||||
|
|
@ -131,4 +134,4 @@ class GrislySalvageEffect extends OneShotEffect<GrislySalvageEffect> {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue