mirror of
https://github.com/correl/mage.git
synced 2024-11-16 03:00:12 +00:00
[KLD] Some more fixes.
This commit is contained in:
parent
346b6654f8
commit
a6d72d4101
4 changed files with 10 additions and 8 deletions
|
@ -93,7 +93,8 @@ class DieYoungEffect extends OneShotEffect {
|
||||||
Player controller = game.getPlayer(source.getControllerId());
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
if (controller != null) {
|
if (controller != null) {
|
||||||
new GetEnergyCountersControllerEffect(2).apply(game, source);
|
new GetEnergyCountersControllerEffect(2).apply(game, source);
|
||||||
int numberToPayed = controller.getAmount(0, controller.getCounters().getCount(CounterType.ENERGY), "How many {E} do you like to pay?", game);
|
int max = controller.getCounters().getCount(CounterType.ENERGY);
|
||||||
|
int numberToPayed = controller.getAmount(0, max, "How many energy counters do you like to pay? (maximum = " + max + ")", game);
|
||||||
if (numberToPayed > 0) {
|
if (numberToPayed > 0) {
|
||||||
Cost cost = new PayEnergyCost(numberToPayed);
|
Cost cost = new PayEnergyCost(numberToPayed);
|
||||||
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) {
|
if (cost.pay(source, game, source.getSourceId(), source.getControllerId(), true)) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ class LiberatingCombustionEffect extends OneShotEffect {
|
||||||
if (controller.choose(outcome, allCards, target, game)) {
|
if (controller.choose(outcome, allCards, target, game)) {
|
||||||
Card cardFound = game.getCard(target.getFirstTarget());
|
Card cardFound = game.getCard(target.getFirstTarget());
|
||||||
if (cardFound != null) {
|
if (cardFound != null) {
|
||||||
controller.revealCards(sourceObject.getIdName(), allCards, game);
|
controller.revealCards(sourceObject.getIdName(), new CardsImpl(cardFound), game);
|
||||||
controller.moveCards(cardFound, Zone.HAND, source, game);
|
controller.moveCards(cardFound, Zone.HAND, source, game);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ class VerdantCrescendoEffect extends OneShotEffect {
|
||||||
allCards.addAll(controller.getGraveyard());
|
allCards.addAll(controller.getGraveyard());
|
||||||
FilterCard filter = new FilterCard("a card named Nissa, Nature's Artisan");
|
FilterCard filter = new FilterCard("a card named Nissa, Nature's Artisan");
|
||||||
filter.add(new NamePredicate("Nissa, Nature's Artisan"));
|
filter.add(new NamePredicate("Nissa, Nature's Artisan"));
|
||||||
TargetCard target = new TargetCard(0, 1, Zone.ALL, new FilterCard());
|
TargetCard target = new TargetCard(0, 1, Zone.ALL, filter);
|
||||||
if (controller.choose(outcome, allCards, target, game)) {
|
if (controller.choose(outcome, allCards, target, game)) {
|
||||||
Card cardFound = game.getCard(target.getFirstTarget());
|
Card cardFound = game.getCard(target.getFirstTarget());
|
||||||
if (cardFound != null) {
|
if (cardFound != null) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ package mage.sets.kaladesh;
|
||||||
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import mage.abilities.Ability;
|
import mage.abilities.Ability;
|
||||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
import mage.abilities.SpellAbility;
|
||||||
import mage.abilities.effects.Effect;
|
import mage.abilities.effects.Effect;
|
||||||
import mage.abilities.effects.common.ExileSpellEffect;
|
import mage.abilities.effects.common.ExileSpellEffect;
|
||||||
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
import mage.abilities.effects.common.ReturnFromGraveyardToHandTargetEffect;
|
||||||
|
@ -38,7 +38,6 @@ import mage.constants.CardType;
|
||||||
import mage.constants.Rarity;
|
import mage.constants.Rarity;
|
||||||
import mage.filter.FilterCard;
|
import mage.filter.FilterCard;
|
||||||
import mage.game.Game;
|
import mage.game.Game;
|
||||||
import mage.target.Target;
|
|
||||||
import mage.target.common.TargetCardInYourGraveyard;
|
import mage.target.common.TargetCardInYourGraveyard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -62,9 +61,11 @@ public class WildestDreams extends CardImpl {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void adjustTargets(Ability ability, Game game) {
|
public void adjustTargets(Ability ability, Game game) {
|
||||||
int xValue = new GetXValue().calculate(game, ability, null);
|
if (ability instanceof SpellAbility) {
|
||||||
Target target = new TargetCardInYourGraveyard(xValue, new FilterCard("card from your graveyard"));
|
int xValue = ability.getManaCostsToPay().getX();
|
||||||
ability.addTarget(target);
|
ability.getTargets().clear();
|
||||||
|
ability.addTarget(new TargetCardInYourGraveyard(xValue, new FilterCard("card from your graveyard")));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public WildestDreams(final WildestDreams card) {
|
public WildestDreams(final WildestDreams card) {
|
||||||
|
|
Loading…
Reference in a new issue