Merge pull request #283 from tool4ever/caststuff

Fix casting card copies not being added to stack correctly
This commit is contained in:
Anthony Calosa
2022-05-08 05:53:50 +08:00
committed by GitHub
4 changed files with 12 additions and 7 deletions

View File

@@ -275,7 +275,12 @@ public class GameAction {
lastKnownInfo = CardUtil.getLKICopy(c);
}
copied = CardFactory.copyCard(c, false);
// CR 707.12 casting of a card copy, don't copy it again
if (zoneTo.is(ZoneType.Stack) && c.isRealToken()) {
copied = c;
} else {
copied = CardFactory.copyCard(c, false);
}
if (zoneTo.is(ZoneType.Stack)) {
// when moving to stack, copy changed card information

View File

@@ -34,7 +34,7 @@ public class AbandonEffect extends SpellAbilityEffect {
if (sa.hasParam("RememberAbandoned")) {
source.addRemembered(source);
}
game.getTriggerHandler().suppressMode(TriggerType.ChangesZone);
controller.getZone(ZoneType.Command).remove(source);
game.getTriggerHandler().clearSuppression(TriggerType.ChangesZone);

View File

@@ -35,13 +35,13 @@ public class BalanceEffect extends SpellAbilityEffect {
Game game = activator.getGame();
String valid = sa.getParamOrDefault("Valid", "Card");
ZoneType zone = sa.hasParam("Zone") ? ZoneType.smartValueOf(sa.getParam("Zone")) : ZoneType.Battlefield;
int min = Integer.MAX_VALUE;
final FCollectionView<Player> players = game.getPlayersInTurnOrder();
final List<CardCollection> validCards = new ArrayList<>(players.size());
Map<Player, CardCollectionView> discardedMap = Maps.newHashMap();
for (int i = 0; i < players.size(); i++) {
// Find the minimum of each Valid per player
validCards.add(CardLists.getValidCards(players.get(i).getCardsIn(zone), valid, activator, source, sa));

View File

@@ -33,7 +33,7 @@ public class BidLifeEffect extends SpellAbilityEffect {
} else {
startBidding = 0;
}
if (sa.hasParam("OtherBidder")) {
bidPlayers.add(activator);
bidPlayers.addAll(AbilityUtils.getDefinedPlayers(host, sa.getParam("OtherBidder"), sa));
@@ -62,7 +62,7 @@ public class BidLifeEffect extends SpellAbilityEffect {
}
}
}
host.setChosenNumber(bid);
host.addRemembered(winner);
final SpellAbility action = sa.getAdditionalAbility("BidSubAbility");