mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- 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:
@@ -104,7 +104,7 @@ public class ComputerUtil {
|
||||
Card source = sa.getSourceCard();
|
||||
|
||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||
AllZone.getGameAction().moveToStack(source);
|
||||
sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
|
||||
}
|
||||
|
||||
Cost cost = sa.getPayCosts();
|
||||
@@ -241,7 +241,7 @@ public class ComputerUtil {
|
||||
Card source = bestSA.getSourceCard();
|
||||
|
||||
if (bestSA.isSpell() && !source.isCopiedSpell()) {
|
||||
AllZone.getGameAction().moveToStack(source);
|
||||
bestSA.setSourceCard(AllZone.getGameAction().moveToStack(source));
|
||||
}
|
||||
|
||||
Cost cost = bestSA.getPayCosts();
|
||||
@@ -275,7 +275,7 @@ public class ComputerUtil {
|
||||
if (canPayCost(sa)) {
|
||||
Card source = sa.getSourceCard();
|
||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||
AllZone.getGameAction().moveToStack(source);
|
||||
sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
|
||||
}
|
||||
|
||||
sa.setActivatingPlayer(AllZone.getComputerPlayer());
|
||||
@@ -299,7 +299,7 @@ public class ComputerUtil {
|
||||
|
||||
Card source = sa.getSourceCard();
|
||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||
AllZone.getGameAction().moveToStack(source);
|
||||
sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
|
||||
}
|
||||
|
||||
AllZone.getStack().add(sa);
|
||||
@@ -319,7 +319,7 @@ public class ComputerUtil {
|
||||
if (canPayCost(sa)) {
|
||||
Card source = sa.getSourceCard();
|
||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||
AllZone.getGameAction().moveToStack(source);
|
||||
sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
|
||||
}
|
||||
|
||||
sa.setActivatingPlayer(AllZone.getComputerPlayer());
|
||||
|
||||
@@ -1861,7 +1861,7 @@ public class GameAction {
|
||||
if (sa.isSpell()) {
|
||||
Card c = sa.getSourceCard();
|
||||
if (!c.isCopiedSpell()) {
|
||||
AllZone.getGameAction().moveToStack(c);
|
||||
sa.setSourceCard(AllZone.getGameAction().moveToStack(c));
|
||||
}
|
||||
}
|
||||
boolean x = false;
|
||||
@@ -2513,7 +2513,7 @@ public class GameAction {
|
||||
if (sa.getAfterPayMana() == null) {
|
||||
Card source = sa.getSourceCard();
|
||||
if (sa.isSpell() && !source.isCopiedSpell()) {
|
||||
AllZone.getGameAction().moveToStack(source);
|
||||
sa.setSourceCard(AllZone.getGameAction().moveToStack(source));
|
||||
}
|
||||
|
||||
AllZone.getStack().add(sa);
|
||||
|
||||
@@ -161,7 +161,7 @@ public class MagicStack extends MyObservable {
|
||||
if (ability.isSpell()) {
|
||||
final Card source = ability.getSourceCard();
|
||||
if (!source.isCopiedSpell() && !AllZone.getZoneOf(source).is(Constant.Zone.Stack)) {
|
||||
AllZone.getGameAction().moveToStack(source);
|
||||
//ability.setSourceCard(AllZone.getGameAction().moveToStack(source));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -901,7 +901,7 @@ public class CardFactoryUtil {
|
||||
@Override
|
||||
public void resolve() {
|
||||
final SpellAbility[] sa = sourceCard.getSpellAbility();
|
||||
AllZone.getGameAction().moveToStack(sourceCard);
|
||||
sa[0].setSourceCard(AllZone.getGameAction().moveToStack(sourceCard));
|
||||
final SpellAbility flash = sa[0];
|
||||
flash.setFlashBackAbility(true);
|
||||
AllZone.getStack().add(flash);
|
||||
|
||||
@@ -93,7 +93,7 @@ public class SpellAbility_Requirements {
|
||||
final Card c = this.ability.getSourceCard();
|
||||
|
||||
this.fromZone = AllZone.getZoneOf(c);
|
||||
AllZone.getGameAction().moveToStack(c);
|
||||
this.ability.setSourceCard(AllZone.getGameAction().moveToStack(c));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ public class Input_PayManaCost extends Input {
|
||||
// if this is a spell, move it to the Stack ZOne
|
||||
|
||||
if (spell.isSpell()) {
|
||||
AllZone.getGameAction().moveToStack(originalCard);
|
||||
spell.setSourceCard(AllZone.getGameAction().moveToStack(originalCard));
|
||||
}
|
||||
|
||||
if (spell.getAfterPayMana() != null) {
|
||||
|
||||
Reference in New Issue
Block a user