mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 13:02:06 -08:00
* Some minor chnages.
This commit is contained in:
parent
00dd941260
commit
d10d6361ac
5 changed files with 58 additions and 18 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue