"The Splendor of Their Banners"
This commit is contained in:
@@ -17,8 +17,8 @@ import com.gempukku.lotro.logic.timing.results.WoundResult;
|
||||
import java.util.List;
|
||||
|
||||
public class PlayConditions {
|
||||
public static boolean canPlayFromHandDuringPhase(GameState gameState, Phase phase, PhysicalCard self) {
|
||||
return gameState.getCurrentPhase() == phase && self.getZone() == Zone.HAND;
|
||||
public static boolean canPlayDuringPhase(GameState gameState, Phase phase, PhysicalCard self) {
|
||||
return gameState.getCurrentPhase() == phase && (self.getZone() == Zone.HAND || self.getZone() == Zone.DECK);
|
||||
}
|
||||
|
||||
public static boolean canPlayCompanionDuringSetup(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard self) {
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card1_024 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
return Collections.<Action>singletonList(new PlayPermanentAction(self, Zone.FREE_SUPPORT));
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_026 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, final LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.addEffect(
|
||||
new ChooseActiveCardEffect(playerId, "Choose Dwarf", Filters.keyword(Keyword.DWARF)) {
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Card1_028 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
// TODO
|
||||
}
|
||||
return null;
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Card1_029 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.addCost(
|
||||
new ChooseActiveCardEffect(playerId, "Choose an Elf", Filters.keyword(Keyword.ELF)) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Card1_032 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
|
||||
action.addEffect(
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card1_035 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(final String playerId, final LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF))) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.addCost(new SpotEffect(Filters.keyword(Keyword.ELF)));
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card1_036 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.canExert())) {
|
||||
final CostToEffectAction action = new CostToEffectAction(self, "Exert an Elf to reveal an opponent's hand. That player discards a card from hand for each Orc revealed.");
|
||||
action.addCost(new ChooseActiveCardEffect(playerId, "Choose an Elf", Filters.keyword(Keyword.ELF), Filters.canExert()) {
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Card1_037 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.SKIRMISH, self)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
|
||||
action.addEffect(
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_038 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHERY), Filters.type(CardType.COMPANION))) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.addCost(new SpotEffect(Filters.and(Filters.keyword(Keyword.ELF), Filters.keyword(Keyword.ARCHERY), Filters.type(CardType.COMPANION))));
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card1_039 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF))) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.addCost(new SpotEffect(Filters.keyword(Keyword.ELF)));
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card1_043 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Far-seeing Eyes"))) {
|
||||
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_044 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.canExert())) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.addCost(
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card1_046 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.type(CardType.ALLY), Filters.canExert())
|
||||
&& !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Gift of Boats"))) {
|
||||
final PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_052 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.ARCHERY, self)
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.type(CardType.COMPANION))) {
|
||||
CostToEffectAction action = new CostToEffectAction(self, "Make the minion archery total -1");
|
||||
action.addCost(new SpotEffect(Filters.and(Filters.keyword(Keyword.ELF), Filters.type(CardType.COMPANION))));
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Card1_054 extends AbstractLotroCardBlueprint {
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Card1_055 extends AbstractLotroCardBlueprint {
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
List<Action> actions = new LinkedList<Action>();
|
||||
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& !Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("The Mirror of Galadriel")))
|
||||
actions.add(new PlayPermanentAction(self, Zone.FREE_SUPPORT));
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_058 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF), Filters.canExert()) >= 2) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.addCost(
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Card1_059 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
|
||||
@@ -89,7 +89,7 @@ public class Card1_060 extends AbstractAlly {
|
||||
if (copied != null)
|
||||
return copied.getPlayablePhaseActions(playerId, game, self);
|
||||
return null;
|
||||
} else if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
} else if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
List<Action> actions = new LinkedList<Action>();
|
||||
|
||||
appendPlayAllyActions(actions, game, self);
|
||||
|
||||
@@ -6,7 +6,6 @@ import com.gempukku.lotro.cards.actions.PlayPermanentAction;
|
||||
import com.gempukku.lotro.cards.effects.RemoveBurderEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.LotroCardBlueprint;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
@@ -36,7 +35,7 @@ public class Card1_061 extends AbstractLotroCardBlueprint {
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayFromHandDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
PlayPermanentAction action = new PlayPermanentAction(self, Zone.FREE_SUPPORT);
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
package com.gempukku.lotro.cards.set1.elven;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.ExertCharacterEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
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.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Fellowship of the Ring
|
||||
* Side: Free
|
||||
* Culture: Elven
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition
|
||||
* Game Text: Tale. Bearer must be an Elf companion. Archery: If bearer is an archer, exert bearer to make the
|
||||
* fellowship archery total +1.
|
||||
*/
|
||||
public class Card1_062 extends AbstractAttachable {
|
||||
public Card1_062() {
|
||||
super(Side.FREE_PEOPLE, CardType.CONDITION, 1, Culture.ELVEN, "The Splendor of Their Banners", "1_62", true);
|
||||
addKeyword(Keyword.TALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canPlayDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)) {
|
||||
|
||||
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.ELF), Filters.type(CardType.COMPANION));
|
||||
|
||||
List<Action> actions = new LinkedList<Action>();
|
||||
appendAttachCardFromHandAction(actions, game, self, validTargetFilter);
|
||||
return actions;
|
||||
}
|
||||
|
||||
if (game.getGameState().getCurrentPhase() == Phase.ARCHERY
|
||||
&& self.getZone() == Zone.ATTACHED
|
||||
&& game.getModifiersQuerying().hasKeyword(game.getGameState(), self.getAttachedTo(), Keyword.ARCHER)
|
||||
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self.getAttachedTo())) {
|
||||
CostToEffectAction action = new CostToEffectAction(self, "Exert bearer to make the fellowship archery total +1");
|
||||
action.addCost(new ExertCharacterEffect(self.getAttachedTo()));
|
||||
action.addEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new ArcheryTotalModifier(self, Side.FREE_PEOPLE, 1), Phase.ARCHERY));
|
||||
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user