"Soldier's Cache"
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
package com.gempukku.lotro.cards.set17.gondor;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.TriggerConditions;
|
||||
import com.gempukku.lotro.cards.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.cards.effects.ReinforceTokenEffect;
|
||||
import com.gempukku.lotro.cards.effects.SpotEffect;
|
||||
import com.gempukku.lotro.cards.effects.TransferPermanentEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
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.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Rise of Saruman
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 2
|
||||
* Type: Condition • Support Area
|
||||
* Site: +3
|
||||
* Game Text: Fortification. At the start of your maneuver phase, you may spot 3 rangers or exert a [GONDOR] Man
|
||||
* to transfer this condition to a minion. Wound that minion. Regroup: Exert a ranger to reinforce a [GONDOR] token.
|
||||
*/
|
||||
public class Card17_035 extends AbstractPermanent {
|
||||
public Card17_035() {
|
||||
super(Side.FREE_PEOPLE, 2, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Soldier's Cache");
|
||||
addKeyword(Keyword.FORTIFICATION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (TriggerConditions.startOfPhase(game, effectResult, Phase.MANEUVER)
|
||||
&&
|
||||
(PlayConditions.canSpot(game, 3, Keyword.RANGER)
|
||||
|| PlayConditions.canExert(self, game, Culture.GONDOR, Race.MAN))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
List<Effect> possibleCosts = new LinkedList<Effect>();
|
||||
possibleCosts.add(
|
||||
new SpotEffect(3, Keyword.RANGER) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Spot 3 rangers";
|
||||
}
|
||||
});
|
||||
possibleCosts.add(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GONDOR, Race.MAN) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Exert a GONDOR Man";
|
||||
}
|
||||
});
|
||||
action.appendCost(
|
||||
new ChoiceEffect(action, playerId, possibleCosts));
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
action.appendEffect(
|
||||
new TransferPermanentEffect(self, card));
|
||||
action.appendEffect(
|
||||
new WoundCharactersEffect(self, card));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
|
||||
&& PlayConditions.canExert(self, game, Keyword.RANGER)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Keyword.RANGER));
|
||||
action.appendEffect(
|
||||
new ReinforceTokenEffect(self, playerId, Token.GONDOR));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user