"The Witch-King"
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
package com.gempukku.lotro.cards.set7.wraith;
|
||||
|
||||
import com.gempukku.lotro.cards.AbstractMinion;
|
||||
import com.gempukku.lotro.cards.PlayConditions;
|
||||
import com.gempukku.lotro.cards.effects.choose.ChooseAndPutCardFromDiscardIntoHandEffect;
|
||||
import com.gempukku.lotro.cards.modifiers.SpecialFlagModifier;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
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.RemoveThreatsEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: The Return of the King
|
||||
* Side: Shadow
|
||||
* Culture: Wraith
|
||||
* Twilight Cost: 8
|
||||
* Type: Minion • Nazgul
|
||||
* Strength: 14
|
||||
* Vitality: 4
|
||||
* Site: 3
|
||||
* Game Text: Fierce. When you play the Witch-King, you may remove a threat to take a [WRAITH] card into hand from your
|
||||
* discard pile. The Ring-bearer cannot take threat wounds.
|
||||
*/
|
||||
public class Card7_221 extends AbstractMinion {
|
||||
public Card7_221() {
|
||||
super(8, 14, 4, 3, Race.NAZGUL, Culture.WRAITH, "The Witch-King", true);
|
||||
addKeyword(Keyword.FIERCE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(
|
||||
new SpecialFlagModifier(self, ModifierFlag.RING_BEARER_CANT_TAKE_THREAT_WOUNDS));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (PlayConditions.played(game, effectResult, self)
|
||||
&& PlayConditions.canRemoveThreat(game, self, 1)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new RemoveThreatsEffect(self, 1));
|
||||
action.appendEffect(
|
||||
new ChooseAndPutCardFromDiscardIntoHandEffect(action, playerId, 1, 1, Culture.WRAITH));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,10 @@
|
||||
package com.gempukku.lotro.logic.modifiers;
|
||||
|
||||
public enum ModifierFlag {
|
||||
HAS_TO_MOVE_IF_POSSIBLE, RING_TEXT_INACTIVE, SARUMAN_FIRST_SENTENCE_INACTIVE, WIN_CHECK_AFTER_SHADOW_RECONCILE,
|
||||
CANT_PLAY_FROM_DISCARD_OR_DECK
|
||||
HAS_TO_MOVE_IF_POSSIBLE,
|
||||
RING_TEXT_INACTIVE,
|
||||
SARUMAN_FIRST_SENTENCE_INACTIVE,
|
||||
WIN_CHECK_AFTER_SHADOW_RECONCILE,
|
||||
CANT_PLAY_FROM_DISCARD_OR_DECK,
|
||||
RING_BEARER_CANT_TAKE_THREAT_WOUNDS
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package com.gempukku.lotro.logic.timing.rules;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
@@ -8,6 +10,7 @@ import com.gempukku.lotro.game.state.actions.DefaultActionsEnvironment;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
|
||||
import com.gempukku.lotro.logic.timing.Action;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.results.KillResult;
|
||||
@@ -36,9 +39,15 @@ public class ThreatRule {
|
||||
action.setText("Threat damage assignment");
|
||||
action.appendEffect(
|
||||
new RemoveThreatsEffect(null, threats));
|
||||
for (int i = 0; i < threats; i++)
|
||||
for (int i = 0; i < threats; i++) {
|
||||
Filter filter = Filters.type(CardType.COMPANION);
|
||||
|
||||
if (game.getModifiersQuerying().hasFlagActive(game.getGameState(), ModifierFlag.RING_BEARER_CANT_TAKE_THREAT_WOUNDS))
|
||||
filter = Filters.and(filter, Filters.not(Keyword.RING_BEARER));
|
||||
|
||||
action.appendEffect(
|
||||
new ChooseAndWoundCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, CardType.COMPANION));
|
||||
new ChooseAndWoundCharactersEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, filter));
|
||||
}
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user