"Dead Ones"

This commit is contained in:
marcins78@gmail.com
2011-10-22 18:35:43 +00:00
parent 22fdeb9c5c
commit 514f4cb856
12 changed files with 57 additions and 37 deletions

View File

@@ -34,8 +34,9 @@ public class Card1_239 extends AbstractOldEvent {
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) { public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
final PlayEventAction action = new PlayEventAction(self); final PlayEventAction action = new PlayEventAction(self);
int companionCount = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.COMPANION)); int companionCount = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.COMPANION));
action.appendEffect( for (int i = 0; i < companionCount - 4; i++)
new ChooseAndExertCharactersEffect(action, playerId, companionCount - 4, companionCount - 4, Filters.type(CardType.COMPANION))); action.appendEffect(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.type(CardType.COMPANION)));
return action; return action;
} }

View File

@@ -61,12 +61,11 @@ public class Card4_033 extends AbstractMinion {
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) { public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.WHEN_FELLOWSHIP_MOVES) { if (effectResult.getType() == EffectResult.Type.WHEN_FELLOWSHIP_MOVES) {
int dunlandManCount = Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.DUNLAND), Filters.race(Race.MAN)); int dunlandManCount = Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.DUNLAND), Filters.race(Race.MAN));
if (dunlandManCount > 0) { RequiredTriggerAction action = new RequiredTriggerAction(self);
RequiredTriggerAction action = new RequiredTriggerAction(self); for (int i = 0; i < dunlandManCount; i++)
action.appendEffect( action.appendEffect(
new ChooseAndExertCharactersEffect(action, game.getGameState().getCurrentPlayerId(), dunlandManCount, dunlandManCount, Filters.type(CardType.COMPANION))); new ChooseAndExertCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, Filters.type(CardType.COMPANION)));
return Collections.singletonList(action); return Collections.singletonList(action);
}
} }
return null; return null;
} }

View File

@@ -52,8 +52,9 @@ public class Card4_055 extends AbstractOldEvent {
new ShuffleCardsFromPlayAndStackedOnItIntoDeckEffect(self, playerId, Collections.singleton(card)) { new ShuffleCardsFromPlayAndStackedOnItIntoDeckEffect(self, playerId, Collections.singleton(card)) {
@Override @Override
protected void cardsShuffledCallback(Set<PhysicalCard> cardsShuffled) { protected void cardsShuffledCallback(Set<PhysicalCard> cardsShuffled) {
action.appendEffect( for (int i = 0; i < cardsShuffled.size(); i++)
new ChooseAndExertCharactersEffect(action, playerId, cardsShuffled.size(), cardsShuffled.size(), Filters.type(CardType.MINION))); action.appendEffect(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.type(CardType.MINION)));
} }
}); });

View File

@@ -47,9 +47,9 @@ public class Card4_088 extends AbstractPermanent {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) { if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
final ActivateCardAction action = new ActivateCardAction(self); final ActivateCardAction action = new ActivateCardAction(self);
int tokenCount = game.getGameState().getTokenCount(self, Token.GANDALF); int tokenCount = game.getGameState().getTokenCount(self, Token.GANDALF);
if (tokenCount > 0) for (int i = 0; i < tokenCount; i++)
action.appendEffect( action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, tokenCount, Filters.type(CardType.MINION), Filters.inSkirmishAgainst(Filters.name("Gandalf")))); new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.type(CardType.MINION), Filters.inSkirmishAgainst(Filters.name("Gandalf"))));
action.appendEffect( action.appendEffect(
new DiscardCardsFromPlayEffect(self, self)); new DiscardCardsFromPlayEffect(self, self));
return Collections.singletonList(action); return Collections.singletonList(action);

View File

@@ -46,9 +46,10 @@ public class Card4_126 extends AbstractPermanent {
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) { protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.MANEUVER, self)) { if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.MANEUVER, self)) {
ActivateCardAction action = new ActivateCardAction(self); ActivateCardAction action = new ActivateCardAction(self);
int tokens = game.getGameState().getTokenCount(self, Token.GONDOR); int tokens = Math.min(3, game.getGameState().getTokenCount(self, Token.GONDOR));
action.appendEffect( for (int i = 0; i < tokens; i++)
new ChooseAndExertCharactersEffect(action, playerId, tokens, tokens, Filters.type(CardType.MINION))); action.appendEffect(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.type(CardType.MINION)));
action.appendEffect( action.appendEffect(
new DiscardCardsFromPlayEffect(self, self)); new DiscardCardsFromPlayEffect(self, self));
return Collections.singletonList(action); return Collections.singletonList(action);

View File

@@ -37,8 +37,9 @@ public class Card4_364 extends AbstractCompanion {
&& PlayConditions.canSpot(game, Race.HOBBIT, Filters.unboundCompanion)) { && PlayConditions.canSpot(game, Race.HOBBIT, Filters.unboundCompanion)) {
int count = Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Race.HOBBIT, Filters.unboundCompanion); int count = Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), Race.HOBBIT, Filters.unboundCompanion);
OptionalTriggerAction action = new OptionalTriggerAction(self); OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect( for (int i = 0; i < count; i++)
new ChooseAndWoundCharactersEffect(action, playerId, count, count, CardType.MINION)); action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION));
return Collections.singletonList(action); return Collections.singletonList(action);
} }
return null; return null;

View File

@@ -50,8 +50,9 @@ public class Card4_216 extends AbstractPermanent {
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.ARCHERY, self, 0)) { if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.ARCHERY, self, 0)) {
ActivateCardAction action = new ActivateCardAction(self); ActivateCardAction action = new ActivateCardAction(self);
int count = game.getGameState().getTokenCount(self, Token.RAIDER); int count = game.getGameState().getTokenCount(self, Token.RAIDER);
action.appendEffect( for (int i = 0; i < count; i++)
new ChooseAndHealCharactersEffect(action, playerId, count, count, Filters.culture(Culture.RAIDER), Filters.keyword(Keyword.ARCHER))); action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, Filters.culture(Culture.RAIDER), Filters.keyword(Keyword.ARCHER)));
action.appendEffect( action.appendEffect(
new DiscardCardsFromPlayEffect(self, self)); new DiscardCardsFromPlayEffect(self, self));
return Collections.singletonList(action); return Collections.singletonList(action);

View File

@@ -68,9 +68,9 @@ public class Card5_028 extends AbstractCompanion {
action.appendEffect( action.appendEffect(
new PutCardsOnBottomInAnyOrderEffect(game, playerId, cards)); new PutCardsOnBottomInAnyOrderEffect(game, playerId, cards));
game.getActionsEnvironment().addActionToStack(subAction); game.getActionsEnvironment().addActionToStack(subAction);
if (shadowCards > 0) for (int i = 0; i < shadowCards; i++)
action.appendEffect( action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, shadowCards, shadowCards, CardType.MINION)); new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION));
} }
}); });
return Collections.singletonList(action); return Collections.singletonList(action);
@@ -108,17 +108,17 @@ public class Card5_028 extends AbstractCompanion {
} else if (_cards.size() > 1) { } else if (_cards.size() > 1) {
game.getUserFeedback().sendAwaitingDecision( game.getUserFeedback().sendAwaitingDecision(
_playerId, new ArbitraryCardsSelectionDecision(1, "Choose card to put on bottom of deck", _cards, 1, 1) { _playerId, new ArbitraryCardsSelectionDecision(1, "Choose card to put on bottom of deck", _cards, 1, 1) {
@Override @Override
public void decisionMade(String result) throws DecisionResultInvalidException { public void decisionMade(String result) throws DecisionResultInvalidException {
final List<PhysicalCard> selectedCards = getSelectedCardsByResponse(result); final List<PhysicalCard> selectedCards = getSelectedCardsByResponse(result);
if (selectedCards.size() == 1) { if (selectedCards.size() == 1) {
PhysicalCard card = selectedCards.iterator().next(); PhysicalCard card = selectedCards.iterator().next();
_cards.remove(card); _cards.remove(card);
game.getGameState().removeCardsFromZone(Collections.singleton(card)); game.getGameState().removeCardsFromZone(Collections.singleton(card));
game.getGameState().putCardOnBottomOfDeck(card); game.getGameState().putCardOnBottomOfDeck(card);
} }
} }
}); });
} }
return null; return null;
} }

View File

@@ -46,8 +46,9 @@ public class Card6_059 extends AbstractAttachable {
if (PlayConditions.winsSkirmish(game, effectResult, self.getAttachedTo())) { if (PlayConditions.winsSkirmish(game, effectResult, self.getAttachedTo())) {
RequiredTriggerAction action = new RequiredTriggerAction(self); RequiredTriggerAction action = new RequiredTriggerAction(self);
int sitesControlled = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlled(self.getOwner())); int sitesControlled = Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.siteControlled(self.getOwner()));
action.appendEffect( for (int i = 0; i < sitesControlled; i++)
new ChooseAndExertCharactersEffect(action, game.getGameState().getCurrentPlayerId(), sitesControlled, sitesControlled, CardType.COMPANION)); action.appendEffect(
new ChooseAndExertCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, CardType.COMPANION));
return Collections.singletonList(action); return Collections.singletonList(action);
} }
return null; return null;

View File

@@ -37,8 +37,9 @@ public class Card6_087 extends AbstractMinion {
&& PlayConditions.canSpot(game, Race.NAZGUL, Filters.not(self))) { && PlayConditions.canSpot(game, Race.NAZGUL, Filters.not(self))) {
RequiredTriggerAction action = new RequiredTriggerAction(self); RequiredTriggerAction action = new RequiredTriggerAction(self);
int count = new CountCulturesEvaluator(2, 1, Side.FREE_PEOPLE).evaluateExpression(game.getGameState(), game.getModifiersQuerying(), null); int count = new CountCulturesEvaluator(2, 1, Side.FREE_PEOPLE).evaluateExpression(game.getGameState(), game.getModifiersQuerying(), null);
action.appendEffect( for (int i = 0; i < count; i++)
new ChooseAndExertCharactersEffect(action, game.getGameState().getCurrentPlayerId(), count, count, CardType.COMPANION, Keyword.RING_BOUND)); action.appendEffect(
new ChooseAndExertCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, CardType.COMPANION, Keyword.RING_BOUND));
return Collections.singletonList(action); return Collections.singletonList(action);
} }
return null; return null;

View File

@@ -1,6 +1,16 @@
package com.gempukku.lotro.common; package com.gempukku.lotro.common;
public enum Culture implements Filterable { public enum Culture implements Filterable {
DWARVEN, ELVEN, GANDALF, GOLLUM, GONDOR, ROHAN, SHIRE, DWARVEN("Dwarven"), ELVEN("Elven"), GANDALF("Gandalf"), GOLLUM("Gollum"), GONDOR("Gondor"), ROHAN("Rohan"), SHIRE("Shire"),
DUNLAND, ISENGARD, MEN, MORIA, ORC, RAIDER, SAURON, WRAITH DUNLAND("Dunland"), ISENGARD("Isengard"), MEN("Men"), MORIA("Moria"), ORC("Orc"), RAIDER("Raider"), SAURON("Sauron"), WRAITH("Wraith");
private String _humanReadable;
private Culture(String humanReadable) {
_humanReadable = humanReadable;
}
public String getHumanReadable() {
return _humanReadable;
}
} }

View File

@@ -1,4 +1,8 @@
<pre style="font-size:80%"> <pre style="font-size:80%">
<b>22 Oct. 2011</b>
- Fixed the cards that heal, exert or wound "for each" to allow healing, exerting or wounding the same character
multiple times (one at a time).
<b>21 Oct. 2011</b> <b>21 Oct. 2011</b>
- "Birchseed" no longer freezes the game, if you can pay the cost both ways (exert Hobbit and discard 2 cards). - "Birchseed" no longer freezes the game, if you can pay the cost both ways (exert Hobbit and discard 2 cards).