"Sword of the Fallen"
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
package com.gempukku.lotro.cards.set15.elven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
|
||||
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.GameState;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Hunters
|
||||
* Side: Free
|
||||
* Culture: Elven
|
||||
* Twilight Cost: 2
|
||||
* Type: Possession • Hand Weapon
|
||||
* Strength: +1
|
||||
* Game Text: Bearer must be an Elf. Each minion skirmishing bearer is strength -1 for each wound on that minion.
|
||||
* Skirmish: Exert bearer to exert a minion skirmishing bearer.
|
||||
*/
|
||||
public class Card15_025 extends AbstractAttachableFPPossession {
|
||||
public Card15_025() {
|
||||
super(2, 1, 0, Culture.ELVEN, PossessionClass.HAND_WEAPON, "Sword of the Fallen");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Race.ELF;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
|
||||
return Collections.singletonList(
|
||||
new StrengthModifier(self, Filters.and(CardType.MINION, Filters.inSkirmishAgainst(Filters.hasAttached(self)), Filters.wounded), null,
|
||||
new Evaluator() {
|
||||
@Override
|
||||
public int evaluateExpression(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard cardAffected) {
|
||||
return -gameState.getWounds(cardAffected);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
||||
&& PlayConditions.canExert(self, game, self.getAttachedTo())) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ExertCharactersEffect(self, self.getAttachedTo()));
|
||||
action.appendEffect(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.MINION, Filters.inSkirmishAgainst(self.getAttachedTo())));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user