Fix triggered Iterable missing support for LKI (#8968)

This commit is contained in:
tool4ever
2025-10-21 10:58:53 +02:00
committed by GitHub
parent ea590f8574
commit 1188b6889a
3 changed files with 14 additions and 3 deletions

View File

@@ -185,7 +185,12 @@ public class AbilityUtils {
if (crd instanceof Card) {
c = game.getCardState((Card) crd);
} else if (crd instanceof Iterable) {
cards.addAll(IterableUtil.filter((Iterable<?>) crd, Card.class));
for (Card gameCard : IterableUtil.filter((Iterable<?>) crd, Card.class)) {
if (gameCard.isLKI()) {
gameCard = game.getCardState(gameCard);
}
cards.add(gameCard);
}
}
}
} else if (defined.startsWith("Replaced") && sa instanceof SpellAbility) {

View File

@@ -999,8 +999,14 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
boolean shuffleMandatory = true;
boolean searchedLibrary = false;
if (defined) {
fetchList = new CardCollection();
String param = chooseFromDef ? "ChooseFromDefined" : "Defined";
fetchList = AbilityUtils.getDefinedCards(source, sa.getParam(param), sa);
for (Card c : AbilityUtils.getDefinedCards(source, sa.getParam(param), sa)) {
Card gameCard = game.getCardState(c, null);
if (gameCard != null && c.equalsWithGameTimestamp(gameCard) && !gameCard.isPhasedOut()) {
fetchList.add(gameCard);
}
}
if (!sa.hasParam("ChangeNum")) {
changeNum = fetchList.size();
}

View File

@@ -2,7 +2,7 @@ Name:Sail into the West
ManaCost:2 G U
Types:Instant
A:SP$ Vote | Defined$ Player | Choices$ DBChangeZone,DBWheel | VoteTiedAbility$ DBWheel | StackDescription$ REP you, each player votes_{p:You}, {p:Player} each vote & each player returns_{p:Player} each return & each player may_{p:Player} may each | SpellDescription$ Will of the council — Starting with you, each player votes for return or embark. If return gets more votes, each player returns up to two cards from their graveyard to their hand, then you exile CARDNAME. If embark gets more votes or the vote is tied, each player may discard their hand and draw seven cards.
SVar:DBChangeZone:DB$ ChangeZone | Defined$ Player | Origin$ Graveyard | Destination$ Hand | ChangeNum$ 2 | Hidden$ True | SubAbility$ ExileSelf | SpellDescription$ If return gets more votes, each player returns up to two cards from their graveyard to their hand, then you exile CARDNAME.
SVar:DBChangeZone:DB$ ChangeZone | DefinedPlayer$ Player | Origin$ Graveyard | Destination$ Hand | ChangeNum$ 2 | Hidden$ True | SubAbility$ ExileSelf | SpellDescription$ If return gets more votes, each player returns up to two cards from their graveyard to their hand, then you exile CARDNAME.
SVar:ExileSelf:DB$ ChangeZone | Origin$ Stack | Destination$ Exile
SVar:DBWheel:DB$ Discard | Mode$ Hand | Defined$ Player | Optional$ True | RememberDiscardingPlayers$ True | SubAbility$ DBDraw | SpellDescription$ If embark gets more votes or the vote is tied, each player may discard their hand and draw seven cards.
SVar:DBDraw:DB$ Draw | Defined$ Remembered | NumCards$ 7 | SubAbility$ DBCleanup