mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Windgrace's Judgment
This commit is contained in:
parent
e70b1fadbe
commit
a66df1082f
2 changed files with 61 additions and 0 deletions
60
Mage.Sets/src/mage/cards/w/WindgracesJudgment.java
Normal file
60
Mage.Sets/src/mage/cards/w/WindgracesJudgment.java
Normal file
|
@ -0,0 +1,60 @@
|
|||
package mage.cards.w;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.filter.common.FilterNonlandPermanent;
|
||||
import mage.filter.predicate.permanent.ControllerIdPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class WindgracesJudgment extends CardImpl {
|
||||
|
||||
public WindgracesJudgment(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{B}{G}");
|
||||
|
||||
// For any number of opponents, destroy target nonland permanent that player controls.
|
||||
this.getSpellAbility().addEffect(
|
||||
new DestroyTargetEffect().
|
||||
setText("For any number of opponents, "
|
||||
+ "destroy target nonland permanent "
|
||||
+ "that player controls")
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void adjustTargets(Ability ability, Game game) {
|
||||
if (ability instanceof SpellAbility) {
|
||||
ability.getTargets().clear();
|
||||
game.getOpponents(ability.getControllerId()).forEach(playerId -> {
|
||||
Player player = game.getPlayer(playerId);
|
||||
if (player != null) {
|
||||
FilterNonlandPermanent filter = new FilterNonlandPermanent(
|
||||
"nonland permanent controlled by "
|
||||
+ player.getLogName()
|
||||
);
|
||||
filter.add(new ControllerIdPredicate(playerId));
|
||||
ability.addTarget(new TargetPermanent(0, 1, filter, false));
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public WindgracesJudgment(final WindgracesJudgment card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WindgracesJudgment copy() {
|
||||
return new WindgracesJudgment(this);
|
||||
}
|
||||
}
|
|
@ -98,6 +98,7 @@ public final class Commander2018 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Varchild, Betrayer of Kjeldor", 28, Rarity.RARE, mage.cards.v.VarchildBetrayerOfKjeldor.class));
|
||||
cards.add(new SetCardInfo("Varina, Lich Queen", 48, Rarity.MYTHIC, mage.cards.v.VarinaLichQueen.class));
|
||||
cards.add(new SetCardInfo("Whiptongue Hydra", 36, Rarity.RARE, mage.cards.w.WhiptongueHydra.class));
|
||||
cards.add(new SetCardInfo("Windgrace's Judgment", 49, Rarity.RARE, mage.cards.w.WindgracesJudgment.class));
|
||||
cards.add(new SetCardInfo("Winds of Rath", 79, Rarity.RARE, mage.cards.w.WindsOfRath.class));
|
||||
cards.add(new SetCardInfo("Yennet, Crypt Sovereign", 51, Rarity.MYTHIC, mage.cards.y.YennetCryptSovereign.class));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue