- The source card of a spell will now be updated to be the card on the stack (and not point to a card that is no longer in any zone).

This commit is contained in:
Sloth
2011-11-01 08:42:46 +00:00
parent 14f809fce0
commit 85b8940bf7
6 changed files with 11 additions and 11 deletions

View File

@@ -104,7 +104,7 @@ public class ComputerUtil {
Card source = sa.getSourceCard(); Card source = sa.getSourceCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
AllZone.getGameAction().moveToStack(source); sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
} }
Cost cost = sa.getPayCosts(); Cost cost = sa.getPayCosts();
@@ -241,7 +241,7 @@ public class ComputerUtil {
Card source = bestSA.getSourceCard(); Card source = bestSA.getSourceCard();
if (bestSA.isSpell() && !source.isCopiedSpell()) { if (bestSA.isSpell() && !source.isCopiedSpell()) {
AllZone.getGameAction().moveToStack(source); bestSA.setSourceCard(AllZone.getGameAction().moveToStack(source));
} }
Cost cost = bestSA.getPayCosts(); Cost cost = bestSA.getPayCosts();
@@ -275,7 +275,7 @@ public class ComputerUtil {
if (canPayCost(sa)) { if (canPayCost(sa)) {
Card source = sa.getSourceCard(); Card source = sa.getSourceCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
AllZone.getGameAction().moveToStack(source); sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
} }
sa.setActivatingPlayer(AllZone.getComputerPlayer()); sa.setActivatingPlayer(AllZone.getComputerPlayer());
@@ -299,7 +299,7 @@ public class ComputerUtil {
Card source = sa.getSourceCard(); Card source = sa.getSourceCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
AllZone.getGameAction().moveToStack(source); sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
} }
AllZone.getStack().add(sa); AllZone.getStack().add(sa);
@@ -319,7 +319,7 @@ public class ComputerUtil {
if (canPayCost(sa)) { if (canPayCost(sa)) {
Card source = sa.getSourceCard(); Card source = sa.getSourceCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
AllZone.getGameAction().moveToStack(source); sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
} }
sa.setActivatingPlayer(AllZone.getComputerPlayer()); sa.setActivatingPlayer(AllZone.getComputerPlayer());

View File

@@ -1861,7 +1861,7 @@ public class GameAction {
if (sa.isSpell()) { if (sa.isSpell()) {
Card c = sa.getSourceCard(); Card c = sa.getSourceCard();
if (!c.isCopiedSpell()) { if (!c.isCopiedSpell()) {
AllZone.getGameAction().moveToStack(c); sa.setSourceCard(AllZone.getGameAction().moveToStack(c));
} }
} }
boolean x = false; boolean x = false;
@@ -2513,7 +2513,7 @@ public class GameAction {
if (sa.getAfterPayMana() == null) { if (sa.getAfterPayMana() == null) {
Card source = sa.getSourceCard(); Card source = sa.getSourceCard();
if (sa.isSpell() && !source.isCopiedSpell()) { if (sa.isSpell() && !source.isCopiedSpell()) {
AllZone.getGameAction().moveToStack(source); sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
} }
AllZone.getStack().add(sa); AllZone.getStack().add(sa);

View File

@@ -161,7 +161,7 @@ public class MagicStack extends MyObservable {
if (ability.isSpell()) { if (ability.isSpell()) {
final Card source = ability.getSourceCard(); final Card source = ability.getSourceCard();
if (!source.isCopiedSpell() && !AllZone.getZoneOf(source).is(Constant.Zone.Stack)) { if (!source.isCopiedSpell() && !AllZone.getZoneOf(source).is(Constant.Zone.Stack)) {
AllZone.getGameAction().moveToStack(source); //ability.setSourceCard(AllZone.getGameAction().moveToStack(source));
} }
} }

View File

@@ -901,7 +901,7 @@ public class CardFactoryUtil {
@Override @Override
public void resolve() { public void resolve() {
final SpellAbility[] sa = sourceCard.getSpellAbility(); final SpellAbility[] sa = sourceCard.getSpellAbility();
AllZone.getGameAction().moveToStack(sourceCard); sa[0].setSourceCard(AllZone.getGameAction().moveToStack(sourceCard));
final SpellAbility flash = sa[0]; final SpellAbility flash = sa[0];
flash.setFlashBackAbility(true); flash.setFlashBackAbility(true);
AllZone.getStack().add(flash); AllZone.getStack().add(flash);

View File

@@ -93,7 +93,7 @@ public class SpellAbility_Requirements {
final Card c = this.ability.getSourceCard(); final Card c = this.ability.getSourceCard();
this.fromZone = AllZone.getZoneOf(c); this.fromZone = AllZone.getZoneOf(c);
AllZone.getGameAction().moveToStack(c); this.ability.setSourceCard(AllZone.getGameAction().moveToStack(c));
} }
} }

View File

@@ -183,7 +183,7 @@ public class Input_PayManaCost extends Input {
// if this is a spell, move it to the Stack ZOne // if this is a spell, move it to the Stack ZOne
if (spell.isSpell()) { if (spell.isSpell()) {
AllZone.getGameAction().moveToStack(originalCard); spell.setSourceCard(AllZone.getGameAction().moveToStack(originalCard));
} }
if (spell.getAfterPayMana() != null) { if (spell.getAfterPayMana() != null) {