"Uruk-hai Pike"

This commit is contained in:
marcins78
2013-01-30 13:48:39 +00:00
parent b8595854c4
commit 6c0eea88bf

View File

@@ -0,0 +1,60 @@
package com.gempukku.lotro.cards.set20.isengard;
import com.gempukku.lotro.cards.AbstractAttachable;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.AddUntilEndOfTurnModifierEffect;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.modifiers.HasInitiativeModifier;
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.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* 2
* Uruk-hai Pike
* Isengard Possession • Hand Weapon
* +2
* Bearer must be an Uruk-hai.
* Response: If bearer wins a skirmish, discard this possess to make the Shadow player have initiative until
* the end of the turn regardless of the Free Peoples Players hand.
*/
public class Card20_234 extends AbstractAttachable {
public Card20_234() {
super(Side.SHADOW, CardType.POSSESSION, 2, Culture.ISENGARD, PossessionClass.HAND_WEAPON, "Uruk-hai Pike");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Race.URUK_HAI;
}
@Override
public Modifier getAlwaysOnModifier(PhysicalCard self) {
return new StrengthModifier(self, Filters.hasAttached(self), 2);
}
@Override
public List<? extends Action> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Filters.hasAttached(self))
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new AddUntilEndOfTurnModifierEffect(
new HasInitiativeModifier(self, null, Side.SHADOW)));
return Collections.singletonList(action);
}
return null;
}
}