Small fixes here and there.
This commit is contained in:
@@ -49,7 +49,7 @@ public class DiscardCardAtRandomFromHandEffect extends AbstractEffect {
|
||||
gameState.sendMessage(_playerId + " randomly discards " + GameUtils.getCardLink(randomCard));
|
||||
gameState.removeCardsFromZone(Collections.singleton(randomCard));
|
||||
gameState.addCardToZone(randomCard, Zone.DISCARD);
|
||||
return new FullEffectResult(new EffectResult[]{new DiscardCardsFromHandResult(_source, Collections.singleton(randomCard))}, true, true);
|
||||
return new FullEffectResult(new EffectResult[]{new DiscardCardsFromHandResult(_source, Collections.singleton(randomCard), _forced)}, true, true);
|
||||
}
|
||||
return new FullEffectResult(null, false, false);
|
||||
}
|
||||
|
||||
@@ -2,16 +2,14 @@ package com.gempukku.lotro.cards.set1.shire;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseArbitraryCardsEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -35,12 +33,7 @@ public class Card1_300 extends AbstractPermanent {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseArbitraryCardsEffect(playerId, "Choose up to 2 cards to discard from hand", game.getGameState().getHand(playerId), 0, 2) {
|
||||
@Override
|
||||
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> selectedCards) {
|
||||
action.appendEffect(new DiscardCardsFromHandEffect(self, playerId, selectedCards, false));
|
||||
}
|
||||
});
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 0, 2, Filters.any));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -34,19 +34,19 @@ public class Card3_111 extends AbstractAlly {
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.DISCARD_FROM_HAND) {
|
||||
DiscardCardsFromHandResult discardCardsResult = (DiscardCardsFromHandResult) effectResult;
|
||||
|
||||
List<OptionalTriggerAction> actions = new LinkedList<OptionalTriggerAction>();
|
||||
for (PhysicalCard discardedCard : discardCardsResult.getDiscardedCards()) {
|
||||
// TODO This should only work if Shadow card makes you discard the card...
|
||||
PhysicalCard source = discardCardsResult.getSource();
|
||||
if (source != null && source.getBlueprint().getSide() == Side.SHADOW) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.or(Filters.type(CardType.MINION), Filters.and(Filters.side(Side.SHADOW), Filters.type(CardType.CONDITION)))));
|
||||
actions.add(action);
|
||||
if (discardCardsResult.isForced()) {
|
||||
List<OptionalTriggerAction> actions = new LinkedList<OptionalTriggerAction>();
|
||||
for (PhysicalCard discardedCard : discardCardsResult.getDiscardedCards()) {
|
||||
PhysicalCard source = discardCardsResult.getSource();
|
||||
if (source != null && source.getBlueprint().getSide() == Side.SHADOW) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.or(Filters.type(CardType.MINION), Filters.and(Filters.side(Side.SHADOW), Filters.type(CardType.CONDITION)))));
|
||||
actions.add(action);
|
||||
}
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -25,8 +25,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card3_118 extends AbstractSite {
|
||||
public Card3_118() {
|
||||
// TODO Check direction of the site
|
||||
super("The Great River", Block.FELLOWSHIP, 7, 6, null);
|
||||
super("The Great River", Block.FELLOWSHIP, 7, 6, Direction.RIGHT);
|
||||
addKeyword(Keyword.RIVER);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card3_119 extends AbstractSite {
|
||||
public Card3_119() {
|
||||
// TODO Check direction of the site
|
||||
super("House of Elrond", Block.FELLOWSHIP, 3, 0, null);
|
||||
super("House of Elrond", Block.FELLOWSHIP, 3, 0, Direction.RIGHT);
|
||||
addKeyword(Keyword.SANCTUARY);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,8 +24,7 @@ import java.util.List;
|
||||
*/
|
||||
public class Card3_120 extends AbstractSite {
|
||||
public Card3_120() {
|
||||
// TODO Check direction of the site
|
||||
super("Wastes of Emyn Muil", Block.FELLOWSHIP, 9, 9, null);
|
||||
super("Wastes of Emyn Muil", Block.FELLOWSHIP, 9, 9, Direction.LEFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -61,7 +61,7 @@ public class DiscardCardsFromHandEffect extends AbstractEffect {
|
||||
for (PhysicalCard card : discardedCards)
|
||||
gameState.addCardToZone(card, Zone.DISCARD);
|
||||
|
||||
return new FullEffectResult(new EffectResult[]{new DiscardCardsFromHandResult(_source, discardedCards)}, discardedCards.size() == _cards.size(), discardedCards.size() == _cards.size());
|
||||
return new FullEffectResult(new EffectResult[]{new DiscardCardsFromHandResult(_source, discardedCards, _forced)}, discardedCards.size() == _cards.size(), discardedCards.size() == _cards.size());
|
||||
}
|
||||
|
||||
return new FullEffectResult(null, false, false);
|
||||
|
||||
@@ -8,11 +8,13 @@ import java.util.Collection;
|
||||
public class DiscardCardsFromHandResult extends EffectResult {
|
||||
private PhysicalCard _source;
|
||||
private Collection<PhysicalCard> _cards;
|
||||
private boolean _forced;
|
||||
|
||||
public DiscardCardsFromHandResult(PhysicalCard source, Collection<PhysicalCard> cards) {
|
||||
public DiscardCardsFromHandResult(PhysicalCard source, Collection<PhysicalCard> cards, boolean forced) {
|
||||
super(Type.DISCARD_FROM_HAND);
|
||||
_source = source;
|
||||
_cards = cards;
|
||||
_forced = forced;
|
||||
}
|
||||
|
||||
public PhysicalCard getSource() {
|
||||
@@ -22,4 +24,8 @@ public class DiscardCardsFromHandResult extends EffectResult {
|
||||
public Collection<PhysicalCard> getDiscardedCards() {
|
||||
return _cards;
|
||||
}
|
||||
|
||||
public boolean isForced() {
|
||||
return _forced;
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
<b>18 Oct. 2011</b>
|
||||
- Increased the time for playing game per player to 80 minutes (for testing only).
|
||||
- When players join or leave the room now, everyone in the room will be notified.
|
||||
- Added Mulligan rule to "Community..." formats and "Towers Standard" format.
|
||||
|
||||
<b>17 Oct. 2011</b>
|
||||
- "Coming for the Ring" is no longed considered Free People card by the game.
|
||||
|
||||
Reference in New Issue
Block a user