2 more cards
This commit is contained in:
@@ -223,11 +223,15 @@ public class PlayConditions {
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean canStackDeckTopCards(LotroGame game, String playerId, int cardCount, Filterable... onto) {
|
||||
public static boolean canStackDeckTopCards(PhysicalCard source, LotroGame game, String playerId, int cardCount, Filterable... onto) {
|
||||
return game.getGameState().getDeck(playerId).size() >= cardCount
|
||||
&& canSpot(game, onto);
|
||||
}
|
||||
|
||||
public static boolean canDiscardFromStacked(PhysicalCard source, LotroGame game, String playerId, final int cardCount, Filterable from, Filterable... stackedFilter) {
|
||||
return Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.and(from, Filters.hasStacked(cardCount, stackedFilter)));
|
||||
}
|
||||
|
||||
public static boolean canSpot(LotroGame game, Filterable... filters) {
|
||||
return canSpot(game, 1, filters);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ import java.util.List;
|
||||
* Response: If a Shadow card is about to discard any number of your [DWARVEN] conditions, discard this condition to prevent that.
|
||||
*/
|
||||
public class Card40_003 extends AbstractPermanent {
|
||||
public Card40_003(Side side, int twilightCost, CardType cardType, Culture culture, Zone playedToZone, String name) {
|
||||
public Card40_003() {
|
||||
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.DWARVEN, Zone.SUPPORT, "Balin's Lament", null, true);
|
||||
addKeyword(Keyword.TALE);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
|
||||
* Game Text: Exert a Dwarf to wound up to two Goblins.
|
||||
*/
|
||||
public class Card40_004 extends AbstractEvent{
|
||||
public Card40_004(Side side, int twilightCost, Culture culture, String name, Phase playableInPhase, Phase... additionalPlayableInPhases) {
|
||||
public Card40_004() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Balin's Revenge", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
* Game Text: Exert Gimli to have him replace an unbound companion in a skirmish. He is strength +2 and damage +1 while in that skirmish.
|
||||
*/
|
||||
public class Card40_005 extends AbstractEvent {
|
||||
public Card40_005(Side side, int twilightCost, Culture culture, String name, Phase playableInPhase, Phase... additionalPlayableInPhases) {
|
||||
public Card40_005() {
|
||||
super(Side.FREE_PEOPLE, 2, Culture.DWARVEN, "Battle Fever", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,14 +22,14 @@ import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
* Game Text: Stack the top 3 cards of your draw deck onto a [DWARVEN] support area condition to make a Dwarf take no more than one wound in a skirmish.
|
||||
*/
|
||||
public class Card40_006 extends AbstractEvent{
|
||||
public Card40_006(Side side, int twilightCost, Culture culture, String name, Phase playableInPhase, Phase... additionalPlayableInPhases) {
|
||||
public Card40_006() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Battle Tested", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.canStackDeckTopCards(game, self.getOwner(), 3, Culture.DWARVEN, Zone.SUPPORT, CardType.CONDITION);
|
||||
&& PlayConditions.canStackDeckTopCards(self, game, self.getOwner(), 3, Culture.DWARVEN, Zone.SUPPORT, CardType.CONDITION);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.gempukku.lotro.cards.set40.dwarven;
|
||||
|
||||
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.AddUntilStartOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardStackedCardsEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
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.modifiers.StrengthModifier;
|
||||
|
||||
/**
|
||||
* Title: Brothers in Arms
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1U7
|
||||
* Game Text: To play, exert two Dwarves and discard two cards stacked a [DWARVEN] condition.
|
||||
* Each exerted Dwarf is strength +2 until the regroup phase.
|
||||
*/
|
||||
public class Card40_007 extends AbstractEvent {
|
||||
public Card40_007() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Brothers in Arms", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
|
||||
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
|
||||
&& PlayConditions.canExert(self, game, 1, 2, Race.DWARF)
|
||||
&& PlayConditions.canDiscardFromStacked(self, game, self.getOwner(), 2, Filters.and(Culture.DWARVEN, CardType.CONDITION), Filters.any);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, self.getOwner(), 2, 2, Race.DWARF) {
|
||||
@Override
|
||||
protected void forEachCardExertedCallback(PhysicalCard character) {
|
||||
action.appendEffect(
|
||||
new AddUntilStartOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, character, 2), Phase.REGROUP));
|
||||
}
|
||||
});
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardStackedCardsEffect(action, self.getOwner(), 2, 2, Filters.and(Culture.DWARVEN, CardType.CONDITION), Filters.any));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.gempukku.lotro.cards.set40.dwarven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
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.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
|
||||
|
||||
/**
|
||||
* Title: Crushing Blow
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Dwarven
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1C8
|
||||
* Game Text: Make a Dwarf strength +2 (or +3 if you can spot a [DWARVEN] condition with a stacked card).
|
||||
*/
|
||||
public class Card40_008 extends AbstractEvent {
|
||||
public Card40_008() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.DWARVEN, "Crushing Blow", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(
|
||||
action, self, self.getOwner(), new Evaluator() {
|
||||
@Override
|
||||
public int evaluateExpression(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard cardAffected) {
|
||||
return Filters.canSpot(gameState, modifiersQuerying, Filters.hasStacked(Culture.DWARVEN, CardType.CONDITION))?3:2;
|
||||
}
|
||||
}, Race.DWARF));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -763,13 +763,17 @@ public class Filters {
|
||||
}
|
||||
|
||||
public static Filter hasStacked(final Filterable... filter) {
|
||||
return hasStacked(1, filter);
|
||||
}
|
||||
|
||||
public static Filter hasStacked(final int count, final Filterable... filter) {
|
||||
return new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
List<PhysicalCard> physicalCardList = gameState.getStackedCards(physicalCard);
|
||||
if (filter.length == 1 && filter[0] == Filters.any)
|
||||
return physicalCardList.size() > 0;
|
||||
return (Filters.filter(physicalCardList, gameState, modifiersQuerying, Filters.and(filter, activeSide)).size() > 0);
|
||||
return physicalCardList.size() >= count;
|
||||
return (Filters.filter(physicalCardList, gameState, modifiersQuerying, Filters.and(filter, activeSide)).size() >= count);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user