"We Left None Alive"

This commit is contained in:
marcins78@gmail.com
2011-10-22 17:48:27 +00:00
parent c6cfa2f7fb
commit 60fad398e2
2 changed files with 80 additions and 2 deletions

View File

@@ -0,0 +1,78 @@
package com.gempukku.lotro.cards.set6.rohan;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.AddTokenEffect;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.RemoveTokenEffect;
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.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Ents of Fangorn
* Side: Free
* Culture: Rohan
* Twilight Cost: 2
* Type: Condition
* Game Text: Plays to your support area. When you play this condition, you may spot a [ROHAN] Man to place 2 [ROHAN]
* tokens here. Skirmish: Discard this condition or remove a [ROHAN] token from here to make a [ROHAN] Man skirmishing
* an exhausted minion strength +2.
*/
public class Card6_097 extends AbstractPermanent {
public Card6_097() {
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.ROHAN, Zone.SUPPORT, "We Left None Alive", true);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.played(game, effectResult, self)
&& PlayConditions.canSpot(game, Culture.ROHAN, Race.MAN)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new AddTokenEffect(self, self, Token.ROHAN, 2));
return Collections.singletonList(action);
}
return null;
}
@Override
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<Effect>();
possibleCosts.add(
new DiscardCardsFromPlayEffect(self, self) {
@Override
public String getText(LotroGame game) {
return "Discard this condition";
}
});
possibleCosts.add(
new RemoveTokenEffect(self, self, Token.ROHAN) {
@Override
public String getText(LotroGame game) {
return "Remove a ROHAN token from here";
}
});
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Culture.ROHAN, Race.MAN, Filters.inSkirmishAgainst(CardType.MINION, Filters.exhausted)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -34,12 +34,12 @@ public class ChooseAndHealCharactersEffect extends ChooseActiveCardsEffect {
@Override
protected Filter getExtraFilter() {
return new Filter() {
return Filters.and(Filters.wounded, new Filter() {
@Override
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
return modifiersQuerying.canBeHealed(gameState, physicalCard);
}
};
});
}
@Override