"Rally Point"
This commit is contained in:
@@ -0,0 +1,42 @@
|
|||||||
|
package com.gempukku.lotro.cards.effects;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.common.Zone;
|
||||||
|
import com.gempukku.lotro.game.PhysicalCard;
|
||||||
|
import com.gempukku.lotro.game.state.LotroGame;
|
||||||
|
import com.gempukku.lotro.logic.timing.AbstractEffect;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
|
||||||
|
public class TransferToSupportEffect extends AbstractEffect {
|
||||||
|
private PhysicalCard _card;
|
||||||
|
|
||||||
|
public TransferToSupportEffect(PhysicalCard card) {
|
||||||
|
_card = card;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isPlayableInFull(LotroGame game) {
|
||||||
|
return _card.getZone() == Zone.ATTACHED;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getText(LotroGame game) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EffectResult.Type getType() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected FullEffectResult playEffectReturningResult(LotroGame game) {
|
||||||
|
if (isPlayableInFull(game)) {
|
||||||
|
game.getGameState().removeCardsFromZone(Collections.singleton(_card));
|
||||||
|
game.getGameState().addCardToZone(_card, Zone.SUPPORT);
|
||||||
|
return new FullEffectResult(null, true, true);
|
||||||
|
}
|
||||||
|
return new FullEffectResult(null, false, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package com.gempukku.lotro.cards.set5.gondor;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.TransferToSupportEffect;
|
||||||
|
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||||
|
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.effects.ChooseActiveCardEffect;
|
||||||
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: Battle of Helm's Deep
|
||||||
|
* Side: Free
|
||||||
|
* Culture: Gondor
|
||||||
|
* Twilight Cost: 1
|
||||||
|
* Type: Condition
|
||||||
|
* Game Text: Plays to your support area. Regroup: Exert a knight to transfer a [GONDOR] fortification borne by
|
||||||
|
* a minion to your support area.
|
||||||
|
*/
|
||||||
|
public class Card5_038 extends AbstractPermanent {
|
||||||
|
public Card5_038() {
|
||||||
|
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Rally Point");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.REGROUP, self)
|
||||||
|
&& PlayConditions.canExert(self, game, Keyword.KNIGHT)) {
|
||||||
|
final ActivateCardAction action = new ActivateCardAction(self);
|
||||||
|
action.appendCost(
|
||||||
|
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Keyword.KNIGHT));
|
||||||
|
action.appendEffect(
|
||||||
|
new ChooseActiveCardEffect(self, playerId, "Choose Fortification", Culture.GONDOR, Keyword.FORTIFICATION, Filters.attachedTo(CardType.MINION)) {
|
||||||
|
@Override
|
||||||
|
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||||
|
action.insertEffect(
|
||||||
|
new TransferToSupportEffect(card));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user