"Armor"
This commit is contained in:
@@ -0,0 +1,52 @@
|
|||||||
|
package com.gempukku.lotro.cards.set1.gondor;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
|
||||||
|
import com.gempukku.lotro.cards.modifiers.CantTakeWoundsModifier;
|
||||||
|
import com.gempukku.lotro.common.Culture;
|
||||||
|
import com.gempukku.lotro.common.Keyword;
|
||||||
|
import com.gempukku.lotro.common.Phase;
|
||||||
|
import com.gempukku.lotro.filters.Filter;
|
||||||
|
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.DefaultCostToEffectAction;
|
||||||
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: The Fellowship of the Ring
|
||||||
|
* Side: Free
|
||||||
|
* Culture: Gondor
|
||||||
|
* Twilight Cost: 1
|
||||||
|
* Type: Possession • Armor
|
||||||
|
* Game Text: Bearer must be a Man. Bearer takes no more than 1 wound during each skirmish phase.
|
||||||
|
*/
|
||||||
|
public class Card1_092 extends AbstractAttachableFPPossession {
|
||||||
|
public Card1_092() {
|
||||||
|
super(1, Culture.GONDOR, "Armor");
|
||||||
|
addKeyword(Keyword.ARMOR);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
return Filters.and(Filters.keyword(Keyword.MAN), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.ARMOR))));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (PlayConditions.isWounded(effectResult, self.getAttachedTo())) {
|
||||||
|
DefaultCostToEffectAction action = new DefaultCostToEffectAction(self, null, "Apply damage prevention");
|
||||||
|
action.addEffect(
|
||||||
|
new AddUntilEndOfPhaseModifierEffect(
|
||||||
|
new CantTakeWoundsModifier(self, Filters.sameCard(self.getAttachedTo())), Phase.SKIRMISH));
|
||||||
|
return Collections.<Action>singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user