mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
*Fixed how state triggers could go on the stack twice if they triggered within the same checkStateEffects "cycle". Fixes Garruk Relentless' Transform trigger.
*Fixed other cases of double triggering and some code duplication. *Fixed Max's Cut&Paste Deck importer' interaction with alternate card faces.
This commit is contained in:
@@ -137,6 +137,14 @@ public class GameAction {
|
||||
zone.remove(copied);
|
||||
}
|
||||
|
||||
if (prev != null) {
|
||||
if (prev.is(Constant.Zone.Battlefield) && c.isCreature()) {
|
||||
AllZone.getCombat().removeFromCombat(c);
|
||||
}
|
||||
|
||||
prev.remove(c);
|
||||
}
|
||||
|
||||
HashMap<String, Object> runParams = new HashMap<String, Object>();
|
||||
runParams.put("Card", lastKnownInfo);
|
||||
if (prev != null) {
|
||||
@@ -152,14 +160,6 @@ public class GameAction {
|
||||
AllZone.getTriggerHandler().clearSuppression("ChangesZone");
|
||||
}
|
||||
|
||||
if (prev != null) {
|
||||
if (prev.is(Constant.Zone.Battlefield) && c.isCreature()) {
|
||||
AllZone.getCombat().removeFromCombat(c);
|
||||
}
|
||||
|
||||
prev.remove(c);
|
||||
}
|
||||
|
||||
/*
|
||||
if (!(c.isToken() || suppress || zone.is(Constant.Zone.Battlefield)) && !zone.is(Constant.Zone.Battlefield))
|
||||
copied = AllZone.getCardFactory().copyCard(copied);
|
||||
|
||||
@@ -1295,6 +1295,12 @@ public class MagicStack extends MyObservable {
|
||||
}
|
||||
}
|
||||
|
||||
for(SpellAbility sa : simultaneousStackEntryList) {
|
||||
if(sa.getSourceTrigger() == triggerID) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -871,16 +871,8 @@ public abstract class Player extends GameEntity {
|
||||
return new CardList(cards);
|
||||
}
|
||||
|
||||
private static ArrayList<Zone> allZones = new ArrayList<Zone>();
|
||||
|
||||
static {
|
||||
for(Zone z : Constant.Zone.values()) {
|
||||
allZones.add(z);
|
||||
}
|
||||
}
|
||||
|
||||
public CardList getAllCards() {
|
||||
return getCardsIn(allZones);
|
||||
return getCardsIn(ALL_ZONES);
|
||||
}
|
||||
|
||||
public CardList getCardsIncludePhasingIn(final Constant.Zone zone) {
|
||||
|
||||
@@ -30,6 +30,7 @@ import forge.deck.DeckRecognizer;
|
||||
import forge.deck.DeckRecognizer.TokenType;
|
||||
import forge.game.GameType;
|
||||
import forge.gui.GuiUtils;
|
||||
import forge.item.CardPrinted;
|
||||
|
||||
/**
|
||||
* Dialog for quick import of decks
|
||||
@@ -176,10 +177,14 @@ public class DeckImport extends JDialog {
|
||||
DeckRecognizer.TokenType type = t.getType();
|
||||
if (type == DeckRecognizer.TokenType.SectionName && t.getText().toLowerCase().contains("side") ) { isMain = false; }
|
||||
if (type != DeckRecognizer.TokenType.KnownCard) { continue; }
|
||||
CardPrinted crd = t.getCard();
|
||||
if(crd.isAlternate()) {
|
||||
continue;
|
||||
}
|
||||
if (isMain) {
|
||||
result.addMain(t.getCard(), t.getNumber());
|
||||
result.addMain(crd, t.getNumber());
|
||||
} else {
|
||||
result.addSideboard(t.getCard(), t.getNumber());
|
||||
result.addSideboard(crd, t.getNumber());
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user