mirror of
https://github.com/correl/mage.git
synced 2025-04-01 09:05:59 -09:00
* Commander - Allow activated abilities from command zone, card going back fom exile zone after commander mulligan are no longer face down in library.
This commit is contained in:
parent
408a66ee42
commit
aa6be2f4da
3 changed files with 15 additions and 2 deletions
Mage.Server.Plugins/Mage.Game.CommanderDuel/src/mage/game
Mage/src/mage
|
@ -171,6 +171,7 @@ public class CommanderDuel extends GameImpl<CommanderDuel> {
|
|||
if(player != null && mulliganedCards.containsKey(playerId)){
|
||||
for(Card card : mulliganedCards.get(playerId).getCards(this)){
|
||||
if(card != null){
|
||||
card.setFaceDown(false);
|
||||
card.moveToZone(Zone.LIBRARY, null, this, false);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -468,6 +468,9 @@ public abstract class CardImpl<T extends CardImpl<T>> extends MageObjectImpl<T>
|
|||
game.getExile().removeCard(this, game);
|
||||
removed = true;
|
||||
break;
|
||||
case COMMAND:
|
||||
removed = true;
|
||||
break;
|
||||
case PICK:
|
||||
removed = true;
|
||||
break;
|
||||
|
|
|
@ -34,11 +34,13 @@ import mage.ObjectColor;
|
|||
import mage.abilities.Abilities;
|
||||
import mage.abilities.AbilitiesImpl;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.ActivatedAbility;
|
||||
import mage.abilities.common.CastCommanderAbility;
|
||||
import mage.abilities.costs.mana.ManaCost;
|
||||
import mage.abilities.costs.mana.ManaCosts;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
|
||||
/**
|
||||
|
@ -49,13 +51,20 @@ import mage.game.Game;
|
|||
|
||||
public class Commander implements CommandObject{
|
||||
|
||||
private Card card;
|
||||
private Abilities<Ability> abilites = new AbilitiesImpl<Ability>();
|
||||
private final Card card;
|
||||
private final Abilities<Ability> abilites = new AbilitiesImpl<Ability>();
|
||||
|
||||
|
||||
public Commander(Card card){
|
||||
this.card = card;
|
||||
abilites.add(new CastCommanderAbility(card));
|
||||
for (Ability ability : card.getAbilities()) {
|
||||
if (ability instanceof ActivatedAbility && ability.getZone().equals(Zone.COMMAND)) {
|
||||
Ability newAbility = ability.copy();
|
||||
newAbility.setRuleVisible(false);
|
||||
abilites.add(newAbility);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Commander(Commander copy) {
|
||||
|
|
Loading…
Add table
Reference in a new issue