"Dark Temptation"
This commit is contained in:
@@ -203,16 +203,20 @@ public class PlayConditions {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean canHeal(PhysicalCard source, LotroGame game, Filterable... filters) {
|
public static boolean canHeal(PhysicalCard source, LotroGame game, final int count, Filterable... filters) {
|
||||||
return Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.wounded, Filters.and(filters),
|
return Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.wounded, Filters.and(filters),
|
||||||
new Filter() {
|
new Filter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||||
return modifiersQuerying.canBeHealed(gameState, physicalCard);
|
return gameState.getWounds(physicalCard) >= count && modifiersQuerying.canBeHealed(gameState, physicalCard);
|
||||||
}
|
}
|
||||||
}) >= 1;
|
}) >= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean canHeal(PhysicalCard source, LotroGame game, Filterable... filters) {
|
||||||
|
return canHeal(source, game, 1, filters);
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean canPlayFromHand(String playerId, LotroGame game, Filterable... filters) {
|
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;
|
return Filters.filter(game.getGameState().getHand(playerId), game.getGameState(), game.getModifiersQuerying(), Filters.and(filters, Filters.playable(game))).size() > 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
package com.gempukku.lotro.cards.set12.wraith;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.TriggerConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.AddBurdenEffect;
|
||||||
|
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.OptionalTriggerAction;
|
||||||
|
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: Black Rider
|
||||||
|
* Side: Shadow
|
||||||
|
* Culture: Wraith
|
||||||
|
* Twilight Cost: 1
|
||||||
|
* Type: Condition • Support Area
|
||||||
|
* Game Text: Each time you play a Nazgul, you may heal the Ring-bearer twice to add a burden.
|
||||||
|
*/
|
||||||
|
public class Card12_163 extends AbstractPermanent {
|
||||||
|
public Card12_163() {
|
||||||
|
super(Side.SHADOW, 1, CardType.CONDITION, Culture.WRAITH, Zone.SUPPORT, "Dark Temptation");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (TriggerConditions.played(game, effectResult, Race.NAZGUL)
|
||||||
|
&& PlayConditions.canHeal(self, game, 2, Filters.ringBearer)) {
|
||||||
|
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||||
|
action.appendCost(
|
||||||
|
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, 2, Filters.ringBearer));
|
||||||
|
action.appendEffect(
|
||||||
|
new AddBurdenEffect(self, 1));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user