diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/DiscardAttachedCardsEffect.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/DiscardAttachedCardsEffect.java index 99070e8b9..971365db5 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/DiscardAttachedCardsEffect.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/DiscardAttachedCardsEffect.java @@ -4,11 +4,14 @@ import com.gempukku.lotro.common.Zone; import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.state.GameState; import com.gempukku.lotro.game.state.LotroGame; -import com.gempukku.lotro.logic.timing.UnrespondableEffect; +import com.gempukku.lotro.logic.timing.AbstractEffect; +import com.gempukku.lotro.logic.timing.EffectResult; +import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult; +import java.util.LinkedList; import java.util.List; -public class DiscardAttachedCardsEffect extends UnrespondableEffect { +public class DiscardAttachedCardsEffect extends AbstractEffect { private PhysicalCard _card; public DiscardAttachedCardsEffect(PhysicalCard card) { @@ -16,13 +19,32 @@ public class DiscardAttachedCardsEffect extends UnrespondableEffect { } @Override - public void doPlayEffect(LotroGame game) { + public boolean canPlayEffect(LotroGame game) { + return true; + } + + @Override + public EffectResult.Type getType() { + return EffectResult.Type.DISCARD_FROM_PLAY; + } + + @Override + public String getText() { + return "Discard attached cards"; + } + + @Override + public EffectResult playEffect(LotroGame game) { + List discardedCards = new LinkedList(); GameState gameState = game.getGameState(); List attachedCards = gameState.getAttachedCards(_card); for (PhysicalCard attachedCard : attachedCards) { gameState.stopAffecting(attachedCard); gameState.removeCardFromZone(attachedCard); gameState.addCardToZone(attachedCard, Zone.DISCARD); + discardedCards.add(attachedCard); } + + return new DiscardCardsFromPlayResult(discardedCards); } } diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/KillEffect.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/KillEffect.java index fda13ea17..9580ff5b3 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/KillEffect.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/effects/KillEffect.java @@ -1,5 +1,6 @@ package com.gempukku.lotro.logic.effects; +import com.gempukku.lotro.common.Side; import com.gempukku.lotro.common.Zone; import com.gempukku.lotro.game.PhysicalCard; import com.gempukku.lotro.game.state.GameState; @@ -40,7 +41,10 @@ public class KillEffect extends AbstractEffect { GameState gameState = game.getGameState(); gameState.stopAffecting(_card); gameState.removeCardFromZone(_card); - gameState.addCardToZone(_card, Zone.DEAD); + if (_card.getBlueprint().getSide() == Side.FREE_PEOPLE) + gameState.addCardToZone(_card, Zone.DEAD); + else + gameState.addCardToZone(_card, Zone.DISCARD); return new KillResult(_card); }