Making sure the responses on permanents will only show up, when the permanent is in play.
This commit is contained in:
@@ -4,7 +4,10 @@ import com.gempukku.lotro.cards.actions.PlayPermanentAction;
|
||||
import com.gempukku.lotro.common.*;
|
||||
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.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@@ -53,4 +56,26 @@ public class AbstractPermanent extends AbstractLotroCardBlueprint {
|
||||
|
||||
return getExtraPhaseActions(playerId, game, self);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (self.getZone().isInPlay())
|
||||
return getOptionalInPlayBeforeActions(playerId, game, effect, self);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (self.getZone().isInPlay())
|
||||
return getOptionalInPlayAfterActions(playerId, game, effectResult, self);
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,14 +70,6 @@ public class Card1_060 extends AbstractAlly {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
LotroCardBlueprint copied = getCopied(game, self);
|
||||
if (copied != null)
|
||||
return copied.getOptionalBeforeActions(playerId, game, effect, self);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
LotroCardBlueprint copied = getCopied(game, self);
|
||||
|
||||
@@ -70,14 +70,6 @@ public class Card1_067 extends AbstractAlly {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
LotroCardBlueprint copied = getCopied(game, self);
|
||||
if (copied != null)
|
||||
return copied.getOptionalBeforeActions(playerId, game, effect, self);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
LotroCardBlueprint copied = getCopied(game, self);
|
||||
|
||||
@@ -9,7 +9,6 @@ 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.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.SkirmishResult;
|
||||
|
||||
@@ -30,7 +29,7 @@ public class Card1_144 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.race(Race.URUK_HAI), Filters.owner(playerId)))
|
||||
&& game.getGameState().getTwilightPool() >= 1) {
|
||||
SkirmishResult skirmishResult = ((SkirmishResult) effectResult);
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
|
||||
@@ -38,7 +37,7 @@ public class Card1_155 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.PUT_ON_THE_ONE_RING
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
|
||||
@@ -11,7 +11,6 @@ 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.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.SkirmishResult;
|
||||
|
||||
@@ -39,7 +38,7 @@ public class Card1_159 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.owner(playerId), Filters.race(Race.URUK_HAI)))
|
||||
&& game.getGameState().getTwilightPool() >= 3) {
|
||||
SkirmishResult skirmishResult = ((SkirmishResult) effectResult);
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -47,7 +46,7 @@ public class Card1_173 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, final Effect effect, final PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, final Effect effect, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& effect.getType() == EffectResult.Type.WOUND) {
|
||||
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
|
||||
@@ -53,7 +53,7 @@ public class Card1_183 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.culture(Culture.MORIA), Filters.race(Race.ORC)))
|
||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.MORIA), Filters.race(Race.ORC), Filters.inSkirmish())) {
|
||||
|
||||
@@ -7,7 +7,6 @@ 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.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.DiscardCardsFromPlayResult;
|
||||
|
||||
@@ -30,7 +29,7 @@ public class Card1_193 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.DISCARD_FROM_PLAY) {
|
||||
DiscardCardsFromPlayResult discardResult = (DiscardCardsFromPlayResult) effectResult;
|
||||
Collection<PhysicalCard> discardedCards = discardResult.getDiscardedCards();
|
||||
|
||||
@@ -9,7 +9,6 @@ import com.gempukku.lotro.common.Race;
|
||||
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.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -33,7 +32,7 @@ public class Card1_240 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.winsSkirmish(effectResult, self)
|
||||
&& PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 2)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
|
||||
@@ -12,7 +12,6 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.PlayEventEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -42,7 +41,7 @@ public class Card1_261 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effect, Filters.and(Filters.side(Side.FREE_PEOPLE), Filters.type(CardType.EVENT), Filters.keyword(Keyword.REGROUP)))
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
|
||||
@@ -10,7 +10,6 @@ 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.PlayEventEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -32,7 +31,7 @@ public class Card1_275 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.SAURON), Filters.keyword(Keyword.TRACKER))
|
||||
&& PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effect, Filters.and(Filters.type(CardType.EVENT), Filters.keyword(Keyword.STEALTH)))) {
|
||||
|
||||
@@ -73,14 +73,6 @@ public class Card1_295 extends AbstractAlly {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
LotroCardBlueprint copied = getCopied(game, self);
|
||||
if (copied != null)
|
||||
return copied.getOptionalBeforeActions(playerId, game, effect, self);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
LotroCardBlueprint copied = getCopied(game, self);
|
||||
|
||||
@@ -11,7 +11,6 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
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;
|
||||
@@ -33,7 +32,7 @@ public class Card1_209 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.owner(self.getOwner()), Filters.race(Race.NAZGUL)))
|
||||
&& self.getZone() == Zone.SUPPORT
|
||||
&& game.getGameState().getSkirmish() != null && game.getGameState().getSkirmish().getFellowshipCharacter() != null
|
||||
|
||||
@@ -14,7 +14,6 @@ import com.gempukku.lotro.logic.modifiers.AbstractModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -50,7 +49,7 @@ public class Card2_018 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.WOUND) {
|
||||
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
Collection<PhysicalCard> woundedCharacters = woundEffect.getAffectedCardsMinusPrevented(game);
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.PlayEventEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -47,7 +46,7 @@ public class Card2_047 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effect, Filters.type(CardType.EVENT))
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
PlayEventEffect playEffect = (PlayEventEffect) effect;
|
||||
|
||||
@@ -17,7 +17,6 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayEventEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -49,7 +48,7 @@ public class Card2_089 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effect, Filters.type(CardType.EVENT))) {
|
||||
PlayEventEffect playEffect = (PlayEventEffect) effect;
|
||||
if (playEffect.isRequiresRanger()) {
|
||||
|
||||
@@ -10,7 +10,6 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -34,7 +33,7 @@ public class Card2_106 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.WOUND) {
|
||||
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
Collection<PhysicalCard> woundedCharacters = woundEffect.getAffectedCardsMinusPrevented(game);
|
||||
|
||||
@@ -11,7 +11,6 @@ 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.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -34,7 +33,7 @@ public class Card2_077 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 1)
|
||||
&& effect.getType() == EffectResult.Type.WOUND) {
|
||||
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -41,7 +40,7 @@ public class Card3_007 extends AbstractCompanion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.WOUND
|
||||
&& game.getGameState().getHand(playerId).size() >= 3) {
|
||||
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -45,7 +44,7 @@ public class Card3_014 extends AbstractAlly {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.WOUND) {
|
||||
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
Collection<PhysicalCard> woundedCharacters = woundEffect.getAffectedCardsMinusPrevented(game);
|
||||
|
||||
@@ -14,7 +14,6 @@ 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.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -37,7 +36,7 @@ public class Card3_036 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.WOUND
|
||||
&& game.getGameState().getTwilightPool() >= 4
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), Filters.name("Gandalf"))) {
|
||||
|
||||
@@ -12,7 +12,6 @@ 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.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -35,7 +34,7 @@ public class Card3_059 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 2)
|
||||
&& PlayConditions.isGettingWounded(effect, game, Filters.culture(Culture.ISENGARD), Filters.race(Race.ORC))) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
|
||||
@@ -19,7 +19,6 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.*;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -77,7 +76,7 @@ public class Card3_068 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.isGettingWounded(effect, game, Filters.race(Race.URUK_HAI))
|
||||
&& PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
|
||||
@@ -12,7 +12,6 @@ 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.PreventEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -37,7 +36,7 @@ public class Card3_110 extends AbstractAlly {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.ADD_BURDEN
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
final AddBurdenEffect addBurdenEffect = (AddBurdenEffect) effect;
|
||||
|
||||
@@ -9,7 +9,6 @@ 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.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
|
||||
@@ -33,7 +32,7 @@ public class Card3_114 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.ADD_TWILIGHT
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), Filters.race(Race.HOBBIT), Filters.type(CardType.ALLY))) {
|
||||
final AddTwilightEffect addTwilightEffect = (AddTwilightEffect) effect;
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.DiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -50,7 +49,7 @@ public class Card4_019 extends AbstractPermanent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.WOUND) {
|
||||
final WoundCharactersEffect woundEffect = (WoundCharactersEffect) effect;
|
||||
Collection<PhysicalCard> woundedCharacters = woundEffect.getAffectedCardsMinusPrevented(game);
|
||||
|
||||
@@ -11,7 +11,6 @@ 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.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -35,7 +34,7 @@ public class Card4_040 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.winsSkirmish(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.not(Filters.sameCard(self)), Filters.culture(Culture.DUNLAND), Filters.race(Race.MAN)))
|
||||
&& PlayConditions.canExert(self, game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card4_103 extends AbstractAlly {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, final PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, final PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.DISCARD_FROM_PLAY
|
||||
&& PlayConditions.canUseFPCardDuringPhase(game.getGameState(), null, self)) {
|
||||
DiscardCardsFromPlayEffect discardEffect = (DiscardCardsFromPlayEffect) effect;
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.KillResult;
|
||||
|
||||
@@ -46,7 +45,7 @@ public class Card4_186 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.KILL
|
||||
&& PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& PlayConditions.canExert(self, game, Filters.sameCard(self))) {
|
||||
|
||||
@@ -15,7 +15,6 @@ 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.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.KillResult;
|
||||
|
||||
@@ -48,7 +47,7 @@ public class Card4_188 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.KILL
|
||||
&& PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& PlayConditions.canExert(self, game, 2, Filters.sameCard(self))) {
|
||||
|
||||
@@ -13,7 +13,6 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.KillResult;
|
||||
|
||||
@@ -46,7 +45,7 @@ public class Card4_190 extends AbstractMinion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalAfterActions(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (effectResult.getType() == EffectResult.Type.KILL
|
||||
&& PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), null, self, 0)
|
||||
&& PlayConditions.canExert(self, game, Filters.sameCard(self))) {
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.PreventEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
@@ -37,7 +36,7 @@ public class Card4_264 extends AbstractCompanion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (effect.getType() == EffectResult.Type.TAKE_CONTROL_OF_A_SITE) {
|
||||
TakeControlOfASiteEffect takeControlEffect = (TakeControlOfASiteEffect) effect;
|
||||
if (!takeControlEffect.isPrevented()
|
||||
|
||||
@@ -15,7 +15,6 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -41,7 +40,7 @@ public class Card4_270 extends AbstractCompanion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.isGettingWounded(effect, game, Filters.unboundCompanion())
|
||||
&& PlayConditions.canExert(self, game, Filters.sameCard(self))) {
|
||||
final WoundCharactersEffect woundEffects = (WoundCharactersEffect) effect;
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.WoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.Collections;
|
||||
@@ -39,7 +38,7 @@ public class Card4_271 extends AbstractCompanion {
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||
if (PlayConditions.isGettingWounded(effect, game, Filters.sameCard(self))
|
||||
&& Filters.exhausted().accepts(game.getGameState(), game.getModifiersQuerying(), self)
|
||||
&& game.getGameState().getHand(playerId).size() >= 2) {
|
||||
|
||||
Reference in New Issue
Block a user