"Army Long Trained"
This commit is contained in:
@@ -0,0 +1,76 @@
|
|||||||
|
package com.gempukku.lotro.cards.set19.elven;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||||
|
import com.gempukku.lotro.cards.TriggerConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.ChoiceEffect;
|
||||||
|
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
|
||||||
|
import com.gempukku.lotro.cards.effects.ReturnCardsToHandEffect;
|
||||||
|
import com.gempukku.lotro.cards.effects.choose.ChooseAndTransferAttachableEffect;
|
||||||
|
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.OptionalTriggerAction;
|
||||||
|
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||||
|
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: Ages End
|
||||||
|
* Side: Free
|
||||||
|
* Culture: Elven
|
||||||
|
* Twilight Cost: 0
|
||||||
|
* Type: Condition
|
||||||
|
* Strength: +1
|
||||||
|
* Game Text: Bearer must be an [ELVEN] companion. Each time bearer wins a skirmish, you may transfer this condition
|
||||||
|
* to another [ELVEN] companion. At the start of the archery phase, you must exert bearer or return this condition
|
||||||
|
* to hand.
|
||||||
|
*/
|
||||||
|
public class Card19_005 extends AbstractAttachable {
|
||||||
|
public Card19_005() {
|
||||||
|
super(Side.FREE_PEOPLE, CardType.CONDITION, 0, Culture.ELVEN, null, "Army Long Trained");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
return Filters.and(Culture.ELVEN, CardType.COMPANION);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Modifier getAlwaysOnModifier(PhysicalCard self) {
|
||||||
|
return new StrengthModifier(self, Filters.hasAttached(self), 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (TriggerConditions.winsSkirmish(game, effectResult, self.getAttachedTo())) {
|
||||||
|
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||||
|
action.appendEffect(
|
||||||
|
new ChooseAndTransferAttachableEffect(action, playerId, self, null, Filters.and(Culture.ELVEN, CardType.COMPANION)));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (TriggerConditions.startOfPhase(game, effectResult, Phase.ARCHERY)) {
|
||||||
|
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||||
|
List<Effect> possibleEffects = new LinkedList<Effect>();
|
||||||
|
possibleEffects.add(
|
||||||
|
new ExertCharactersEffect(self, self.getAttachedTo()));
|
||||||
|
possibleEffects.add(
|
||||||
|
new ReturnCardsToHandEffect(self, self));
|
||||||
|
action.appendEffect(
|
||||||
|
new ChoiceEffect(action, self.getOwner(), possibleEffects));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user