diff --git a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/LiberateASiteEffect.java b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/LiberateASiteEffect.java index 8e10a63af..d98b6fdd4 100644 --- a/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/LiberateASiteEffect.java +++ b/gemp-lotr/gemp-lotr-cards/src/main/java/com/gempukku/lotro/cards/effects/LiberateASiteEffect.java @@ -6,8 +6,12 @@ import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.state.LotroGame; import com.gempukku.lotro.logic.timing.AbstractEffect; import com.gempukku.lotro.logic.timing.Effect; +import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult; +import java.util.Collections; +import java.util.HashSet; import java.util.List; +import java.util.Set; public class LiberateASiteEffect extends AbstractEffect { private PhysicalCard _source; @@ -50,15 +54,23 @@ public class LiberateASiteEffect extends AbstractEffect { protected FullEffectResult playEffectReturningResult(LotroGame game) { PhysicalCard siteToLiberate = getSiteToLiberate(game); if (siteToLiberate != null) { + Set cardsToRemove = new HashSet(); + Set discardedCards = new HashSet(); List stackedCards = game.getGameState().getStackedCards(siteToLiberate); - game.getGameState().removeCardsFromZone(_source.getOwner(), stackedCards); - for (PhysicalCard stackedCard : stackedCards) - game.getGameState().addCardToZone(game, stackedCard, Zone.DISCARD); + cardsToRemove.addAll(stackedCards); + + List attachedCards = game.getGameState().getAttachedCards(siteToLiberate); + cardsToRemove.addAll(attachedCards); + discardedCards.addAll(attachedCards); + + game.getGameState().removeCardsFromZone(_source.getOwner(), cardsToRemove); + for (PhysicalCard removedCard : cardsToRemove) + game.getGameState().addCardToZone(game, removedCard, Zone.DISCARD); game.getGameState().loseControlOfCard(siteToLiberate, Zone.ADVENTURE_PATH); - return new FullEffectResult(null, true, true); + return new FullEffectResult(Collections.singleton(new DiscardCardsFromPlayResult(discardedCards)), true, true); } return new FullEffectResult(null, false, false); } diff --git a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html index e8d834adc..b85b05a5f 100644 --- a/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html +++ b/gemp-lotr/gemp-lotr-web/src/main/webapp/includes/changeLog.html @@ -2,6 +2,7 @@ 8 Nov. 2011 - "Gathering to the Summons" adds burden instead of twilight now. - "Rohirrim Village" will only not allow the Dunland Man to take wounds only in Archery phase. +- Attached cards to sites (played on) are now discarded when a site is liberated. 7 Nov. 2011 - "My Axe Is Notched" and "Final Count" should properly grant their strength bonuses now.