"Gondor Bow"

This commit is contained in:
marcins78@gmail.com
2011-11-02 15:47:17 +00:00
parent 6a7610cf15
commit 3ce1eaaf7b

View File

@@ -0,0 +1,57 @@
package com.gempukku.lotro.cards.set7.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
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.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Set: The Return of the King
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Possession • Ranged Weapon
* Game Text: Bearer must be a [GONDOR] Man. If bearer is a knight, he or she is strength +1. Skirmish: Exert bearer
* to wound a minion he or she is skirmishing if that minion bears a fortification.
*/
public class Card7_094 extends AbstractAttachableFPPossession {
public Card7_094() {
super(1, 0, 0, Culture.GONDOR, PossessionClass.RANGED_WEAPON, "Gondor Bow");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
return Collections.singletonList(
new StrengthModifier(self, Filters.and(Filters.hasAttached(self), Keyword.KNIGHT), 1));
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, Filters.hasAttached(self))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ExertCharactersEffect(self, self.getAttachedTo()));
action.appendEffect(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.MINION, Filters.inSkirmishAgainst(Filters.hasAttached(self)), Filters.hasAttached(Keyword.FORTIFICATION)));
return Collections.singletonList(action);
}
return null;
}
}