"Bow of Minas Tirith"

This commit is contained in:
marcins78@gmail.com
2011-12-04 22:24:23 +00:00
parent 87ee5f5472
commit 33c23f7bdf
2 changed files with 58 additions and 0 deletions

View File

@@ -72,6 +72,10 @@ public class PlayConditions {
return (phase == null || game.getGameState().getCurrentPhase() == phase) && (game.getGameState().getCurrentSite() == self);
}
public static boolean location(LotroGame game, Filterable... filters) {
return Filters.and(filters).accepts(game.getGameState(), game.getModifiersQuerying(), game.getGameState().getCurrentSite());
}
public static boolean stackedOn(PhysicalCard card, LotroGame game, Filterable... filters) {
return Filters.and(filters).accepts(game.getGameState(), game.getModifiersQuerying(), card.getStackedOn());
}

View File

@@ -0,0 +1,54 @@
package com.gempukku.lotro.cards.set11.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Shadows
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Possession • Ranged Weapon
* Strength: +1
* Game Text: Bearer must be a [GONDOR] Man. At the start of the archery phase, if bearer is at a battleground site,
* you may exert him or her to make the fellowship archery total +1.
*/
public class Card11_058 extends AbstractAttachableFPPossession {
public Card11_058() {
super(1, 1, 0, Culture.GONDOR, PossessionClass.RANGED_WEAPON, "Bow of Minas Tirith");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.ARCHERY)
&& PlayConditions.location(game, Keyword.BATTLEGROUND)
&& PlayConditions.canExert(self, game, Filters.hasAttached(self))) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new ExertCharactersEffect(self, self.getAttachedTo()));
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 1), Phase.ARCHERY));
return Collections.singletonList(action);
}
return null;
}
}