"Safe Paths"
This commit is contained in:
@@ -87,6 +87,11 @@ public class AttachPermanentAction extends AbstractCostToEffectAction {
|
||||
return _cardToAttach;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _cardToAttach;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Attach " + _cardToAttach.getBlueprint().getName();
|
||||
|
||||
@@ -67,6 +67,11 @@ public class PlayEventAction extends AbstractCostToEffectAction {
|
||||
return _eventPlayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _eventPlayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Play " + _eventPlayed.getBlueprint().getName();
|
||||
|
||||
@@ -51,6 +51,11 @@ public class PlayPermanentAction extends AbstractCostToEffectAction {
|
||||
return _permanentPlayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _permanentPlayed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Play " + _permanentPlayed.getBlueprint().getName();
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
package com.gempukku.lotro.cards.set6.gollum;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseActionProxyEffect;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfTurnModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.MoveLimitModifier;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
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.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Ents of Fangorn
|
||||
* Side: Free
|
||||
* Culture: Gollum
|
||||
* Twilight Cost: 5
|
||||
* Type: Event
|
||||
* Game Text: Regroup: Exert Smeagol 3 times and discard him to wound each minion. The move limit for this turn is +1.
|
||||
* If the fellowship moves, each Shadow player may take up to 3 Shadow cards into hand from his or her discard pile.
|
||||
*/
|
||||
public class Card6_044 extends AbstractEvent {
|
||||
public Card6_044() {
|
||||
super(Side.FREE_PEOPLE, 5, Culture.GOLLUM, "Safe Paths", Phase.REGROUP);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& PlayConditions.canExert(self, game, 3, Filters.name("Smeagol"))
|
||||
&& PlayConditions.canBeDiscarded(self, game, Filters.name("Smeagol"));
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 3, Filters.name("Smeagol")));
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.name("Smeagol")));
|
||||
action.appendEffect(
|
||||
new WoundCharactersEffect(self, CardType.MINION));
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfTurnModifierEffect(
|
||||
new MoveLimitModifier(self, 1)));
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseActionProxyEffect(
|
||||
new AbstractActionProxy() {
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterTriggers(String playerId, LotroGame lotroGame, EffectResult effectResults) {
|
||||
if (effectResults.getType() == EffectResult.Type.WHEN_FELLOWSHIP_MOVES
|
||||
&& !lotroGame.getGameState().getCurrentPlayerId().equals(playerId)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.setActionAttachedToCard(lotroGame.getGameState().getCurrentSite());
|
||||
action.appendEffect(
|
||||
new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 0, 3, Side.SHADOW));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}, Phase.REGROUP));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,11 @@ public class ActivateCardAction extends AbstractCostToEffectAction {
|
||||
return _physicalCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _physicalCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Use " + _physicalCard.getBlueprint().getName();
|
||||
|
||||
@@ -8,11 +8,17 @@ import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
public class OptionalTriggerAction extends AbstractCostToEffectAction {
|
||||
private PhysicalCard _physicalCard;
|
||||
private PhysicalCard _actionAttachedToCard;
|
||||
|
||||
private boolean _sentMessage;
|
||||
|
||||
public OptionalTriggerAction(PhysicalCard physicalCard) {
|
||||
_physicalCard = physicalCard;
|
||||
_actionAttachedToCard = physicalCard;
|
||||
}
|
||||
|
||||
public void setActionAttachedToCard(PhysicalCard actionAttachedToCard) {
|
||||
_actionAttachedToCard = actionAttachedToCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -20,6 +26,11 @@ public class OptionalTriggerAction extends AbstractCostToEffectAction {
|
||||
return _physicalCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _actionAttachedToCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return null;
|
||||
|
||||
@@ -35,6 +35,11 @@ public class PreventSubAction implements Action {
|
||||
return _action.getActionSource();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _action.getActionAttachedToCard();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Phase getActionTimeword() {
|
||||
return _action.getActionTimeword();
|
||||
|
||||
@@ -20,6 +20,11 @@ public class RequiredTriggerAction extends AbstractCostToEffectAction {
|
||||
return _physicalCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _physicalCard;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return null;
|
||||
|
||||
@@ -25,6 +25,11 @@ public class SubAction implements Action {
|
||||
return _action.getActionSource();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return _action.getActionAttachedToCard();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Phase getActionTimeword() {
|
||||
return _action.getActionTimeword();
|
||||
|
||||
@@ -10,6 +10,11 @@ public class SystemQueueAction extends AbstractCostToEffectAction {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return null;
|
||||
|
||||
@@ -30,7 +30,7 @@ public abstract class ActionSelectionDecision extends AbstractAwaitingDecision {
|
||||
private String[] getCardIds(List<? extends Action> actions) {
|
||||
String[] result = new String[actions.size()];
|
||||
for (int i = 0; i < result.length; i++) {
|
||||
PhysicalCard physicalCard = actions.get(i).getActionSource();
|
||||
PhysicalCard physicalCard = actions.get(i).getActionAttachedToCard();
|
||||
if (physicalCard != null)
|
||||
result[i] = String.valueOf(physicalCard.getBlueprintId());
|
||||
else
|
||||
|
||||
@@ -32,7 +32,7 @@ public abstract class CardActionSelectionDecision extends AbstractAwaitingDecisi
|
||||
private String[] getCardIds(List<? extends Action> actions) {
|
||||
String[] result = new String[actions.size()];
|
||||
for (int i = 0; i < result.length; i++)
|
||||
result[i] = String.valueOf(actions.get(i).getActionSource().getCardId());
|
||||
result[i] = String.valueOf(actions.get(i).getActionAttachedToCard().getCardId());
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,8 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
public interface Action {
|
||||
public PhysicalCard getActionSource();
|
||||
|
||||
public PhysicalCard getActionAttachedToCard();
|
||||
|
||||
public void setActionTimeword(Phase phase);
|
||||
|
||||
public Phase getActionTimeword();
|
||||
|
||||
@@ -42,6 +42,11 @@ public class PlayerReconcilesAction implements Action {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Player reconciles";
|
||||
|
||||
@@ -42,6 +42,11 @@ public class ResolveSkirmishAction implements Action {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Resolving skirmish";
|
||||
|
||||
@@ -29,6 +29,11 @@ public class SimpleEffectAction implements Action {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return _text;
|
||||
|
||||
@@ -11,6 +11,11 @@ public abstract class SystemAction implements Action {
|
||||
throw new UnsupportedOperationException("System action has no action source");
|
||||
}
|
||||
|
||||
@Override
|
||||
public PhysicalCard getActionAttachedToCard() {
|
||||
throw new UnsupportedOperationException("System action has no action source");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Phase getActionTimeword() {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user