mirror of
https://github.com/correl/mage.git
synced 2024-11-14 19:19:32 +00:00
- Revert changes made for bug #5437. See 2ca1643b54
This commit is contained in:
parent
b2af8a3887
commit
cb340e4709
4 changed files with 2 additions and 19 deletions
|
@ -68,22 +68,8 @@ class ArcaneDenialEffect extends OneShotEffect {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Card originalSourceCard; // needed for copies of Arcane Denial See Bug #5437
|
|
||||||
Player controller = null;
|
Player controller = null;
|
||||||
boolean countered = false;
|
boolean countered = false;
|
||||||
// If the source originates from a copy (Isochron Scepter for example),
|
|
||||||
// then we set the source's sourceId to the original card, otherwise it
|
|
||||||
// uses the spell on the stack as its sourceObject which won't work
|
|
||||||
// correctly with any cards that make use of Delayed Triggers.
|
|
||||||
// see Bug #5437
|
|
||||||
Card cardToCheck = game.getCard(source.getSourceId());
|
|
||||||
if (cardToCheck != null
|
|
||||||
&& cardToCheck.isCopy()) { // Isochron Scepter imprinted card for example
|
|
||||||
originalSourceCard = (Card) game.getState().getValue("RememberSourceObject" + source.getSourceId());
|
|
||||||
if (originalSourceCard != null) {
|
|
||||||
source.setSourceId(originalSourceCard.getId());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UUID targetId = this.getTargetPointer().getFirst(game, source);
|
UUID targetId = this.getTargetPointer().getFirst(game, source);
|
||||||
if (targetId != null) {
|
if (targetId != null) {
|
||||||
controller = game.getPlayer(game.getControllerId(targetId));
|
controller = game.getPlayer(game.getControllerId(targetId));
|
||||||
|
|
|
@ -143,9 +143,6 @@ class IsochronScepterCopyEffect extends OneShotEffect {
|
||||||
if (controller.chooseUse(outcome, "Create a copy of " + imprintedInstant.getName() + '?', source, game)) {
|
if (controller.chooseUse(outcome, "Create a copy of " + imprintedInstant.getName() + '?', source, game)) {
|
||||||
Card copiedCard = game.copyCard(imprintedInstant, source, source.getControllerId());
|
Card copiedCard = game.copyCard(imprintedInstant, source, source.getControllerId());
|
||||||
if (copiedCard != null) {
|
if (copiedCard != null) {
|
||||||
// Need to record the sourceObject info for the copy (example Arcane Denial)
|
|
||||||
// TODO implement this within the codebase. See Bug #5437
|
|
||||||
game.getState().setValue("RememberSourceObject" + copiedCard.getId(), imprintedInstant);
|
|
||||||
game.getExile().add(source.getSourceId(), "", copiedCard);
|
game.getExile().add(source.getSourceId(), "", copiedCard);
|
||||||
game.getState().setZone(copiedCard.getId(), Zone.EXILED);
|
game.getState().setZone(copiedCard.getId(), Zone.EXILED);
|
||||||
if (controller.chooseUse(outcome, "Cast the copied card without paying mana cost?", source, game)) {
|
if (controller.chooseUse(outcome, "Cast the copied card without paying mana cost?", source, game)) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ public class DrawCardSourceControllerEffect extends OneShotEffect {
|
||||||
public boolean apply(Game game, Ability source) {
|
public boolean apply(Game game, Ability source) {
|
||||||
Player player = game.getPlayer(source.getControllerId());
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
if (player != null
|
if (player != null
|
||||||
&& player.isInGame()) {
|
&& player.canRespond()) {
|
||||||
player.drawCards(amount.calculate(game, source, this), game);
|
player.drawCards(amount.calculate(game, source, this), game);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class DrawCardTargetEffect extends OneShotEffect {
|
||||||
for (UUID playerId : getTargetPointer().getTargets(game, source)) {
|
for (UUID playerId : getTargetPointer().getTargets(game, source)) {
|
||||||
Player player = game.getPlayer(playerId);
|
Player player = game.getPlayer(playerId);
|
||||||
if (player != null
|
if (player != null
|
||||||
&& player.isInGame()) {
|
&& player.canRespond()) {
|
||||||
int cardsToDraw = amount.calculate(game, source, this);
|
int cardsToDraw = amount.calculate(game, source, this);
|
||||||
if (upTo) {
|
if (upTo) {
|
||||||
cardsToDraw = player.getAmount(0, cardsToDraw, "Draw how many cards?", game);
|
cardsToDraw = player.getAmount(0, cardsToDraw, "Draw how many cards?", game);
|
||||||
|
|
Loading…
Reference in a new issue