"Howl of Harad"
This commit is contained in:
@@ -211,6 +211,16 @@ public class PlayConditions {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean losesSkirmishAgainst(GameState gameState, ModifiersQuerying modifiersQuerying, EffectResult effectResult, Filter loserFilter, Filter winnerFilter) {
|
||||
EffectResult.Type effectType = effectResult.getType();
|
||||
if (effectType == EffectResult.Type.RESOLVE_SKIRMISH || effectType == EffectResult.Type.OVERWHELM_IN_SKIRMISH) {
|
||||
SkirmishResult skirmishResult = (SkirmishResult) effectResult;
|
||||
return (Filters.filter(skirmishResult.getLosers(), gameState, modifiersQuerying, loserFilter).size() > 0)
|
||||
&& Filters.filter(skirmishResult.getWinners(), gameState, modifiersQuerying, winnerFilter).size() > 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isWounded(EffectResult effectResult, PhysicalCard character) {
|
||||
if (effectResult.getType() == EffectResult.Type.WOUND) {
|
||||
return ((WoundResult) effectResult).getWoundedCards().contains(character);
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.gempukku.lotro.cards.set4.raider;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractPermanent;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
|
||||
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.ChooseAndWoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Two Towers
|
||||
* Side: Shadow
|
||||
* Culture: Raider
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition
|
||||
* Game Text: Plays to your support area. Each time a companion or ally loses a skirmish involving a Southron, you may
|
||||
* remove (4) to make the Free Peoples Player wound a Ring-bound companion.
|
||||
*/
|
||||
public class Card4_236 extends AbstractPermanent {
|
||||
public Card4_236() {
|
||||
super(Side.SHADOW, 1, CardType.CONDITION, Culture.RAIDER, Zone.SUPPORT, "Howl of Harad");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (game.getGameState().getTwilightPool() >= 4
|
||||
&& PlayConditions.losesSkirmishAgainst(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.or(Filters.type(CardType.COMPANION), Filters.type(CardType.ALLY)), Filters.keyword(Keyword.SOUTHRON))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new RemoveTwilightEffect(4));
|
||||
action.appendEffect(
|
||||
new ChooseAndWoundCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, Filters.type(CardType.COMPANION), Filters.keyword(Keyword.RING_BOUND)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user