"Lingering Shadow"
This commit is contained in:
@@ -115,6 +115,12 @@ public class TriggerConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean forEachHealed(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
if (effectResult.getType() == EffectResult.Type.FOR_EACH_HEALED)
|
||||
return Filters.and(filters).accepts(game.getGameState(), game.getModifiersQuerying(), ((HealResult) effectResult).getHealedCard());
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean forEachExerted(LotroGame game, EffectResult effectResult, Filterable... filters) {
|
||||
if (effectResult.getType() == EffectResult.Type.FOR_EACH_EXERTED)
|
||||
return Filters.and(filters).accepts(game.getGameState(), game.getModifiersQuerying(), ((ExertResult) effectResult).getExertedCard());
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
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.cards.effects.TransferPermanentEffect;
|
||||
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.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Black Rider
|
||||
* Side: Shadow
|
||||
* Culture: Wraith
|
||||
* Twilight Cost: 0
|
||||
* Type: Condition • Support Area
|
||||
* Game Text: Skirmish: Transfer this condition from your support area to a character skirmishing a Nazgul. Each time a
|
||||
* wound is removed from bearer, add a burden.
|
||||
*/
|
||||
public class Card12_166 extends AbstractPermanent {
|
||||
public Card12_166() {
|
||||
super(Side.SHADOW, 0, CardType.CONDITION, Culture.WRAITH, Zone.SUPPORT, "Lingering Shadow");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Action> getExtraPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
|
||||
&& self.getZone() == Zone.SUPPORT
|
||||
&& Filters.filter(game.getGameState().getSkirmish().getShadowCharacters(), game.getGameState(), game.getModifiersQuerying(), Race.NAZGUL).size() > 0
|
||||
&& game.getGameState().getSkirmish().getFellowshipCharacter() != null) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendEffect(
|
||||
new TransferPermanentEffect(self, game.getGameState().getSkirmish().getFellowshipCharacter()));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.forEachHealed(game, effectResult, Filters.hasAttached(self))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new AddBurdenEffect(self, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.results.HealResult;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -56,6 +57,7 @@ public class HealCharactersEffect extends AbstractPreventableCardEffect {
|
||||
game.getGameState().sendMessage(GameUtils.getCardLink(_source) + " heals " + getAppendedNames(cardsToHeal));
|
||||
for (PhysicalCard cardToHeal : cardsToHeal) {
|
||||
game.getGameState().removeWound(cardToHeal);
|
||||
game.getActionsEnvironment().emitEffectResult(new HealResult(cardToHeal));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ public abstract class EffectResult {
|
||||
|
||||
public enum Type {
|
||||
// Translated to new format
|
||||
ANY_NUMBER_KILLED, FOR_EACH_KILLED,
|
||||
ANY_NUMBER_KILLED, FOR_EACH_KILLED, FOR_EACH_HEALED,
|
||||
FOR_EACH_WOUNDED, FOR_EACH_EXERTED, FOR_EACH_DISCARDED_FROM_PLAY,
|
||||
|
||||
FOR_EACH_DISCARDED_FROM_HAND,
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.gempukku.lotro.logic.timing.results;
|
||||
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
public class HealResult extends EffectResult {
|
||||
private PhysicalCard _healedCard;
|
||||
|
||||
public HealResult(PhysicalCard healedCard) {
|
||||
super(Type.FOR_EACH_HEALED);
|
||||
_healedCard = healedCard;
|
||||
}
|
||||
|
||||
public PhysicalCard getHealedCard() {
|
||||
return _healedCard;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user