Simplifying PlayConditions
This commit is contained in:
@@ -487,14 +487,6 @@ public class PlayConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean played(GameState gameState, ModifiersQuerying modifiersQuerying, EffectResult effectResult, Filter filter) {
|
||||
if (effectResult.getType() == EffectResult.Type.PLAY) {
|
||||
PhysicalCard playedCard = ((PlayCardResult) effectResult).getPlayedCard();
|
||||
return filter.accepts(gameState, modifiersQuerying, playedCard);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean activated(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
if (effectResult.getType() == EffectResult.Type.ACTIVATE) {
|
||||
PhysicalCard source = ((ActivateCardResult) effectResult).getSource();
|
||||
@@ -504,7 +496,11 @@ public class PlayConditions {
|
||||
}
|
||||
|
||||
public static boolean played(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
return played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(filters));
|
||||
if (effectResult.getType() == EffectResult.Type.PLAY) {
|
||||
PhysicalCard playedCard = ((PlayCardResult) effectResult).getPlayedCard();
|
||||
return Filters.and(filters).accepts(game.getGameState(), game.getModifiersQuerying(), playedCard);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean movesTo(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card1_010 extends AbstractAttachable {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(new HealCharactersEffect(self, self.getAttachedTo()));
|
||||
action.appendEffect(new HealCharactersEffect(self, self.getAttachedTo()));
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Card1_061 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Culture.ELVEN, Keyword.TALE))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Culture.ELVEN, Keyword.TALE))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(new RemoveBurdenEffect(self));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Card1_122 extends AbstractResponseOldEvent {
|
||||
|
||||
@Override
|
||||
public List<PlayEventAction> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Race.URUK_HAI, Filters.owner(playerId)))
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Race.URUK_HAI, Filters.owner(playerId)))
|
||||
&& checkPlayRequirements(playerId, game, self, 0, false)) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
String playedCardName = ((PlayCardResult) effectResult).getPlayedCard().getBlueprint().getName();
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Card1_130 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Keyword.WEATHER, CardType.CONDITION, Filters.owner(self.getOwner())))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Keyword.WEATHER, CardType.CONDITION, Filters.owner(self.getOwner())))) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndExertCharactersEffect(action, self.getOwner(), 1, 1, Culture.GANDALF, Filters.or(CardType.COMPANION, CardType.ALLY)));
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card1_154 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(new DiscardTopCardFromDeckEffect(self, game.getGameState().getCurrentPlayerId(), true));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class Card1_173 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.owner(self.getOwner()), Culture.MORIA, Filters.weapon))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Filters.owner(self.getOwner()), Culture.MORIA, Filters.weapon))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(new AddTwilightEffect(self, 1));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Card1_178 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(new AddTwilightEffect(self, 2));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Card1_179 extends AbstractMinion {
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, final LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
final Filter additionalAttachmentFilter = Filters.and(Filters.owner(self.getOwner()), Culture.MORIA, Race.ORC);
|
||||
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))
|
||||
&& PlayConditions.canPlayFromDiscard(playerId, game, Filters.weapon, ExtraFilters.attachableTo(game, additionalAttachmentFilter))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Card1_180 extends AbstractAttachable {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(new DrawCardEffect(playerId, 1));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Card1_181 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseArbitraryCardsEffect(playerId, "Choose MORIA Orc", game.getGameState().getDiscard(playerId), Filters.and(Culture.MORIA, Race.ORC), 1, 1) {
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Card1_185 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose DWARVEN ally or DWARVEN condition", Culture.DWARVEN, Filters.or(CardType.ALLY, CardType.CONDITION)) {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Card1_191 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Race.ELF)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(new AddTwilightEffect(self, 2));
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Card1_258 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseArbitraryCardsEffect(playerId, "Choose up to 2 WRAITH cards", game.getGameState().getDiscard(playerId), Culture.WRAITH, 0, 2) {
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Card1_268 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DiscardCardAtRandomFromHandEffect(self, game.getGameState().getCurrentPlayerId(), true));
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Card1_300 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 0, 2, Filters.any));
|
||||
|
||||
@@ -29,7 +29,7 @@ public class Card1_305 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DrawCardEffect(playerId, 1));
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card1_307 extends AbstractCompanion {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
|
||||
List<Effect> possibleEffects = new LinkedList<Effect>();
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Card1_334 extends AbstractSite {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.or(CardType.POSSESSION, CardType.ARTIFACT))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.or(CardType.POSSESSION, CardType.ARTIFACT))) {
|
||||
PlayCardResult playCardResult = (PlayCardResult) effectResult;
|
||||
PhysicalCard attachedTo = playCardResult.getAttachedTo();
|
||||
if (attachedTo != null && attachedTo.getBlueprint().getCardType() == CardType.COMPANION) {
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card1_350 extends AbstractSite {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Culture.MORIA, Race.ORC)))
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Culture.MORIA, Race.ORC)))
|
||||
self.storeData(new Object());
|
||||
if (effectResult.getType() == EffectResult.Type.END_OF_TURN
|
||||
&& self.getData() != null)
|
||||
|
||||
@@ -30,7 +30,7 @@ public class Card1_219 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.owner(self.getOwner()), Race.NAZGUL))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Filters.owner(self.getOwner()), Race.NAZGUL))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.HOBBIT, Filters.not(Keyword.RING_BEARER)));
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Card1_234 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))
|
||||
// You must be able to play a minion from discard to use this trigger
|
||||
&& PlayConditions.canPlayFromDiscard(playerId, game, CardType.MINION)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card2_031 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Culture.SAURON, CardType.MINION))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Culture.SAURON, CardType.MINION))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ExhaustCharacterEffect(self, action, ((PlayCardResult) effectResult).getPlayedCard()));
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card2_058 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, Keyword.TENTACLE));
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Card2_061 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))
|
||||
&& game.getGameState().getMoveCount() > 1) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Card2_063 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Culture.MORIA, CardType.MINION));
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card2_064 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ELVEN, CardType.CONDITION));
|
||||
|
||||
@@ -41,7 +41,7 @@ public class Card2_066 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, Filters.name("Watcher in the Water")));
|
||||
|
||||
@@ -51,7 +51,7 @@ public class Card2_118 extends AbstractSite {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Culture.MORIA, Keyword.ARCHER))
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Culture.MORIA, Keyword.ARCHER))
|
||||
&& game.getGameState().getCurrentPhase() == Phase.SHADOW
|
||||
&& game.getGameState().getCurrentSite() == self)
|
||||
self.storeData(new Object());
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card2_082 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, CardType.ALLY));
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Card3_003 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Culture.DWARVEN, Keyword.TALE))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.and(Culture.DWARVEN, Keyword.TALE))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Race.DWARF, CardType.COMPANION));
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Card3_055 extends AbstractAttachable {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new AddTwilightEffect(self, 1));
|
||||
|
||||
@@ -34,7 +34,7 @@ public class Card3_075 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.saruman)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
|
||||
@@ -39,7 +39,7 @@ public class Card4_019 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DrawCardEffect(playerId, 1));
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card4_044 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseCardsFromDiscardEffect(self.getOwner(), 1, 1, Filters.any) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Card4_046 extends AbstractPermanent {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new StackTopCardsFromDeckEffect(self, self.getOwner(), 6, self));
|
||||
|
||||
@@ -66,7 +66,7 @@ public class Card4_094 extends AbstractAttachable {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DiscardCardsFromPlayEffect(self, Filters.and(Side.SHADOW, CardType.CONDITION, Filters.attachedTo(Filters.hasAttached(self)))));
|
||||
|
||||
@@ -48,7 +48,7 @@ public class Card4_100 extends AbstractAttachableFPPossession {
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DiscardCardsFromPlayEffect(self, Filters.and(Filters.attachedTo(Filters.hasAttached(self)), PossessionClass.HAND_WEAPON)));
|
||||
|
||||
@@ -70,7 +70,7 @@ public class Card4_173 extends AbstractMinion {
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.sameCard(self))) {
|
||||
if (PlayConditions.played(game, effectResult, Filters.sameCard(self))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.CONDITION));
|
||||
|
||||
Reference in New Issue
Block a user