- "...put character in dead pile..." now is equivalent to "kill".

This commit is contained in:
marcins78@gmail.com
2011-11-24 20:35:05 +00:00
parent 44e8e40e04
commit 9e0c3541e8
6 changed files with 13 additions and 90 deletions

View File

@@ -1,82 +0,0 @@
package com.gempukku.lotro.cards.effects;
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.GameUtils;
import com.gempukku.lotro.logic.timing.AbstractEffect;
import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
public class PutCharacterFromPlayInDeadPileEffect extends AbstractEffect {
private PhysicalCard _card;
public PutCharacterFromPlayInDeadPileEffect(PhysicalCard card) {
_card = card;
}
@Override
public String getText(LotroGame game) {
return null;
}
@Override
public Type getType() {
return null;
}
@Override
public boolean isPlayableInFull(LotroGame game) {
return _card.getZone() != null && _card.getZone().isInPlay();
}
@Override
protected FullEffectResult playEffectReturningResult(LotroGame game) {
if (isPlayableInFull(game)) {
GameState gameState = game.getGameState();
gameState.sendMessage(GameUtils.getCardLink(_card) + " is put into dead pile");
// For result
Set<PhysicalCard> discardedCards = new HashSet<PhysicalCard>();
// Prepare the moves
Set<PhysicalCard> toRemoveFromZone = new HashSet<PhysicalCard>();
Set<PhysicalCard> toAddToDeadPile = new HashSet<PhysicalCard>();
Set<PhysicalCard> toAddToDiscard = new HashSet<PhysicalCard>();
toRemoveFromZone.add(_card);
toAddToDeadPile.add(_card);
List<PhysicalCard> attachedCards = gameState.getAttachedCards(_card);
discardedCards.addAll(attachedCards);
toRemoveFromZone.addAll(attachedCards);
toAddToDiscard.addAll(attachedCards);
List<PhysicalCard> stackedCards = gameState.getStackedCards(_card);
toRemoveFromZone.addAll(stackedCards);
toAddToDiscard.addAll(stackedCards);
gameState.removeCardsFromZone(null, toRemoveFromZone);
for (PhysicalCard deadCard : toAddToDeadPile)
gameState.addCardToZone(game, deadCard, Zone.DEAD);
for (PhysicalCard discardedCard : toAddToDiscard)
gameState.addCardToZone(game, discardedCard, Zone.DISCARD);
if (discardedCards.size() > 0) {
return new FullEffectResult(Arrays.asList(new DiscardCardsFromPlayResult(discardedCards)), true, true);
} else {
return new FullEffectResult(null, true, true);
}
}
return new FullEffectResult(null, false, false);
}
}

View File

@@ -3,13 +3,15 @@ package com.gempukku.lotro.cards.set7.sauron;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.PutCharacterFromPlayInDeadPileEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.KillEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import java.util.Collections;
/**
* Set: The Return of the King
* Side: Shadow
@@ -41,7 +43,7 @@ public class Card7_266 extends AbstractEvent {
@Override
protected void cardSelected(LotroGame game, final PhysicalCard card) {
action.insertEffect(
new PutCharacterFromPlayInDeadPileEffect(card));
new KillEffect(Collections.singletonList(card), KillEffect.Cause.CARD_EFFECT));
}
});
return action;

View File

@@ -3,7 +3,6 @@ package com.gempukku.lotro.cards.set8.gandalf;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.PutCharacterFromPlayInDeadPileEffect;
import com.gempukku.lotro.cards.effects.ShuffleDeckEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDeckIntoHandEffect;
import com.gempukku.lotro.common.CardType;
@@ -14,6 +13,9 @@ import com.gempukku.lotro.filters.Filters;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.KillEffect;
import java.util.Collections;
/**
* Set: Siege of Gondor
@@ -43,7 +45,7 @@ public class Card8_020 extends AbstractEvent {
@Override
protected void cardSelected(LotroGame game, final PhysicalCard card) {
action.insertCost(
new PutCharacterFromPlayInDeadPileEffect(card));
new KillEffect(Collections.singletonList(card), KillEffect.Cause.CARD_EFFECT));
for (int i = 0; i < 3; i++)
action.appendEffect(
new ChooseAndPutCardFromDeckIntoHandEffect(action, playerId, 0, 1, card.getBlueprint().getCulture()));

View File

@@ -2,7 +2,6 @@ package com.gempukku.lotro.cards.set9.gandalf;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.PutCharacterFromPlayInDeadPileEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndPlayCardFromHandEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.filters.Filters;
@@ -10,6 +9,7 @@ import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.KillEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
@@ -46,7 +46,7 @@ public class Card9_027 extends AbstractPermanent {
PhysicalCard wizard = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Race.WIZARD, Filters.inSkirmish);
if (wizard != null)
action.appendEffect(
new PutCharacterFromPlayInDeadPileEffect(wizard));
new KillEffect(Collections.singletonList(wizard), KillEffect.Cause.CARD_EFFECT));
}
});
return Collections.singletonList(action);

View File

@@ -4,7 +4,6 @@ import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
import com.gempukku.lotro.cards.effects.PutCharacterFromPlayInDeadPileEffect;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
@@ -16,6 +15,7 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.KillEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
@@ -57,7 +57,7 @@ public class Card9_030 extends AbstractCompanion {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new PutCharacterFromPlayInDeadPileEffect(card));
new KillEffect(Collections.singletonList(card), KillEffect.Cause.CARD_EFFECT));
}
});
return Collections.singletonList(action);

View File

@@ -9,6 +9,7 @@ at a time (because of the Rule of 4 rule).
- If there is a choice of number involved of 0-1 range (i.e. one token on "Grond"), it will be now possible to choose 1.
- "Shire Countryside" should only trigger when it's the FP player that removes the token.
- "Gandalf, Manager of Wizards" should now discard 3 cards from Shadow player hand to prevent the effect (if chosen).
- "...put character in dead pile..." now is equivalent to "kill".
<b>23 Nov. 2011</b>
- "Jarnsmid" now modifies the twilight cost of the itmes by -1, rather than +1.