- Both "Forces of Mordor" and "Uruk Spy" now give a choice of number of minions to spot, therefore allowing to spot less
than are in play.
This commit is contained in:
@@ -13,9 +13,12 @@ import com.gempukku.lotro.filters.Filters;
|
|||||||
import com.gempukku.lotro.game.PhysicalCard;
|
import com.gempukku.lotro.game.PhysicalCard;
|
||||||
import com.gempukku.lotro.game.state.LotroGame;
|
import com.gempukku.lotro.game.state.LotroGame;
|
||||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||||
|
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||||
|
import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
|
||||||
|
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -37,24 +40,33 @@ public class Card1_155 extends AbstractMinion {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(final String playerId, final LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||||
if (effectResult.getType() == EffectResult.Type.PUT_ON_THE_ONE_RING
|
if (effectResult.getType() == EffectResult.Type.PUT_ON_THE_ONE_RING
|
||||||
&& PlayConditions.canExert(self, game, self)) {
|
&& PlayConditions.canExert(self, game, self)) {
|
||||||
final ActivateCardAction action = new ActivateCardAction(self);
|
final ActivateCardAction action = new ActivateCardAction(self);
|
||||||
action.appendCost(new SelfExertEffect(action, self));
|
action.appendCost(new SelfExertEffect(action, self));
|
||||||
// TODO this should give option to player to spot less
|
|
||||||
int isengardMinionCount = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Culture.ISENGARD, CardType.MINION);
|
int isengardMinionCount = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Culture.ISENGARD, CardType.MINION);
|
||||||
for (int i = 0; i < isengardMinionCount; i++) {
|
if (isengardMinionCount > 0) {
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
new UnrespondableEffect() {
|
new PlayoutDecisionEffect(playerId,
|
||||||
@Override
|
new IntegerAwaitingDecision(1, "Choose number of minions to spot", 0, isengardMinionCount, isengardMinionCount) {
|
||||||
public void doPlayEffect(LotroGame game) {
|
@Override
|
||||||
List<? extends PhysicalCard> deck = game.getGameState().getDeck(playerId);
|
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||||
if (deck.size() > 0 && deck.get(0).getBlueprint().getSide() == Side.SHADOW)
|
int spotted = getValidatedResult(result);
|
||||||
action.appendEffect(new AddBurdenEffect(self.getOwner(), self, 1));
|
if (spotted > 0)
|
||||||
}
|
action.appendEffect(
|
||||||
});
|
new DiscardTopCardFromDeckEffect(self, playerId, spotted, false) {
|
||||||
action.appendEffect(new DiscardTopCardFromDeckEffect(self, playerId, false));
|
@Override
|
||||||
|
protected void cardsDiscardedCallback(Collection<PhysicalCard> cards) {
|
||||||
|
int shadow = Filters.filter(cards, game.getGameState(), game.getModifiersQuerying(), Side.SHADOW).size();
|
||||||
|
if (shadow > 0)
|
||||||
|
action.appendEffect(
|
||||||
|
new AddBurdenEffect(playerId, self, shadow));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}));
|
||||||
}
|
}
|
||||||
return Collections.singletonList(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,10 @@ import com.gempukku.lotro.common.Side;
|
|||||||
import com.gempukku.lotro.filters.Filters;
|
import com.gempukku.lotro.filters.Filters;
|
||||||
import com.gempukku.lotro.game.PhysicalCard;
|
import com.gempukku.lotro.game.PhysicalCard;
|
||||||
import com.gempukku.lotro.game.state.LotroGame;
|
import com.gempukku.lotro.game.state.LotroGame;
|
||||||
|
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||||
|
import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
|
||||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||||
|
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set: The Fellowship of the Ring
|
* Set: The Fellowship of the Ring
|
||||||
@@ -25,12 +28,22 @@ public class Card1_248 extends AbstractOldEvent {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||||
PlayEventAction action = new PlayEventAction(self);
|
final PlayEventAction action = new PlayEventAction(self);
|
||||||
// TODO This should give an option to spot less
|
|
||||||
int sauronMinions = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Culture.SAURON, CardType.MINION);
|
int sauronMinions = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Culture.SAURON, CardType.MINION);
|
||||||
action.appendEffect(
|
if (sauronMinions > 0)
|
||||||
new AddTwilightEffect(self, sauronMinions));
|
action.appendEffect(
|
||||||
|
new PlayoutDecisionEffect(playerId,
|
||||||
|
new IntegerAwaitingDecision(1, "Choose number of minions to spot", 0, sauronMinions, sauronMinions) {
|
||||||
|
@Override
|
||||||
|
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||||
|
int validatedResult = getValidatedResult(result);
|
||||||
|
if (validatedResult > 0)
|
||||||
|
action.appendEffect(
|
||||||
|
new AddTwilightEffect(self, validatedResult));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
));
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
<pre style="font-size:80%">
|
<pre style="font-size:80%">
|
||||||
|
<b>15 Dec. 2012</b>
|
||||||
|
- Both "Forces of Mordor" and "Uruk Spy" now give a choice of number of minions to spot, therefore allowing to spot less
|
||||||
|
than are in play.
|
||||||
|
|
||||||
<b>14 Dec. 2012</b>
|
<b>14 Dec. 2012</b>
|
||||||
- Effects that play attachments should now correctly check available twilight (including the cost of the effect)
|
- Effects that play attachments should now correctly check available twilight (including the cost of the effect)
|
||||||
before being allowed to be played.
|
before being allowed to be played.
|
||||||
|
|||||||
Reference in New Issue
Block a user