"Dark Swooping Shadows"
This commit is contained in:
@@ -172,7 +172,7 @@ public class PlayConditions {
|
||||
return game.getGameState().getBurdens() >= count && game.getModifiersQuerying().canRemoveBurden(game.getGameState(), card);
|
||||
}
|
||||
|
||||
public static boolean canWound(final LotroGame game, final int times, final int count, Filterable... filters) {
|
||||
public static boolean canWound(PhysicalCard source, final LotroGame game, final int times, final int count, Filterable... filters) {
|
||||
final GameState gameState = game.getGameState();
|
||||
final ModifiersQuerying modifiersQuerying = game.getModifiersQuerying();
|
||||
final Filter filter = Filters.and(filters);
|
||||
@@ -191,6 +191,16 @@ public class PlayConditions {
|
||||
});
|
||||
}
|
||||
|
||||
public static boolean canHeal(PhysicalCard source, LotroGame game, Filterable... filters) {
|
||||
return Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.wounded, Filters.and(filters),
|
||||
new Filter() {
|
||||
@Override
|
||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||
return modifiersQuerying.canBeHealed(gameState, physicalCard);
|
||||
}
|
||||
}) >= 1;
|
||||
}
|
||||
|
||||
public static boolean canPlayFromHand(String playerId, LotroGame game, Filterable... filters) {
|
||||
return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game))).size() > 0;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ public class Card10_040 extends AbstractMinion {
|
||||
@Override
|
||||
protected List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
|
||||
&& PlayConditions.canWound(game, 1, 2, Filters.not(self), Culture.RAIDER, Race.MAN)) {
|
||||
&& PlayConditions.canWound(self, game, 1, 2, Filters.not(self), Culture.RAIDER, Race.MAN)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndWoundCharactersEffect(action, playerId, 2, 2, Filters.not(self), Culture.RAIDER, Race.MAN));
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
package com.gempukku.lotro.cards.set10.wraith;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractEvent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
|
||||
import com.gempukku.lotro.cards.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Mount Doom
|
||||
* Side: Shadow
|
||||
* Culture: Wraith
|
||||
* Twilight Cost: 1
|
||||
* Type: Event • Skirmish
|
||||
* Game Text: Heal an enduring [WRAITH] minion to add a burden or 2 threats.
|
||||
*/
|
||||
public class Card10_058 extends AbstractEvent {
|
||||
public Card10_058() {
|
||||
super(Side.SHADOW, 1, Culture.WRAITH, "Dark Swooping Shadows", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
return super.checkPlayRequirements(playerId, game, self, twilightModifier, ignoreRoamingPenalty)
|
||||
&& PlayConditions.canHeal(self, game, Culture.WRAITH, CardType.MINION, Keyword.ENDURING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, Culture.WRAITH, CardType.MINION, Keyword.ENDURING));
|
||||
List<Effect> possibleEffects = new LinkedList<Effect>();
|
||||
possibleEffects.add(
|
||||
new AddBurdenEffect(self, 1));
|
||||
possibleEffects.add(
|
||||
new AddThreatsEffect(playerId, self, 2));
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, playerId, possibleEffects));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -45,7 +45,7 @@ public class Card6_095 extends AbstractCompanion {
|
||||
@Override
|
||||
protected List<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
|
||||
&& Filters.inSkirmishAgainst(CardType.MINION, Filters.wounded).accepts(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||
&& PlayConditions.canHeal(self, game, CardType.MINION, Filters.inSkirmishAgainst(self))) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, CardType.MINION, Filters.inSkirmishAgainst(self)));
|
||||
|
||||
Reference in New Issue
Block a user