"Break the Charge"

This commit is contained in:
marcins78@gmail.com
2011-10-17 12:32:10 +00:00
parent 411976f422
commit 3d6f8b884d
2 changed files with 46 additions and 0 deletions

View File

@@ -118,6 +118,10 @@ public class PlayConditions {
return Filters.countSpottable(game.getGameState(), game.getModifiersQuerying(), filters) >= count;
}
public static boolean canExertMultiple(PhysicalCard source, LotroGame game, int times, int count, Filterable... filters) {
return canExertMultiple(source, game.getGameState(), game.getModifiersQuerying(), times, count, filters);
}
public static boolean canExertMultiple(final PhysicalCard source, final GameState gameState, final ModifiersQuerying modifiersQuerying, final int times, final int count, Filterable... filters) {
final Filter filter = Filters.and(filters);
return gameState.iterateActiveCards(

View File

@@ -0,0 +1,42 @@
package com.gempukku.lotro.cards.set5.elven;
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.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
/**
* Set: Battle of Helm's Deep
* Side: Free
* Culture: Elven
* Twilight Cost: 2
* Type: Event
* Game Text: Archery: Exert 3 Elf companions to make the fellowship archery total +2.
*/
public class Card5_011 extends AbstractEvent {
public Card5_011() {
super(Side.FREE_PEOPLE, 2, Culture.ELVEN, "Break the Charge", Phase.ARCHERY);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
&& PlayConditions.canExertMultiple(self, game, 1, 3, Race.ELF, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 3, 3, Race.ELF, CardType.COMPANION));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 2), Phase.ARCHERY));
return action;
}
}