* Some minor chnages.

This commit is contained in:
LevelX2 2018-02-14 22:57:57 +01:00
parent 00dd941260
commit d10d6361ac
5 changed files with 58 additions and 18 deletions

View file

@ -72,6 +72,9 @@ public class AddManaOfAnyColorEffect extends BasicManaEffect {
String mes = String.format("Select color of %d mana to add it to your mana pool", this.amount);
ChoiceColor choice = new ChoiceColor(true, mes, game.getObject(source.getSourceId()));
if (controller.choose(outcome, choice, game)) {
if (choice.getColor() == null) {
return false;
}
Mana createdMana = choice.getMana(amount);
if (createdMana != null) {
checkToFirePossibleEvents(createdMana, game, source);

View file

@ -11,8 +11,6 @@ import mage.constants.SubLayer;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
public class PlayLandsFromGraveyardEffect extends ContinuousEffectImpl {
public PlayLandsFromGraveyardEffect() {
@ -33,11 +31,10 @@ public class PlayLandsFromGraveyardEffect extends ContinuousEffectImpl {
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player != null) {
for (UUID cardId: player.getGraveyard()) {
Card card = game.getCard(cardId);
if(card != null && card.isLand()){
for (Card card : player.getGraveyard().getCards(game)) {
if (card != null && card.isLand()) {
PlayLandFromGraveyardAbility ability = new PlayLandFromGraveyardAbility(card.getName());
ability.setSourceId(cardId);
ability.setSourceId(card.getId());
ability.setControllerId(card.getOwnerId());
game.getState().addOtherAbility(card, ability);
}

View file

@ -30,9 +30,7 @@ package mage.game.draft;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import mage.cards.Card;
import mage.cards.repository.CardCriteria;
import mage.cards.repository.CardInfo;
import mage.cards.repository.CardRepository;
import mage.util.RandomUtil;