Some Urza edits

This commit is contained in:
L_J 2018-12-24 14:52:55 +01:00 committed by GitHub
parent f855c6b2c7
commit ffd8891f54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,7 +16,6 @@ import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount;
import mage.abilities.effects.ContinuousEffect; import mage.abilities.effects.ContinuousEffect;
import mage.abilities.effects.Effect; import mage.abilities.effects.Effect;
import mage.abilities.effects.OneShotEffect; import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.BrainstormEffect;
import mage.abilities.effects.common.CreateTokenEffect; import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.DamageAllControlledTargetEffect; import mage.abilities.effects.common.DamageAllControlledTargetEffect;
import mage.abilities.effects.common.DamageAllEffect; import mage.abilities.effects.common.DamageAllEffect;
@ -50,6 +49,7 @@ import mage.abilities.effects.common.turn.ControlTargetPlayerNextTurnEffect;
import mage.abilities.keyword.FirstStrikeAbility; import mage.abilities.keyword.FirstStrikeAbility;
import mage.abilities.keyword.LifelinkAbility; import mage.abilities.keyword.LifelinkAbility;
import mage.abilities.keyword.VigilanceAbility; import mage.abilities.keyword.VigilanceAbility;
import mage.cards.Card;
import mage.cards.CardImpl; import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.choices.Choice; import mage.choices.Choice;
@ -76,7 +76,6 @@ import mage.game.command.emblems.ElspethKnightErrantEmblem;
import mage.game.command.emblems.GideonAllyOfZendikarEmblem; import mage.game.command.emblems.GideonAllyOfZendikarEmblem;
import mage.game.command.emblems.KioraMasterOfTheDepthsEmblem; import mage.game.command.emblems.KioraMasterOfTheDepthsEmblem;
import mage.game.command.emblems.VenserTheSojournerEmblem; import mage.game.command.emblems.VenserTheSojournerEmblem;
import mage.game.permanent.Permanent;
import mage.game.permanent.token.*; import mage.game.permanent.token.*;
import mage.players.Player; import mage.players.Player;
import mage.target.Target; import mage.target.Target;
@ -84,6 +83,7 @@ import mage.target.TargetPermanent;
import mage.target.TargetPlayer; import mage.target.TargetPlayer;
import mage.target.common.TargetAnyTarget; import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetCardInGraveyard; import mage.target.common.TargetCardInGraveyard;
import mage.target.common.TargetCardInHand;
import mage.target.common.TargetCardInLibrary; import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetCreaturePermanent; import mage.target.common.TargetCreaturePermanent;
import mage.target.common.TargetCreaturePermanentAmount; import mage.target.common.TargetCreaturePermanentAmount;
@ -92,6 +92,10 @@ import mage.target.common.TargetOpponent;
import mage.target.common.TargetPlayerOrPlaneswalker; import mage.target.common.TargetPlayerOrPlaneswalker;
import mage.util.RandomUtil; import mage.util.RandomUtil;
/**
*
* @author L_J
*/
public final class UrzaAcademyHeadmaster extends CardImpl { public final class UrzaAcademyHeadmaster extends CardImpl {
public UrzaAcademyHeadmaster(UUID ownerId, CardSetInfo setInfo) { public UrzaAcademyHeadmaster(UUID ownerId, CardSetInfo setInfo) {
@ -172,315 +176,324 @@ class UrzaAcademyHeadmasterRandomEffect extends OneShotEffect {
Target target = null; Target target = null;
StringBuilder sb = new StringBuilder("[URZA] "); StringBuilder sb = new StringBuilder("[URZA] ");
switch (selection) { while (true) {
// ABILITY +1 switch (selection) {
case 1: // ABILITY +1
switch (result) { case 1:
case 1: // AJANI STEADFAST 1 switch (result) {
sb.append("Until end of turn, up to one target creature gets +1/+1 and gains first strike, vigilance, and lifelink."); case 1: // AJANI STEADFAST 1
effects.add(new BoostTargetEffect(1, 1, Duration.EndOfTurn)); sb.append("Until end of turn, up to one target creature gets +1/+1 and gains first strike, vigilance, and lifelink.");
effects.add(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn)); effects.add(new BoostTargetEffect(1, 1, Duration.EndOfTurn));
effects.add(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn)); effects.add(new GainAbilityTargetEffect(FirstStrikeAbility.getInstance(), Duration.EndOfTurn));
effects.add(new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn)); effects.add(new GainAbilityTargetEffect(VigilanceAbility.getInstance(), Duration.EndOfTurn));
target = new TargetCreaturePermanent(0, 1); effects.add(new GainAbilityTargetEffect(LifelinkAbility.getInstance(), Duration.EndOfTurn));
break; target = new TargetCreaturePermanent(0, 1);
case 2: // AJANI MENTOR OF HEROES 1 break;
sb.append("Distribute three +1/+1 counters among one, two, or three target creatures you control."); case 2: // AJANI MENTOR OF HEROES 1
effects.add(new DistributeCountersEffect(CounterType.P1P1, 3, false, "one, two, or three target creatures you control")); sb.append("Distribute three +1/+1 counters among one, two, or three target creatures you control.");
target = new TargetCreaturePermanentAmount(3, filter1); effects.add(new DistributeCountersEffect(CounterType.P1P1, 3, false, "one, two, or three target creatures you control"));
break; target = new TargetCreaturePermanentAmount(3, filter1);
case 3: // NICOL BOLAS PLANESWALKER 1 break;
sb.append("Destroy target noncreature permanent."); case 3: // NICOL BOLAS PLANESWALKER 1
effects.add(new DestroyTargetEffect()); sb.append("Destroy target noncreature permanent.");
target = new TargetPermanent(filter2); effects.add(new DestroyTargetEffect());
break; target = new TargetPermanent(filter2);
case 4: // CHANDRA FLAMECALLER 1 break;
sb.append("Create two 3/1 red Elemental creature tokens with haste. Exile them at the beginning of the next end step."); case 4: // CHANDRA FLAMECALLER 1
effects.add(new mage.cards.c.ChandraFlamecaller(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("Create two 3/1 red Elemental creature tokens with haste. Exile them at the beginning of the next end step.");
break; effects.add(new mage.cards.c.ChandraFlamecaller(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
case 5: // ELSPETH SUNS CHAMPION 1 break;
sb.append("Create three 1/1 white Soldier creature tokens."); case 5: // ELSPETH SUNS CHAMPION 1
effects.add(new CreateTokenEffect(new SoldierToken(), 3)); sb.append("Create three 1/1 white Soldier creature tokens.");
break; effects.add(new CreateTokenEffect(new SoldierToken(), 3));
case 6: // GARRUK APEX PREDATOR 2 break;
sb.append("Create a 3/3 black Beast creature token with deathtouch."); case 6: // GARRUK APEX PREDATOR 2
effects.add(new CreateTokenEffect(new GarrukApexPredatorBeastToken())); sb.append("Create a 3/3 black Beast creature token with deathtouch.");
break; effects.add(new CreateTokenEffect(new GarrukApexPredatorBeastToken()));
case 7: // GARRUK CALLER OF BEASTS 1 break;
sb.append("Reveal the top five cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order."); case 7: // GARRUK CALLER OF BEASTS 1
effects.add(new RevealLibraryPutIntoHandEffect(5, new FilterCreatureCard("creature cards"), Zone.LIBRARY)); sb.append("Reveal the top five cards of your library. Put all creature cards revealed this way into your hand and the rest on the bottom of your library in any order.");
break; effects.add(new RevealLibraryPutIntoHandEffect(5, new FilterCreatureCard("creature cards"), Zone.LIBRARY));
case 8: // GIDEON JURA 1 break;
sb.append("During target opponents next turn, creatures that player controls attack Urza if able."); case 8: // GIDEON JURA 1
effects.add(new mage.cards.g.GideonJura(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("During target opponents next turn, creatures that player controls attack Urza if able.");
target = new TargetOpponent(); effects.add(new mage.cards.g.GideonJura(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
break; target = new TargetOpponent();
case 9: // GIDEON CHAMPION OF JUSTICE 1 break;
sb.append("Put a loyalty counter on Urza for each creature target opponent controls."); case 9: // GIDEON CHAMPION OF JUSTICE 1
effects.add(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), new PermanentsTargetOpponentControlsCount(new FilterCreaturePermanent()), true)); sb.append("Put a loyalty counter on Urza for each creature target opponent controls.");
target = new TargetOpponent(); effects.add(new AddCountersSourceEffect(CounterType.LOYALTY.createInstance(0), new PermanentsTargetOpponentControlsCount(new FilterCreaturePermanent()), true));
break; target = new TargetOpponent();
case 10: // JACE ARCHITECT OF THOUGHT 1 break;
sb.append("Until your next turn, whenever a creature an opponent controls attacks, it gets -1/-0 until end of turn."); case 10: // JACE ARCHITECT OF THOUGHT 1
effects.add(new mage.cards.j.JaceArchitectOfThought(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("Until your next turn, whenever a creature an opponent controls attacks, it gets -1/-0 until end of turn.");
break; effects.add(new mage.cards.j.JaceArchitectOfThought(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
case 11: // KARN LIBERATED 1 break;
sb.append("Target player exiles a card from his or her hand."); case 11: // KARN LIBERATED 1
effects.add(new ExileFromZoneTargetEffect(Zone.HAND, null, "", new FilterCard())); sb.append("Target player exiles a card from his or her hand.");
target = new TargetPlayer(); effects.add(new ExileFromZoneTargetEffect(Zone.HAND, null, "", new FilterCard()));
break; target = new TargetPlayer();
case 12: // NISSA SAGE ANIMIST 1 break;
sb.append("Reveal the top card of your library. If its a land card, put it onto the battlefield. Otherwise, put it into your hand."); case 12: // NISSA SAGE ANIMIST 1
effects.add(new mage.cards.n.NissaSageAnimist(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("Reveal the top card of your library. If its a land card, put it onto the battlefield. Otherwise, put it into your hand.");
break; effects.add(new mage.cards.n.NissaSageAnimist(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
case 13: // NISSA WORLDWAKER 1 break;
sb.append("Target land you control becomes a 4/4 Elemental creature with trample. Its still a land."); case 13: // NISSA WORLDWAKER 1
effects.add(new mage.cards.n.NissaWorldwaker(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("Target land you control becomes a 4/4 Elemental creature with trample. Its still a land.");
target = new TargetPermanent(new FilterControlledLandPermanent()); effects.add(new mage.cards.n.NissaWorldwaker(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
break; target = new TargetPermanent(new FilterControlledLandPermanent());
case 14: // SARKHAN UNBROKEN 1 break;
sb.append("Draw a card, then add one mana of any color to your mana pool."); case 14: // SARKHAN UNBROKEN 1
effects.add(new mage.cards.s.SarkhanUnbroken(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("Draw a card, then add one mana of any color to your mana pool.");
break; effects.add(new mage.cards.s.SarkhanUnbroken(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
case 15: // SARKHAN THE DRAGONSPEAKER 1 break;
sb.append("Until end of turn, Urza becomes a legendary 4/4 red Dragon creature with flying, indestructible, and haste. (He doesnt lose loyalty while hes not a planeswalker.)"); case 15: // SARKHAN THE DRAGONSPEAKER 1
effects.add(new mage.cards.s.SarkhanTheDragonspeaker(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("Until end of turn, Urza becomes a legendary 4/4 red Dragon creature with flying, indestructible, and haste. (He doesnt lose loyalty while hes not a planeswalker.)");
break; effects.add(new mage.cards.s.SarkhanTheDragonspeaker(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
case 16: // SORIN SOLEMN VISITOR 1 break;
sb.append("Until your next turn, creatures you control get +1/+0 and gain lifelink."); case 16: // SORIN SOLEMN VISITOR 1
effects.add(new BoostControlledEffect(1, 0, Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); sb.append("Until your next turn, creatures you control get +1/+0 and gain lifelink.");
effects.add(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES)); effects.add(new BoostControlledEffect(1, 0, Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES));
break; effects.add(new GainAbilityControlledEffect(LifelinkAbility.getInstance(), Duration.UntilYourNextTurn, StaticFilters.FILTER_PERMANENT_CREATURES));
case 17: // TEZZERET AGENT OF BOLAS 1 break;
sb.append("Look at the top five cards of your library. You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in any order."); case 17: // TEZZERET AGENT OF BOLAS 1
effects.add(new LookLibraryAndPickControllerEffect(5, 1, new FilterArtifactCard(), true)); sb.append("Look at the top five cards of your library. You may reveal an artifact card from among them and put it into your hand. Put the rest on the bottom of your library in any order.");
break; effects.add(new LookLibraryAndPickControllerEffect(5, 1, new FilterArtifactCard(), true));
case 18: // UGIN 1 break;
sb.append("Urza deals 3 damage to any target."); case 18: // UGIN 1
effects.add(new DamageTargetEffect(3)); sb.append("Urza deals 3 damage to any target.");
target = new TargetAnyTarget(); effects.add(new DamageTargetEffect(3));
break; target = new TargetAnyTarget();
case 19: // VRASKA 1 break;
sb.append("Until your next turn, whenever a creature deals combat damage to Urza, destroy that creature."); case 19: // VRASKA 1
effects.add(new mage.cards.v.VraskaTheUnseen(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0)); sb.append("Until your next turn, whenever a creature deals combat damage to Urza, destroy that creature.");
break; effects.add(new mage.cards.v.VraskaTheUnseen(controller.getId(), setInfo).getAbilities().get(2).getEffects().get(0));
case 20: // (altered) XENAGOS 1 break;
sb.append("Add X mana in any combination of colors to your mana pool, where X is the number of creatures you control."); case 20: // (altered) XENAGOS 1
effects.add(new UrzaAcademyHeadmasterManaEffect()); sb.append("Add X mana in any combination of colors to your mana pool, where X is the number of creatures you control.");
} effects.add(new UrzaAcademyHeadmasterManaEffect());
break; }
// ABILITY -1 break;
case 2: // ABILITY -1
switch (result) { case 2:
case 1: // (altered) CHANDRA FLAMECALLER 3 switch (result) {
sb.append("Urza deals 3 damage to each creature."); case 1: // (altered) CHANDRA FLAMECALLER 3
effects.add(new DamageAllEffect(3, StaticFilters.FILTER_PERMANENT_CREATURE)); sb.append("Urza deals 3 damage to each creature.");
break; effects.add(new DamageAllEffect(3, StaticFilters.FILTER_PERMANENT_CREATURE));
case 2: // NICOL BOLAS PLANESWALKER 2 break;
sb.append("Gain control of target creature."); case 2: // NICOL BOLAS PLANESWALKER 2
effects.add(new GainControlTargetEffect(Duration.Custom)); sb.append("Gain control of target creature.");
target = new TargetCreaturePermanent(); effects.add(new GainControlTargetEffect(Duration.Custom));
break; target = new TargetCreaturePermanent();
case 3: // (double) SORIN MARKOV 1 break;
sb.append("Urza deals 4 damage to target creature or player and you gain 4 life."); case 3: // (double) SORIN MARKOV 1
effects.add(new DamageTargetEffect(4)); sb.append("Urza deals 4 damage to target creature or player and you gain 4 life.");
effects.add(new GainLifeEffect(4)); effects.add(new DamageTargetEffect(4));
target = new TargetAnyTarget(); effects.add(new GainLifeEffect(4));
break; target = new TargetAnyTarget();
case 4: // GARRUK APEX PREDATOR 3 break;
sb.append("Destroy target creature. You gain life equal to its toughness."); case 4: // GARRUK APEX PREDATOR 3
effects.add(new DestroyTargetEffect()); sb.append("Destroy target creature. You gain life equal to its toughness.");
effects.add(new mage.cards.g.GarrukApexPredator(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(1)); effects.add(new DestroyTargetEffect());
target = new TargetCreaturePermanent(); effects.add(new mage.cards.g.GarrukApexPredator(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(1));
break; target = new TargetCreaturePermanent();
case 5: // GIDEON ALLY OF ZENDIKAR 3 break;
sb.append("You get an emblem with “Creatures you control get +1/+1.”"); case 5: // GIDEON ALLY OF ZENDIKAR 3
effects.add(new GetEmblemEffect(new GideonAllyOfZendikarEmblem())); sb.append("You get an emblem with “Creatures you control get +1/+1.”");
break; effects.add(new GetEmblemEffect(new GideonAllyOfZendikarEmblem()));
case 6: // (altered) GARRUK CALLER OF BEASTS 2 break;
sb.append("You may put a creature card from your hand onto the battlefield."); case 6: // (altered) GARRUK CALLER OF BEASTS 2
effects.add(new PutCardFromHandOntoBattlefieldEffect(new FilterCreatureCard())); sb.append("You may put a creature card from your hand onto the battlefield.");
break; effects.add(new PutCardFromHandOntoBattlefieldEffect(new FilterCreatureCard()));
case 7: // (altered) JACE THE MIND SCULPTOR 2 break;
sb.append("Draw three cards, then put a card from your hand on top of your library."); case 7: // (altered) JACE THE MIND SCULPTOR 2
effects.add(new UrzaAcademyHeadmasterBrainstormEffect()); sb.append("Draw three cards, then put a card from your hand on top of your library.");
break; effects.add(new UrzaAcademyHeadmasterBrainstormEffect());
case 8: // JACE MEMORY ADEPT 2 break;
sb.append("Target player puts the top ten cards of his or her library into his or her graveyard."); case 8: // JACE MEMORY ADEPT 2
effects.add(new PutLibraryIntoGraveTargetEffect(10)); sb.append("Target player puts the top ten cards of his or her library into his or her graveyard.");
target = new TargetPlayer(); effects.add(new PutLibraryIntoGraveTargetEffect(10));
break; target = new TargetPlayer();
case 9: // JACE ARCHITECT OF THOUGHT 2 break;
sb.append("Reveal the top five cards of your library. An opponent separates those cards into two piles. Put one pile into your hand and the other on the bottom of your library in any order."); case 9: // JACE ARCHITECT OF THOUGHT 2
effects.add(new mage.cards.j.JaceArchitectOfThought(controller.getId(), setInfo).getAbilities().get(3).getEffects().get(0)); sb.append("Reveal the top five cards of your library. An opponent separates those cards into two piles. Put one pile into your hand and the other on the bottom of your library in any order.");
break; effects.add(new mage.cards.j.JaceArchitectOfThought(controller.getId(), setInfo).getAbilities().get(3).getEffects().get(0));
case 10: // KARN LIBERATED 2 break;
sb.append("Exile target permanent."); case 10: // KARN LIBERATED 2
effects.add(new ExileTargetEffect()); sb.append("Exile target permanent.");
target = new TargetPermanent(); effects.add(new ExileTargetEffect());
break; target = new TargetPermanent();
case 11: // (altered) GARRUK CALLER OF BEASTS 1 break;
sb.append("Reveal the top five cards of your library. You may put all creature cards and/or land cards from among them into your hand. Put the rest into your graveyard."); case 11: // (altered) GARRUK CALLER OF BEASTS 1
effects.add(new RevealLibraryPutIntoHandEffect(5, filter3, Zone.LIBRARY)); sb.append("Reveal the top five cards of your library. You may put all creature cards and/or land cards from among them into your hand. Put the rest into your graveyard.");
break; effects.add(new RevealLibraryPutIntoHandEffect(5, filter3, Zone.LIBRARY));
case 12: // (altered) LILIANA VESS 2 break;
sb.append("Search your library for a card and put that card into your hand. Then shuffle your library."); case 12: // (altered) LILIANA VESS 2
effects.add(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCard("a card")), false, true)); sb.append("Search your library for a card and put that card into your hand. Then shuffle your library.");
break; effects.add(new SearchLibraryPutInHandEffect(new TargetCardInLibrary(new FilterCard("a card")), false, true));
case 13: // (double) LILIANA OF THE VEIL 2 break;
sb.append("Target player sacrifices two creatures."); case 13: // (double) LILIANA OF THE VEIL 2
effects.add(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 2, "Target player")); sb.append("Target player sacrifices two creatures.");
target = new TargetPlayer(); effects.add(new SacrificeEffect(StaticFilters.FILTER_PERMANENT_CREATURE, 2, "Target player"));
break; target = new TargetPlayer();
case 14: // OB NIXILIS OF THE BLACK OATH 2 break;
sb.append("Create a 5/5 black Demon creature token with flying. You lose 2 life."); case 14: // OB NIXILIS OF THE BLACK OATH 2
effects.add(new CreateTokenEffect(new DemonToken())); sb.append("Create a 5/5 black Demon creature token with flying. You lose 2 life.");
effects.add(new LoseLifeSourceControllerEffect(2)); effects.add(new CreateTokenEffect(new DemonToken()));
break; effects.add(new LoseLifeSourceControllerEffect(2));
case 15: // (gold) SARKHAN UNBROKEN 2 break;
sb.append("Create a 4/4 gold Dragon creature token with flying."); case 15: // (gold) SARKHAN UNBROKEN 2
effects.add(new CreateTokenEffect(new DragonTokenGold(), 1)); sb.append("Create a 4/4 gold Dragon creature token with flying.");
break; effects.add(new CreateTokenEffect(new DragonTokenGold(), 1));
case 16: // SORIN MARKOV 2 break;
sb.append("Target players life total becomes 10."); case 16: // SORIN MARKOV 2
effects.add(new mage.cards.s.SorinMarkov(controller.getId(), setInfo).getAbilities().get(3).getEffects().get(0)); sb.append("Target players life total becomes 10.");
target = new TargetPlayer(); effects.add(new mage.cards.s.SorinMarkov(controller.getId(), setInfo).getAbilities().get(3).getEffects().get(0));
break; target = new TargetPlayer();
case 17: // VRASKA 2 break;
sb.append("Destroy target nonland permanent."); case 17: // VRASKA 2
effects.add(new DestroyTargetEffect()); sb.append("Destroy target nonland permanent.");
target = new TargetNonlandPermanent(); effects.add(new DestroyTargetEffect());
break; target = new TargetNonlandPermanent();
case 18: // UNIQUE break;
sb.append("Return target permanent from a graveyard to the battlefield under your control."); case 18: // UNIQUE
effects.add(new ReturnFromGraveyardToBattlefieldTargetEffect()); sb.append("Return target permanent from a graveyard to the battlefield under your control.");
target = new TargetCardInGraveyard(new FilterPermanentCard()); effects.add(new ReturnFromGraveyardToBattlefieldTargetEffect());
break; target = new TargetCardInGraveyard(new FilterPermanentCard());
case 19: // (double) GARRUK WILDSPEAKER 2 break;
sb.append("Create two 3/3 green Beast creature tokens."); case 19: // (double) GARRUK WILDSPEAKER 2
effects.add(new CreateTokenEffect(new BeastToken(), 2)); sb.append("Create two 3/3 green Beast creature tokens.");
break; effects.add(new CreateTokenEffect(new BeastToken(), 2));
case 20: // UNIQUE break;
sb.append("Draw four cards and discard two cards."); case 20: // UNIQUE
effects.add(new DrawCardSourceControllerEffect(4)); sb.append("Draw four cards and discard two cards.");
effects.add(new DiscardControllerEffect(2)); effects.add(new DrawCardSourceControllerEffect(4));
} effects.add(new DiscardControllerEffect(2));
break; }
// ABILITY -6 break;
case 3: // ABILITY -6
switch (result) { case 3:
case 1: // NICOL BOLAS PLANESWALKER 3 switch (result) {
sb.append("Urza deals 7 damage to target player. That player discards seven cards, then sacrifices seven permanents."); case 1: // NICOL BOLAS PLANESWALKER 3
effects.add(new DamageTargetEffect(7)); sb.append("Urza deals 7 damage to target player. That player discards seven cards, then sacrifices seven permanents.");
effects.add(new DiscardTargetEffect(7)); effects.add(new DamageTargetEffect(7));
effects.add(new SacrificeEffect(new FilterPermanent(), 7, "then")); effects.add(new DiscardTargetEffect(7));
target = new TargetPlayerOrPlaneswalker(); effects.add(new SacrificeEffect(new FilterPermanent(), 7, "then"));
break; target = new TargetPlayerOrPlaneswalker();
case 2: // AJANI STEADFAST 3 break;
sb.append("You get an emblem with “If a source would deal damage to you or a planeswalker you control, prevent all but 1 of that damage.”"); case 2: // AJANI STEADFAST 3
effects.add(new GetEmblemEffect(new AjaniSteadfastEmblem())); sb.append("You get an emblem with “If a source would deal damage to you or a planeswalker you control, prevent all but 1 of that damage.”");
break; effects.add(new GetEmblemEffect(new AjaniSteadfastEmblem()));
case 3: // AJANI VENGEANT 3 break;
sb.append("Destroy all lands target player controls."); case 3: // AJANI VENGEANT 3
effects.add(new DestroyAllControlledTargetEffect(new FilterLandPermanent())); sb.append("Destroy all lands target player controls.");
target = new TargetPlayer(); effects.add(new DestroyAllControlledTargetEffect(new FilterLandPermanent()));
break; target = new TargetPlayer();
case 4: // AJANI CALLER OF THE PRIDE 3 break;
sb.append("Create X 2/2 white Cat creature tokens, where X is your life total."); case 4: // AJANI CALLER OF THE PRIDE 3
effects.add(new CreateTokenEffect(new CatToken(), new ControllerLifeCount())); sb.append("Create X 2/2 white Cat creature tokens, where X is your life total.");
break; effects.add(new CreateTokenEffect(new CatToken(), new ControllerLifeCount()));
case 5: // AJANI MENTOR OF HEROES 3 break;
sb.append("You gain 100 life."); case 5: // AJANI MENTOR OF HEROES 3
effects.add(new GainLifeEffect(100)); sb.append("You gain 100 life.");
break; effects.add(new GainLifeEffect(100));
case 6: // CHANDRA NALAAR 3 break;
sb.append("Urza deals 10 damage to target player and each creature he or she controls."); case 6: // CHANDRA NALAAR 3
effects.add(new DamageTargetEffect(10)); sb.append("Urza deals 10 damage to target player and each creature he or she controls.");
effects.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent())); effects.add(new DamageTargetEffect(10));
target = new TargetPlayerOrPlaneswalker(); effects.add(new DamageAllControlledTargetEffect(10, new FilterCreaturePermanent()));
break; target = new TargetPlayerOrPlaneswalker();
case 7: // DOMRI RADE 3 break;
sb.append("You get an emblem with “Creatures you control have double strike, trample, hexproof, and haste.”"); case 7: // DOMRI RADE 3
effects.add(new GetEmblemEffect(new DomriRadeEmblem())); sb.append("You get an emblem with “Creatures you control have double strike, trample, hexproof, and haste.”");
break; effects.add(new GetEmblemEffect(new DomriRadeEmblem()));
case 8: // ELSPETH KNIGHT ERRANT 3 break;
sb.append("You get an emblem with “Artifacts, creatures, enchantments, and lands you control have indestructible.”"); case 8: // ELSPETH KNIGHT ERRANT 3
effects.add(new GetEmblemEffect(new ElspethKnightErrantEmblem())); sb.append("You get an emblem with “Artifacts, creatures, enchantments, and lands you control have indestructible.”");
break; effects.add(new GetEmblemEffect(new ElspethKnightErrantEmblem()));
case 9: // GARRUK PRIMAL HUNTER 3 break;
sb.append("Create a 6/6 green Wurm creature token for each land you control."); case 9: // GARRUK PRIMAL HUNTER 3
effects.add(new CreateTokenEffect(new WurmToken(), new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent()))); sb.append("Create a 6/6 green Wurm creature token for each land you control.");
break; effects.add(new CreateTokenEffect(new WurmToken(), new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent())));
case 10: // JACE THE LIVING GUILDPACT 3 break;
sb.append("Each player shuffles his or her hand and graveyard into his or her library. You draw seven cards."); case 10: // JACE THE LIVING GUILDPACT 3
effects.add(new ShuffleHandGraveyardAllEffect()); sb.append("Each player shuffles his or her hand and graveyard into his or her library. You draw seven cards.");
effects.add(new DrawCardSourceControllerEffect(7)); effects.add(new ShuffleHandGraveyardAllEffect());
break; effects.add(new DrawCardSourceControllerEffect(7));
case 11: // SORIN LORD OF INNISTRAD 3 break;
sb.append("Destroy up to three target creatures and/or other planeswalkers. Return each card put into a graveyard this way to the battlefield under your control."); case 11: // SORIN LORD OF INNISTRAD 3
effects.add(new mage.cards.s.SorinLordOfInnistrad(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(0)); sb.append("Destroy up to three target creatures and/or other planeswalkers. Return each card put into a graveyard this way to the battlefield under your control.");
target = new TargetPermanent(0, 3, filter4, false); effects.add(new mage.cards.s.SorinLordOfInnistrad(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(0));
break; target = new TargetPermanent(0, 3, filter4, false);
case 12: // VENSER 3 break;
sb.append("You get an emblem with “Whenever you cast a spell, exile target permanent.”"); case 12: // VENSER 3
effects.add(new GetEmblemEffect(new VenserTheSojournerEmblem())); sb.append("You get an emblem with “Whenever you cast a spell, exile target permanent.”");
break; effects.add(new GetEmblemEffect(new VenserTheSojournerEmblem()));
case 13: // KIORA MASTER OF THE DEPTHS 3 break;
sb.append("You get an emblem with “Whenever a creature enters the battlefield under your control, you may have it fight target creature.” Then create three 8/8 blue Octopus creature tokens."); case 13: // KIORA MASTER OF THE DEPTHS 3
effects.add(new CreateTokenEffect(new OctopusToken(), 3)); sb.append("You get an emblem with “Whenever a creature enters the battlefield under your control, you may have it fight target creature.” Then create three 8/8 blue Octopus creature tokens.");
effects.add(new GetEmblemEffect(new KioraMasterOfTheDepthsEmblem())); effects.add(new CreateTokenEffect(new OctopusToken(), 3));
break; effects.add(new GetEmblemEffect(new KioraMasterOfTheDepthsEmblem()));
case 14: // SORIN MARKOV 3 break;
sb.append("You control target player during that players next turn."); case 14: // SORIN MARKOV 3
effects.add(new ControlTargetPlayerNextTurnEffect()); sb.append("You control target player during that players next turn.");
target = new TargetPlayer(); effects.add(new ControlTargetPlayerNextTurnEffect());
break; target = new TargetPlayer();
case 15: // JACE THE MIND SCULPTOR 4 break;
sb.append("Exile all cards from target players library, then that player shuffles his or her hand into his or her library."); case 15: // JACE THE MIND SCULPTOR 4
effects.add(new mage.cards.j.JaceTheMindSculptor(controller.getId(), setInfo).getAbilities().get(5).getEffects().get(0)); sb.append("Exile all cards from target players library, then that player shuffles his or her hand into his or her library.");
target = new TargetPlayer(); effects.add(new mage.cards.j.JaceTheMindSculptor(controller.getId(), setInfo).getAbilities().get(5).getEffects().get(0));
break; target = new TargetPlayer();
case 16: // VRASKA 3 break;
sb.append("Create three 1/1 black Assassin creature tokens with “Whenever this creature deals combat damage to a player, that player loses the game.”"); case 16: // VRASKA 3
effects.add(new CreateTokenEffect(new AssassinToken())); sb.append("Create three 1/1 black Assassin creature tokens with “Whenever this creature deals combat damage to a player, that player loses the game.”");
break; effects.add(new CreateTokenEffect(new AssassinToken()));
case 17: // LILIANA VESS 3 break;
sb.append("Put all creature cards from all graveyards onto the battlefield under your control."); case 17: // LILIANA VESS 3
effects.add(new mage.cards.l.LilianaVess(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(0)); sb.append("Put all creature cards from all graveyards onto the battlefield under your control.");
break; effects.add(new mage.cards.l.LilianaVess(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(0));
case 18: // NISSA VOICE OF ZENDIKAR 3 break;
sb.append("You gain X life and draw X cards, where X is the number of lands you control."); case 18: // NISSA VOICE OF ZENDIKAR 3
effects.add(new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent()))); sb.append("You gain X life and draw X cards, where X is the number of lands you control.");
effects.add(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent()))); effects.add(new GainLifeEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent())));
break; effects.add(new DrawCardSourceControllerEffect(new PermanentsOnBattlefieldCount(new FilterControlledLandPermanent())));
case 19: // RAL ZAREK 3 break;
sb.append("Flip five coins. Take an extra turn after this one for each coin that comes up heads."); case 19: // RAL ZAREK 3
effects.add(new mage.cards.r.RalZarek(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(0)); sb.append("Flip five coins. Take an extra turn after this one for each coin that comes up heads.");
break; effects.add(new mage.cards.r.RalZarek(controller.getId(), setInfo).getAbilities().get(4).getEffects().get(0));
case 20: // UGIN 3 break;
sb.append("You gain 7 life, draw seven cards, then put up to seven permanent cards from your hand onto the battlefield."); case 20: // UGIN 3
effects.add(new mage.cards.u.UginTheSpiritDragonEffect3()); sb.append("You gain 7 life, draw seven cards, then put up to seven permanent cards from your hand onto the battlefield.");
} effects.add(new mage.cards.u.UginTheSpiritDragonEffect3());
} }
}
game.informPlayers(sb.toString());
if (target != null) { game.informPlayers(sb.toString());
if (target.canChoose(source.getSourceId(), controller.getId(), game)) { if (target != null) {
while (!target.isChosen() && target.canChoose(controller.getId(), game) && controller.canRespond()) { if (target.canChoose(source.getSourceId(), controller.getId(), game) && controller.canRespond()) {
controller.chooseTarget(outcome, target, source, game); controller.chooseTarget(outcome, target, source, game);
}
}
source.addTarget(target);
}
if (target == null || target.isChosen()) {
for (Effect effect : effects) {
if (effect instanceof ContinuousEffect) {
game.addEffect((ContinuousEffect) effect, source);
} else { } else {
effect.apply(game, source); // 1/19/2018 (...) If the ability that comes up requires a target and there are no legal targets available, click again until thats not true.
game.informPlayers("[URZA] Target can't be chosen, picking next ability...");
result = RandomUtil.nextInt(20) + 1;
effects.clear();
target = null;
sb = new StringBuilder("[URZA] ");
continue;
} }
source.addTarget(target);
} }
return true; if (target == null || target.isChosen()) {
for (Effect effect : effects) {
if (effect instanceof ContinuousEffect) {
game.addEffect((ContinuousEffect) effect, source);
} else {
effect.apply(game, source);
}
}
return true;
}
break;
} }
} }
return false; return false;
@ -555,10 +568,11 @@ class UrzaAcademyHeadmasterManaEffect extends OneShotEffect {
} }
} }
class UrzaAcademyHeadmasterBrainstormEffect extends BrainstormEffect { class UrzaAcademyHeadmasterBrainstormEffect extends OneShotEffect {
public UrzaAcademyHeadmasterBrainstormEffect() { public UrzaAcademyHeadmasterBrainstormEffect() {
super(); super(Outcome.DrawCard);
staticText = "draw three cards, then put a card from your hand on top of your library";
} }
public UrzaAcademyHeadmasterBrainstormEffect(final UrzaAcademyHeadmasterBrainstormEffect effect) { public UrzaAcademyHeadmasterBrainstormEffect(final UrzaAcademyHeadmasterBrainstormEffect effect) {
@ -580,4 +594,16 @@ class UrzaAcademyHeadmasterBrainstormEffect extends BrainstormEffect {
} }
return false; return false;
} }
private boolean putOnLibrary(Player player, Ability source, Game game) {
TargetCardInHand target = new TargetCardInHand();
if (target.canChoose(source.getSourceId(), player.getId(), game)) {
player.chooseTarget(Outcome.ReturnToHand, target, source, game);
Card card = player.getHand().get(target.getFirstTarget(), game);
if (card != null) {
return player.moveCardToLibraryWithInfo(card, source.getSourceId(), game, Zone.HAND, true, false);
}
}
return false;
}
} }