mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
* Brilliant Ultimatum - Fixed that it was not checked if the player is still allowed to play a land.
This commit is contained in:
parent
52f0ae8bd5
commit
44d3276046
5 changed files with 47 additions and 40 deletions
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.b;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -111,6 +110,7 @@ class BrilliantUltimatumEffect extends OneShotEffect {
|
|||
TargetCard targetExiledCard = new TargetCard(Zone.EXILED, new FilterCard());
|
||||
if (controller.chooseTarget(Outcome.PlayForFree, selectedPile, targetExiledCard, source, game)) {
|
||||
Card card = selectedPile.get(targetExiledCard.getFirstTarget(), game);
|
||||
controller.canPlayLand();
|
||||
if (controller.playCard(card, game, true, true, new MageObjectReference(source.getSourceObject(game), game))) {
|
||||
selectedPileCards.remove(card);
|
||||
selectedPile.remove(card);
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.cards.w;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -14,8 +13,8 @@ import mage.abilities.effects.RestrictionEffect;
|
|||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.AsThoughEffectType;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.Zone;
|
||||
|
@ -37,7 +36,7 @@ import mage.target.targetpointer.FixedTarget;
|
|||
public final class WordOfCommand extends CardImpl {
|
||||
|
||||
public WordOfCommand(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{B}{B}");
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{B}");
|
||||
|
||||
// Look at target opponent's hand and choose a card from it. You control that player until Word of Command finishes resolving. The player plays that card if able. While doing so, the player can activate mana abilities only if they're from lands that player controls and only if mana they produce is spent to activate other mana abilities of lands the player controls and/or to play that card. If the chosen card is cast as a spell, you control the player while that spell is resolving.
|
||||
this.getSpellAbility().addEffect(new WordOfCommandEffect());
|
||||
|
@ -58,7 +57,7 @@ class WordOfCommandEffect extends OneShotEffect {
|
|||
|
||||
public WordOfCommandEffect() {
|
||||
super(Outcome.GainControl);
|
||||
this.staticText = "Look at target opponent's hand and choose a card from it. You control that player until Word of Command finishes resolving. The player plays that card if able. While doing so, the player can activate mana abilities only if they're from lands that player controls and only if mana they produce is spent to activate other mana abilities of lands the player controls and/or to play that card. If the chosen card is cast as a spell, you control the player while that spell is resolving";
|
||||
this.staticText = "Look at target opponent's hand and choose a card from it. You control that player until {this} finishes resolving. The player plays that card if able. While doing so, the player can activate mana abilities only if they're from lands that player controls and only if mana they produce is spent to activate other mana abilities of lands the player controls and/or to play that card. If the chosen card is cast as a spell, you control the player while that spell is resolving";
|
||||
}
|
||||
|
||||
public WordOfCommandEffect(final WordOfCommandEffect effect) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
package mage.abilities;
|
||||
|
||||
import java.util.UUID;
|
||||
|
@ -31,7 +30,10 @@ public class PlayLandAbility extends ActivatedAbilityImpl {
|
|||
return ActivationStatus.getFalse();
|
||||
}
|
||||
//20091005 - 114.2a
|
||||
return new ActivationStatus(game.isActivePlayer(playerId) && game.getPlayer(playerId).canPlayLand() && game.canPlaySorcery(playerId), permittingObject);
|
||||
return new ActivationStatus(game.isActivePlayer(playerId)
|
||||
&& game.getPlayer(playerId).canPlayLand()
|
||||
&& game.canPlaySorcery(playerId),
|
||||
permittingObject);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package mage.players;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
import mage.MageItem;
|
||||
import mage.MageObject;
|
||||
import mage.MageObjectReference;
|
||||
|
@ -37,9 +39,6 @@ import mage.target.TargetCard;
|
|||
import mage.target.common.TargetCardInLibrary;
|
||||
import mage.util.Copyable;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author BetaSteward_at_googlemail.com
|
||||
*/
|
||||
|
@ -74,7 +73,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
void setLife(int life, Game game, UUID sourceId);
|
||||
|
||||
/**
|
||||
* @param amount amount of life loss
|
||||
* @param amount amount of life loss
|
||||
* @param game
|
||||
* @param atCombat was the source combat damage
|
||||
* @return
|
||||
|
@ -345,7 +344,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
* @param target
|
||||
* @param game
|
||||
* @param targetPlayerId player whose library will be searched
|
||||
* @param triggerEvents whether searching will trigger any game events
|
||||
* @param triggerEvents whether searching will trigger any game events
|
||||
* @return true if search was successful
|
||||
*/
|
||||
boolean searchLibrary(TargetCardInLibrary target, Game game, UUID targetPlayerId, boolean triggerEvents);
|
||||
|
@ -355,22 +354,23 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
/**
|
||||
* Plays a card if possible
|
||||
*
|
||||
* @param card the card that can be cast
|
||||
* @param card the card that can be cast
|
||||
* @param game
|
||||
* @param noMana if it's a spell i can be cast without paying mana
|
||||
* @param noMana if it's a spell i can be cast without paying mana
|
||||
* @param ignoreTiming if it's cast during the resolution of another spell
|
||||
* no sorcery or play land timing restriction are checked. For a land it has
|
||||
* to be the turn of the player playing that card.
|
||||
* no sorcery or play land timing restriction are checked. For a land it has
|
||||
* to be the turn of the player playing that card.
|
||||
* @param reference mage object that allows to play the card
|
||||
* @return
|
||||
*/
|
||||
boolean playCard(Card card, Game game, boolean noMana, boolean ignoreTiming, MageObjectReference reference);
|
||||
|
||||
/**
|
||||
* @param card the land card to play
|
||||
* @param card the land card to play
|
||||
* @param game
|
||||
* @param ignoreTiming false - it won't be checked if the stack is empty and
|
||||
* you are able to play a Sorcery. It's still checked, if you are able to
|
||||
* play a land concerning the numner of lands you already played.
|
||||
* you are able to play a Sorcery. It's still checked, if you are able to
|
||||
* play a land concerning the number of lands you already played.
|
||||
* @return
|
||||
*/
|
||||
boolean playLand(Card card, Game game, boolean ignoreTiming);
|
||||
|
@ -516,11 +516,11 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
/**
|
||||
* Moves the cards from cards to the bottom of the players library.
|
||||
*
|
||||
* @param cards - list of cards that have to be moved
|
||||
* @param game - game
|
||||
* @param cards - list of cards that have to be moved
|
||||
* @param game - game
|
||||
* @param anyOrder - true if player can determine the order of the cards
|
||||
* else random order
|
||||
* @param source - source ability
|
||||
* else random order
|
||||
* @param source - source ability
|
||||
* @return
|
||||
*/
|
||||
boolean putCardsOnBottomOfLibrary(Cards cards, Game game, Ability source, boolean anyOrder);
|
||||
|
@ -541,10 +541,10 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
/**
|
||||
* Moves the cards from cards to the top of players library.
|
||||
*
|
||||
* @param cards - list of cards that have to be moved
|
||||
* @param game - game
|
||||
* @param cards - list of cards that have to be moved
|
||||
* @param game - game
|
||||
* @param anyOrder - true if player can determine the order of the cards
|
||||
* @param source - source ability
|
||||
* @param source - source ability
|
||||
* @return
|
||||
*/
|
||||
boolean putCardsOnTopOfLibrary(Cards cards, Game game, Ability source, boolean anyOrder);
|
||||
|
@ -570,8 +570,8 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
/**
|
||||
* Choose the order in which blockers get damage assigned to
|
||||
*
|
||||
* @param blockers list of blockers where to choose the next one from
|
||||
* @param combatGroup the concerning combat group
|
||||
* @param blockers list of blockers where to choose the next one from
|
||||
* @param combatGroup the concerning combat group
|
||||
* @param blockerOrder the already set order of blockers
|
||||
* @param game
|
||||
* @return blocker next to add to the blocker order
|
||||
|
@ -710,11 +710,11 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
* @param toZone
|
||||
* @param source
|
||||
* @param game
|
||||
* @param tapped the cards are tapped on the battlefield
|
||||
* @param faceDown the cards are face down in the to zone
|
||||
* @param byOwner the card is moved (or put onto battlefield) by the owner
|
||||
* of the card and if target zone is battlefield controls the permanent
|
||||
* (instead of the controller of the source)
|
||||
* @param tapped the cards are tapped on the battlefield
|
||||
* @param faceDown the cards are face down in the to zone
|
||||
* @param byOwner the card is moved (or put onto battlefield) by the owner
|
||||
* of the card and if target zone is battlefield controls the permanent
|
||||
* (instead of the controller of the source)
|
||||
* @param appliedEffects
|
||||
* @return
|
||||
*/
|
||||
|
@ -750,7 +750,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
* list of applied effects is not saved
|
||||
*
|
||||
* @param card
|
||||
* @param exileId exile zone id (optional)
|
||||
* @param exileId exile zone id (optional)
|
||||
* @param exileName name of exile zone (optional)
|
||||
* @param sourceId
|
||||
* @param game
|
||||
|
@ -792,7 +792,7 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
* @param sourceId
|
||||
* @param game
|
||||
* @param fromZone if null, this info isn't postet
|
||||
* @param toTop to the top of the library else to the bottom
|
||||
* @param toTop to the top of the library else to the bottom
|
||||
* @param withName show the card name in the log
|
||||
* @return
|
||||
*/
|
||||
|
@ -817,10 +817,10 @@ public interface Player extends MageItem, Copyable<Player> {
|
|||
* without mana (null) or the mana set to manaCosts instead of its normal
|
||||
* mana costs.
|
||||
*
|
||||
* @param sourceId the source that can be cast without mana
|
||||
* @param sourceId the source that can be cast without mana
|
||||
* @param manaCosts alternate ManaCost, null if it can be cast without mana
|
||||
* cost
|
||||
* @param costs alternate other costs you need to pay
|
||||
* cost
|
||||
* @param costs alternate other costs you need to pay
|
||||
*/
|
||||
void setCastSourceIdWithAlternateMana(UUID sourceId, ManaCosts<ManaCost> manaCosts, Costs<Cost> costs);
|
||||
|
||||
|
|
|
@ -1145,8 +1145,14 @@ public abstract class PlayerImpl implements Player, Serializable {
|
|||
}
|
||||
//20091005 - 114.2a
|
||||
ActivationStatus activationStatus = playLandAbility.canActivate(this.playerId, game);
|
||||
if (!ignoreTiming && !activationStatus.canActivate()) {
|
||||
return false;
|
||||
if (ignoreTiming) {
|
||||
if (!canPlayLand()) {
|
||||
return false; // ignore timing does not mean that more lands than normal can be played
|
||||
}
|
||||
} else {
|
||||
if (!activationStatus.canActivate()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//20091005 - 305.1
|
||||
|
|
Loading…
Reference in a new issue