"Blood Has Been Spilled"
This commit is contained in:
@@ -170,15 +170,15 @@ public class PlayConditions {
|
||||
return Filters.filter(game.getGameState().getDiscard(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game, modifier))).size() > 0;
|
||||
}
|
||||
|
||||
public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, final PhysicalCard card) {
|
||||
public static boolean canDiscardFromPlay(final PhysicalCard source, LotroGame game, final PhysicalCard card) {
|
||||
return game.getModifiersQuerying().canBeDiscardedFromPlay(game.getGameState(), card, source);
|
||||
}
|
||||
|
||||
public static boolean canSelfDiscard(PhysicalCard source, LotroGame game) {
|
||||
return canBeDiscarded(source, game, source);
|
||||
return canDiscardFromPlay(source, game, source);
|
||||
}
|
||||
|
||||
public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, int count, final Filterable... filters) {
|
||||
public static boolean canDiscardFromPlay(final PhysicalCard source, LotroGame game, int count, final Filterable... filters) {
|
||||
return Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.and(filters,
|
||||
new Filter() {
|
||||
@Override
|
||||
@@ -188,8 +188,8 @@ public class PlayConditions {
|
||||
})) >= count;
|
||||
}
|
||||
|
||||
public static boolean canBeDiscarded(final PhysicalCard source, LotroGame game, final Filterable... filters) {
|
||||
return canBeDiscarded(source, game, 1, filters);
|
||||
public static boolean canDiscardFromPlay(final PhysicalCard source, LotroGame game, final Filterable... filters) {
|
||||
return canDiscardFromPlay(source, game, 1, filters);
|
||||
}
|
||||
|
||||
public static boolean canExert(final PhysicalCard source, final GameState gameState, final ModifiersQuerying modifiersQuerying, Filterable... filters) {
|
||||
|
||||
@@ -26,8 +26,13 @@ public class ChooseAndDiscardCardsFromPlayEffect extends ChooseActiveCardsEffect
|
||||
|
||||
@Override
|
||||
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> cards) {
|
||||
cardsToBeDiscardedCallback(cards);
|
||||
SubAction subAction = new SubAction(_action);
|
||||
subAction.appendEffect(new DiscardCardsFromPlayEffect(_action.getActionSource(), Filters.in(cards)));
|
||||
game.getActionsEnvironment().addActionToStack(subAction);
|
||||
}
|
||||
|
||||
protected void cardsToBeDiscardedCallback(Collection<PhysicalCard> cards) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card4_311 extends AbstractCompanion {
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
|
||||
&& Filters.notAssignedToSkirmish.accepts(game.getGameState(), game.getModifiersQuerying(), self)
|
||||
&& PlayConditions.canBeDiscarded(self, game, self)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, self)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new DiscardCardsFromPlayEffect(self, self));
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card4_313 extends AbstractCompanion {
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
|
||||
&& Filters.notAssignedToSkirmish.accepts(game.getGameState(), game.getModifiersQuerying(), self)
|
||||
&& PlayConditions.canBeDiscarded(self, game, self)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, self)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new DiscardCardsFromPlayEffect(self, self));
|
||||
|
||||
@@ -31,7 +31,7 @@ public class Card5_021 extends AbstractEvent {
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Filters.name("Smeagol"));
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Filters.name("Smeagol"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card5_024 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
|
||||
&& PlayConditions.canBeDiscarded(self, game, self)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, self)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new DiscardCardsFromPlayEffect(self, self));
|
||||
|
||||
@@ -47,7 +47,7 @@ public class Card5_027 extends AbstractAttachable {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
|
||||
&& PlayConditions.canBeDiscarded(self, game, self)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, self)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new DiscardCardsFromPlayEffect(self, self));
|
||||
|
||||
@@ -33,7 +33,7 @@ public class Card5_036 extends AbstractCompanion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Culture.GONDOR, CardType.CONDITION)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Culture.GONDOR, CardType.CONDITION)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.GONDOR, CardType.CONDITION));
|
||||
|
||||
@@ -44,7 +44,7 @@ public class Card5_104 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self, 0)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Culture.SAURON, Race.ORC, Filters.not(self))
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Culture.SAURON, Race.ORC, Filters.not(self))
|
||||
&& PlayConditions.canSelfExert(self, game)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
|
||||
@@ -29,7 +29,7 @@ public class Card5_112 extends AbstractEvent {
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& PlayConditions.canSpot(game, Filters.name("Sam"))
|
||||
&& PlayConditions.canBeDiscarded(self, game, Filters.or(Filters.name("Smeagol"), Filters.name("Gollum")));
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Filters.or(Filters.name("Smeagol"), Filters.name("Gollum")));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Card5_114 extends AbstractAttachable {
|
||||
if (PlayConditions.activated(game, effectResult, Filters.any)) {
|
||||
ActivateCardResult activateEffect = (ActivateCardResult) effectResult;
|
||||
if (activateEffect.getActionTimeword() == Phase.REGROUP
|
||||
&& PlayConditions.canBeDiscarded(self, game, Filters.or(Filters.name("Smeagol"), Filters.name("Gollum")))) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Filters.or(Filters.name("Smeagol"), Filters.name("Gollum")))) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Filters.or(Filters.name("Smeagol"), Filters.name("Gollum"))));
|
||||
|
||||
@@ -43,7 +43,7 @@ public class Card6_044 extends AbstractEvent {
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& PlayConditions.canExert(self, game, 3, Filters.name("Smeagol"))
|
||||
&& PlayConditions.canBeDiscarded(self, game, Filters.name("Smeagol"));
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Filters.name("Smeagol"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Card6_062 extends AbstractEvent {
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier)
|
||||
&& PlayConditions.canBeDiscarded(self, game, 4, Culture.ISENGARD, Race.ORC);
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, 4, Culture.ISENGARD, Race.ORC);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card6_065 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ISENGARD, Race.ORC));
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card6_067 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ISENGARD, Race.ORC));
|
||||
|
||||
@@ -40,7 +40,7 @@ public class Card6_068 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ISENGARD, Race.ORC));
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card6_069 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ISENGARD, Race.ORC));
|
||||
|
||||
@@ -35,7 +35,7 @@ public class Card6_071 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game.getGameState(), Phase.REGROUP, self, 0)
|
||||
&& PlayConditions.canBeDiscarded(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, Culture.ISENGARD, Race.ORC)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Culture.ISENGARD, Race.ORC));
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
package com.gempukku.lotro.cards.set6.rohan;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.OverwhelmedByMultiplierModifier;
|
||||
import com.gempukku.lotro.common.*;
|
||||
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 java.util.*;
|
||||
|
||||
/**
|
||||
* Set: Ents of Fangorn
|
||||
* Side: Free
|
||||
* Culture: Rohan
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition
|
||||
* Game Text: Plays to your support area. Skirmish: Discard a mount borne by a [ROHAN] Man to prevent that Man from
|
||||
* being overwhelmed unless his or her strength is tripled.
|
||||
*/
|
||||
public class Card6_091 extends AbstractPermanent {
|
||||
public Card6_091() {
|
||||
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.ROHAN, Zone.SUPPORT, "Blood Has Been Spilled");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game.getGameState(), Phase.SKIRMISH, self)
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, PossessionClass.MOUNT, Filters.attachedTo(Culture.ROHAN, Race.MAN))) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, PossessionClass.MOUNT, Filters.attachedTo(Culture.ROHAN, Race.MAN)) {
|
||||
@Override
|
||||
protected void cardsToBeDiscardedCallback(Collection<PhysicalCard> cards) {
|
||||
Set<PhysicalCard> affectedCharacters = new HashSet<PhysicalCard>();
|
||||
for (PhysicalCard card : cards)
|
||||
affectedCharacters.add(card.getAttachedTo())
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new OverwhelmedByMultiplierModifier(self, Filters.in(affectedCharacters), 3), Phase.SKIRMISH));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user