Merge remote-tracking branch 'phallen/patch-10' into bug/march-bugs

This commit is contained in:
Christian 'ketura' McCarty
2025-04-01 20:47:54 -05:00
3 changed files with 38 additions and 60 deletions

View File

@@ -605,22 +605,12 @@
]
effects: [
{
type: If
check: {
type: cantSpot
filter: culture(dwarven),possession
}
true: {
type: exert
select: choose(dwarf,companion)
}
type: exert
select: choose(dwarf,companion)
}
{
type: If
check: {
type: canSpot
filter: culture(dwarven),possession
}
type: spot
filter: culture(dwarven),possession
}
]
}

View File

@@ -379,54 +379,26 @@
}
{
type: canSpot
filter: culture(gundabad),orc
filter: culture(gundabad),orc,assignableToSkirmishAgainst(name(Bilbo))
}
]
effect: [
{
type: chooseActiveCards
text: Choose minion to assign to Bilbo
select: choose(culture(gundabad),orc,assignableToSkirmishAgainst(name(Bilbo)))
memorize: chosenMinion
effect: {
type: assignFpCharacterToSkirmish
fpCharacter: choose(name(Bilbo))
minion: choose(culture(gundabad),orc,assignableToSkirmishAgainst(name(Bilbo)))
memorizeFPCharacter: bilbo
memorizeMinion: chosenMinion
preventText: Would you like to add a burden and assign {chosenMinion} to prevent assigning Bilbo to that minion?
preventCost: {
type: addBurdens
}
{
type: optional
player: fp
text: Would you like to add a doubt to assign {chosenMinion} to a companion?
effect: [
{
type: addBurdens
}
{
type: assignFpCharacterToSkirmish
player: fp
fpCharacter: choose(companion)
minion: choose(memory(chosenMinion))
}
]
insteadEffect: {
type: assignFpCharacterToSkirmish
player: free people
fpCharacter: choose(any)
minion: choose(memory(chosenMinion))
}
{
type: preventable
player: fp
text: assignFpCharacterToSkirmish doesn't work here for some reason, so this cost registers as unable to be attempted and the effect assigns the minion if the FP passed on the optional above
cost: [
{
type: addBurdens
}
{
type: assignFpCharacterToSkirmish
player: shadowPlayer
fpCharacter: choose(companion)
minion: choose(memory(chosenMinion))
}
]
effect: {
type: assignFpCharacterToSkirmish
fpCharacter: choose(name(Bilbo))
minion: choose(memory(chosenMinion))
}
}
]
}
}
]
}

View File

@@ -16,6 +16,7 @@ import com.gempukku.lotro.logic.GameUtils;
import com.gempukku.lotro.logic.actions.CostToEffectAction;
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult;
import org.json.simple.JSONObject;
import java.util.*;
@@ -52,10 +53,25 @@ public class PutCardsFromPlayOnBottomOfDeck implements EffectAppenderProducer {
}
GameState gameState = game.getGameState();
gameState.sendMessage(card.getOwner() + " puts " + GameUtils.getCardLink(card) + " from play on the bottom of deck");
gameState.removeCardsFromZone(card.getOwner(), Collections.singleton(card));
Set<PhysicalCard> discardedFromPlayCards = new HashSet<>();
Set<PhysicalCard> toMoveToDiscardCards = new HashSet<>();
DiscardUtils.cardsToChangeZones(game, Collections.singleton(card), discardedFromPlayCards, toMoveToDiscardCards);
Set<PhysicalCard> removeFromPlay = new HashSet<>(toMoveToDiscardCards);
removeFromPlay.add(card);
gameState.removeCardsFromZone(card.getOwner(), removeFromPlay);
for (PhysicalCard attachedCard : toMoveToDiscardCards)
gameState.addCardToZone(game, attachedCard, Zone.DISCARD);
gameState.sendMessage(card.getOwner() + " puts " + GameUtils.getCardLink(card) + " from play on the bottom of deck");
gameState.putCardOnBottomOfDeck(card);
for (PhysicalCard discardedCard : discardedFromPlayCards)
game.getActionsEnvironment().emitEffectResult(new DiscardCardsFromPlayResult(null, null, discardedCard));
}
});
}