"Causeway Gate"

This commit is contained in:
marcins78
2013-02-05 17:29:25 +00:00
parent b09ff256a6
commit 60166b560c

View File

@@ -0,0 +1,64 @@
package com.gempukku.lotro.cards.set20.rohan;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.actions.PlayPermanentAction;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.cards.modifiers.CantTakeMoreThanXWoundsModifier;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* 2
* Causeway Gate
* Rohan Possession • Support Area
* Fortification.
* To play exert a [Rohan] Man.
* Each [Rohan] Man takes no more than one wound during each skirmish phase.
* Discard this condition at the start of the regroup phase
*/
public class Card20_315 extends AbstractPermanent {
public Card20_315() {
super(Side.FREE_PEOPLE, 2, CardType.POSSESSION, Culture.ROHAN, Zone.SUPPORT, "Causeway Gate");
addKeyword(Keyword.FORTIFICATION);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canExert(self, game, Culture.ROHAN, Race.MAN);
}
@Override
public PlayPermanentAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayPermanentAction action = super.getPlayCardAction(playerId, game, self, twilightModifier, ignoreRoamingPenalty);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.ROHAN, Race.MAN));
return action;
}
@Override
public Modifier getAlwaysOnModifier(PhysicalCard self) {
return new CantTakeMoreThanXWoundsModifier(self, Phase.SKIRMISH, 1, Culture.ROHAN, Race.MAN);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP)) {
RequiredTriggerAction action= new RequiredTriggerAction(self);
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
return null;
}
}