mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
Some Urza edits
This commit is contained in:
parent
f855c6b2c7
commit
ffd8891f54
1 changed files with 335 additions and 309 deletions
|
@ -16,7 +16,6 @@ import mage.abilities.dynamicvalue.common.PermanentsTargetOpponentControlsCount;
|
|||
import mage.abilities.effects.ContinuousEffect;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.BrainstormEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DamageAllControlledTargetEffect;
|
||||
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.LifelinkAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
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.KioraMasterOfTheDepthsEmblem;
|
||||
import mage.game.command.emblems.VenserTheSojournerEmblem;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.*;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
|
@ -84,6 +83,7 @@ import mage.target.TargetPermanent;
|
|||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetAnyTarget;
|
||||
import mage.target.common.TargetCardInGraveyard;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
@ -92,6 +92,10 @@ import mage.target.common.TargetOpponent;
|
|||
import mage.target.common.TargetPlayerOrPlaneswalker;
|
||||
import mage.util.RandomUtil;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author L_J
|
||||
*/
|
||||
public final class UrzaAcademyHeadmaster extends CardImpl {
|
||||
|
||||
public UrzaAcademyHeadmaster(UUID ownerId, CardSetInfo setInfo) {
|
||||
|
@ -172,6 +176,7 @@ class UrzaAcademyHeadmasterRandomEffect extends OneShotEffect {
|
|||
Target target = null;
|
||||
StringBuilder sb = new StringBuilder("[URZA] ");
|
||||
|
||||
while (true) {
|
||||
switch (selection) {
|
||||
// ABILITY +1
|
||||
case 1:
|
||||
|
@ -465,10 +470,16 @@ class UrzaAcademyHeadmasterRandomEffect extends OneShotEffect {
|
|||
|
||||
game.informPlayers(sb.toString());
|
||||
if (target != null) {
|
||||
if (target.canChoose(source.getSourceId(), controller.getId(), game)) {
|
||||
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);
|
||||
}
|
||||
} else {
|
||||
// 1/19/2018 (...) If the ability that comes up requires a target and there are no legal targets available, click again until that’s 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);
|
||||
}
|
||||
|
@ -482,6 +493,8 @@ class UrzaAcademyHeadmasterRandomEffect extends OneShotEffect {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -555,10 +568,11 @@ class UrzaAcademyHeadmasterManaEffect extends OneShotEffect {
|
|||
}
|
||||
}
|
||||
|
||||
class UrzaAcademyHeadmasterBrainstormEffect extends BrainstormEffect {
|
||||
class UrzaAcademyHeadmasterBrainstormEffect extends OneShotEffect {
|
||||
|
||||
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) {
|
||||
|
@ -580,4 +594,16 @@ class UrzaAcademyHeadmasterBrainstormEffect extends BrainstormEffect {
|
|||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue