This commit is contained in:
marcins78@gmail.com
2012-03-08 16:44:31 +00:00
parent d5bb93357d
commit 447efd76cd

View File

@@ -0,0 +1,88 @@
package com.gempukku.lotro.cards.set18.uruk_hai;
import com.gempukku.lotro.cards.AbstractMinion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.*;
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.actions.SubAction;
import com.gempukku.lotro.logic.effects.AssignmentEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Shadow
* Culture: Uruk-Hai
* Twilight Cost: 7
* Type: Minion • Uruk-Hai
* Strength: 13
* Vitality: 3
* Site: 5
* Game Text: Archer. Damage +1. Maneuver: Spot 6 companions to make Lurtz fierce until the regroup phase.
* Assignment: Exert Lurtz twice to assign it to an unbound companion. The Free Peoples player may exert that companion
* or add a burden to prevent this.
*/
public class Card18_118 extends AbstractMinion {
public Card18_118() {
super(7, 13, 3, 5, Race.URUK_HAI, Culture.URUK_HAI, "Lurtz", true);
addKeyword(Keyword.ARCHER);
addKeyword(Keyword.DAMAGE, 1);
}
@Override
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.MANEUVER, self, 0)
&& PlayConditions.canSpot(game, 6, CardType.COMPANION)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, self, Keyword.FIERCE), Phase.REGROUP));
return Collections.singletonList(action);
}
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.ASSIGNMENT, self, 0)
&& PlayConditions.canSelfExert(self, 2, game)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(self));
action.appendCost(
new SelfExertEffect(self));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose an unbound companion to assign to", Filters.unboundCompanion, Filters.assignableToSkirmishAgainst(Side.SHADOW, self)) {
@Override
protected void cardSelected(LotroGame game, final PhysicalCard companion) {
action.appendEffect(
new PreventableEffect(action,
new AssignmentEffect(playerId, companion, self), game.getGameState().getCurrentPlayerId(),
new PreventableEffect.PreventionCost() {
@Override
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
List<Effect> possibleCosts = new LinkedList<Effect>();
possibleCosts.add(
new ExertCharactersEffect(self, companion));
possibleCosts.add(
new AddBurdenEffect(self, 1));
return new ChoiceEffect(subAction, playerId, possibleCosts) {
@Override
public String getText(LotroGame game) {
return "Exert that companion or add a burden";
}
};
}
}));
}
});
return Collections.singletonList(action);
}
return null;
}
}