Changing how the allies are played (simplified).
This commit is contained in:
@@ -14,6 +14,7 @@ import com.gempukku.lotro.logic.effects.HealCharacterEffect;
|
|||||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class AbstractAlly extends AbstractLotroCardBlueprint {
|
public class AbstractAlly extends AbstractLotroCardBlueprint {
|
||||||
@@ -34,19 +35,35 @@ public class AbstractAlly extends AbstractLotroCardBlueprint {
|
|||||||
_vitality = vitality;
|
_vitality = vitality;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void appendPlayAllyActions(List<Action> actions, LotroGame lotroGame, PhysicalCard self) {
|
@Override
|
||||||
ModifiersQuerying modifiersQuerying = lotroGame.getModifiersQuerying();
|
public final List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
if (PlayConditions.canPlayCharacterDuringFellowship(lotroGame.getGameState(), modifiersQuerying, self)) {
|
List<Action> actions = new LinkedList<Action>();
|
||||||
actions.add(new PlayPermanentAction(self, Zone.FREE_SUPPORT));
|
|
||||||
|
if (checkPlayRequirements(playerId, game, self))
|
||||||
|
appendPlayAllyActions(actions, game, self);
|
||||||
|
|
||||||
|
appendHealAllyActions(actions, game, self);
|
||||||
|
|
||||||
|
List<? extends Action> extraActions = getExtraPhaseActions(playerId, game, self);
|
||||||
|
if (extraActions != null)
|
||||||
|
actions.addAll(extraActions);
|
||||||
|
|
||||||
|
return actions;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void appendPlayAllyActions(List<Action> actions, LotroGame game, PhysicalCard self) {
|
||||||
|
ModifiersQuerying modifiersQuerying = game.getModifiersQuerying();
|
||||||
|
if (PlayConditions.canPlayCharacterDuringFellowship(game.getGameState(), modifiersQuerying, self)) {
|
||||||
|
actions.add(getPlayAllyAction(game, self));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void appendHealAllyActions(List<Action> actions, LotroGame lotroGame, PhysicalCard self) {
|
private void appendHealAllyActions(List<Action> actions, LotroGame game, PhysicalCard self) {
|
||||||
if (PlayConditions.canHealByDiscarding(lotroGame.getGameState(), lotroGame.getModifiersQuerying(), self)) {
|
if (PlayConditions.canHealByDiscarding(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
CostToEffectAction action = new CostToEffectAction(self, null, "Discard card to heal");
|
CostToEffectAction action = new CostToEffectAction(self, null, "Discard card to heal");
|
||||||
action.addCost(new DiscardCardFromHandEffect(self));
|
action.addCost(new DiscardCardFromHandEffect(self));
|
||||||
|
|
||||||
PhysicalCard active = Filters.findFirstActive(lotroGame.getGameState(), lotroGame.getModifiersQuerying(), Filters.name(self.getBlueprint().getName()));
|
PhysicalCard active = Filters.findFirstActive(game.getGameState(), game.getModifiersQuerying(), Filters.name(self.getBlueprint().getName()));
|
||||||
if (active != null)
|
if (active != null)
|
||||||
action.addEffect(new HealCharacterEffect(active));
|
action.addEffect(new HealCharacterEffect(active));
|
||||||
|
|
||||||
@@ -54,6 +71,18 @@ public class AbstractAlly extends AbstractLotroCardBlueprint {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected Action getPlayAllyAction(LotroGame game, PhysicalCard self) {
|
||||||
|
return new PlayPermanentAction(self, Zone.FREE_SUPPORT);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getTwilightCost() {
|
public int getTwilightCost() {
|
||||||
return _twilight;
|
return _twilight;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
|||||||
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
|
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,12 +37,7 @@ public class Card1_017 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Grimir to shuffle a DWARVEN event from your discard pile into draw deck");
|
final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Grimir to shuffle a DWARVEN event from your discard pile into draw deck");
|
||||||
@@ -60,9 +55,8 @@ public class Card1_017 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
return actions;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.gempukku.lotro.game.state.LotroGame;
|
|||||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,12 +36,7 @@ public class Card1_027 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.MANEUVER, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.MANEUVER, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
CostToEffectAction action = new CostToEffectAction(self, Keyword.MANEUVER, "Exert Thrarin to allow him to participate in archery fire and skirmished until the regroup phase");
|
CostToEffectAction action = new CostToEffectAction(self, Keyword.MANEUVER, "Exert Thrarin to allow him to participate in archery fire and skirmished until the regroup phase");
|
||||||
@@ -49,8 +44,9 @@ public class Card1_027 extends AbstractAlly {
|
|||||||
action.addEffect(
|
action.addEffect(
|
||||||
new AddUntilStartOfPhaseModifierEffect(
|
new AddUntilStartOfPhaseModifierEffect(
|
||||||
new AllyOnCurrentSiteModifier(self, Filters.sameCard(self)), Phase.REGROUP));
|
new AllyOnCurrentSiteModifier(self, Filters.sameCard(self)), Phase.REGROUP));
|
||||||
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
return actions;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
|||||||
import com.gempukku.lotro.logic.effects.HealCharacterEffect;
|
import com.gempukku.lotro.logic.effects.HealCharacterEffect;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,12 +36,7 @@ public class Card1_034 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Celeborn to Heal an ELVEN ally");
|
final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Celeborn to Heal an ELVEN ally");
|
||||||
@@ -53,9 +48,8 @@ public class Card1_034 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
return actions;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ import com.gempukku.lotro.logic.timing.Action;
|
|||||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -39,23 +38,20 @@ public class Card1_040 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
return Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.or(Filters.keyword(Keyword.ELF), Filters.name("Gandalf")));
|
||||||
|
}
|
||||||
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.or(Filters.keyword(Keyword.ELF), Filters.name("Gandalf"))))
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Elrond to draw a card");
|
CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Elrond to draw a card");
|
||||||
action.addCost(new ExertCharacterEffect(self));
|
action.addCost(new ExertCharacterEffect(self));
|
||||||
action.addEffect(new DrawCardEffect(playerId));
|
action.addEffect(new DrawCardEffect(playerId));
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
return actions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import com.gempukku.lotro.logic.timing.Action;
|
|||||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -41,12 +40,7 @@ public class Card1_045 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Galadriel to play an Elf for free");
|
CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Galadriel to play an Elf for free");
|
||||||
@@ -69,13 +63,11 @@ public class Card1_045 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
return actions;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
public List<? extends Action> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
if (effectResult.getType() == EffectResult.Type.START_OF_TURN) {
|
if (effectResult.getType() == EffectResult.Type.START_OF_TURN) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
|||||||
import com.gempukku.lotro.logic.effects.WoundCharacterEffect;
|
import com.gempukku.lotro.logic.effects.WoundCharacterEffect;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,12 +36,7 @@ public class Card1_056 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
final CostToEffectAction action = new CostToEffectAction(self, Keyword.ARCHERY, "Exert to wound an Uruk-hai");
|
final CostToEffectAction action = new CostToEffectAction(self, Keyword.ARCHERY, "Exert to wound an Uruk-hai");
|
||||||
@@ -53,9 +48,9 @@ public class Card1_056 extends AbstractAlly {
|
|||||||
action.addEffect(new WoundCharacterEffect(urukHai));
|
action.addEffect(new WoundCharacterEffect(urukHai));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
|
||||||
return actions;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
|||||||
import com.gempukku.lotro.logic.effects.WoundCharacterEffect;
|
import com.gempukku.lotro.logic.effects.WoundCharacterEffect;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,12 +36,7 @@ public class Card1_057 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
final CostToEffectAction action = new CostToEffectAction(self, Keyword.ARCHERY, "Exert to wound an Orc");
|
final CostToEffectAction action = new CostToEffectAction(self, Keyword.ARCHERY, "Exert to wound an Orc");
|
||||||
@@ -53,9 +48,8 @@ public class Card1_057 extends AbstractAlly {
|
|||||||
action.addEffect(new WoundCharacterEffect(urukHai));
|
action.addEffect(new WoundCharacterEffect(urukHai));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
return actions;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package com.gempukku.lotro.cards.set1.elven;
|
package com.gempukku.lotro.cards.set1.elven;
|
||||||
|
|
||||||
import com.gempukku.lotro.cards.AbstractAlly;
|
import com.gempukku.lotro.cards.AbstractAlly;
|
||||||
import com.gempukku.lotro.cards.PlayConditions;
|
|
||||||
import com.gempukku.lotro.cards.modifiers.ProxyingModifier;
|
import com.gempukku.lotro.cards.modifiers.ProxyingModifier;
|
||||||
import com.gempukku.lotro.common.*;
|
import com.gempukku.lotro.common.CardType;
|
||||||
|
import com.gempukku.lotro.common.Culture;
|
||||||
|
import com.gempukku.lotro.common.Keyword;
|
||||||
import com.gempukku.lotro.filters.Filter;
|
import com.gempukku.lotro.filters.Filter;
|
||||||
import com.gempukku.lotro.filters.Filters;
|
import com.gempukku.lotro.filters.Filters;
|
||||||
import com.gempukku.lotro.game.LotroCardBlueprint;
|
import com.gempukku.lotro.game.LotroCardBlueprint;
|
||||||
@@ -14,7 +15,6 @@ import com.gempukku.lotro.logic.timing.Action;
|
|||||||
import com.gempukku.lotro.logic.timing.Effect;
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,20 +83,10 @@ public class Card1_060 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
if (self.getZone() == Zone.FREE_SUPPORT) {
|
LotroCardBlueprint copied = getCopied(game, self);
|
||||||
LotroCardBlueprint copied = getCopied(game, self);
|
if (copied != null)
|
||||||
if (copied != null)
|
return copied.getPhaseActions(playerId, game, self);
|
||||||
return copied.getPhaseActions(playerId, game, self);
|
|
||||||
return null;
|
|
||||||
} else if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)) {
|
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
return actions;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package com.gempukku.lotro.cards.set1.elven;
|
package com.gempukku.lotro.cards.set1.elven;
|
||||||
|
|
||||||
import com.gempukku.lotro.cards.AbstractAlly;
|
import com.gempukku.lotro.cards.AbstractAlly;
|
||||||
import com.gempukku.lotro.cards.PlayConditions;
|
|
||||||
import com.gempukku.lotro.cards.modifiers.ProxyingModifier;
|
import com.gempukku.lotro.cards.modifiers.ProxyingModifier;
|
||||||
import com.gempukku.lotro.common.*;
|
import com.gempukku.lotro.common.CardType;
|
||||||
|
import com.gempukku.lotro.common.Culture;
|
||||||
|
import com.gempukku.lotro.common.Keyword;
|
||||||
import com.gempukku.lotro.filters.Filter;
|
import com.gempukku.lotro.filters.Filter;
|
||||||
import com.gempukku.lotro.filters.Filters;
|
import com.gempukku.lotro.filters.Filters;
|
||||||
import com.gempukku.lotro.game.LotroCardBlueprint;
|
import com.gempukku.lotro.game.LotroCardBlueprint;
|
||||||
@@ -14,7 +15,6 @@ import com.gempukku.lotro.logic.timing.Action;
|
|||||||
import com.gempukku.lotro.logic.timing.Effect;
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -83,20 +83,10 @@ public class Card1_067 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
if (self.getZone() == Zone.FREE_SUPPORT) {
|
LotroCardBlueprint copied = getCopied(game, self);
|
||||||
LotroCardBlueprint copied = getCopied(game, self);
|
if (copied != null)
|
||||||
if (copied != null)
|
return copied.getPhaseActions(playerId, game, self);
|
||||||
return copied.getPhaseActions(playerId, game, self);
|
|
||||||
return null;
|
|
||||||
} else if (PlayConditions.canPlayFPCardDuringPhase(game, Phase.FELLOWSHIP, self)) {
|
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
return actions;
|
|
||||||
}
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
|||||||
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
|
import com.gempukku.lotro.logic.effects.ChooseArbitraryCardsEffect;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -36,11 +36,7 @@ public class Card1_284 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Bilbo to shuffle a SHIRE card from your discard pile into your draw deck.");
|
final CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Bilbo to shuffle a SHIRE card from your discard pile into your draw deck.");
|
||||||
@@ -55,7 +51,7 @@ public class Card1_284 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
|||||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
|
||||||
import java.util.LinkedList;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,11 +37,7 @@ public class Card1_286 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
final CostToEffectAction action = new CostToEffectAction(self, Keyword.SKIRMISH, "Exert this ally to prevent a Hobbit from being overwhelmed unless that Hobbit's strength is tripled.");
|
final CostToEffectAction action = new CostToEffectAction(self, Keyword.SKIRMISH, "Exert this ally to prevent a Hobbit from being overwhelmed unless that Hobbit's strength is tripled.");
|
||||||
@@ -56,8 +52,8 @@ public class Card1_286 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
return actions;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import com.gempukku.lotro.logic.effects.HealCharacterEffect;
|
|||||||
import com.gempukku.lotro.logic.timing.Action;
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
import com.gempukku.lotro.logic.timing.Effect;
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
import java.util.LinkedList;
|
import java.util.LinkedList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -36,11 +37,7 @@ public class Card1_288 extends AbstractAlly {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<? extends Action> getPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
|
||||||
appendPlayAllyActions(actions, game, self);
|
|
||||||
appendHealAllyActions(actions, game, self);
|
|
||||||
|
|
||||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Farmer Maggot to heal Merry or Pippin.");
|
CostToEffectAction action = new CostToEffectAction(self, Keyword.FELLOWSHIP, "Exert Farmer Maggot to heal Merry or Pippin.");
|
||||||
@@ -61,8 +58,8 @@ public class Card1_288 extends AbstractAlly {
|
|||||||
action.addEffect(
|
action.addEffect(
|
||||||
new ChoiceEffect(action, playerId, possibleEffects, false));
|
new ChoiceEffect(action, playerId, possibleEffects, false));
|
||||||
|
|
||||||
actions.add(action);
|
return Collections.singletonList(action);
|
||||||
}
|
}
|
||||||
return actions;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user