"All Blades Perish"

This commit is contained in:
marcins78@gmail.com
2011-09-09 10:31:33 +00:00
parent a12f0259fe
commit 70c45c1002
5 changed files with 67 additions and 5 deletions

View File

@@ -45,7 +45,8 @@ public class Card1_161 extends AbstractResponseEvent {
@Override @Override
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, EffectResult effectResult, final PhysicalCard self) { public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, EffectResult effectResult, final PhysicalCard self) {
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.type(CardType.EVENT), Filters.keyword(Keyword.STEALTH))) if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.type(CardType.EVENT), Filters.keyword(Keyword.STEALTH)))
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.URUK_HAI))) { && Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.URUK_HAI))
&& PlayConditions.canPayForShadowCard(game, self, 0)) {
final PlayEventAction action = new PlayEventAction(self); final PlayEventAction action = new PlayEventAction(self);

View File

@@ -1,6 +1,7 @@
package com.gempukku.lotro.cards.set1.moria; package com.gempukku.lotro.cards.set1.moria;
import com.gempukku.lotro.cards.AbstractResponseEvent; import com.gempukku.lotro.cards.AbstractResponseEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction; import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.decisions.ForEachYouSpotDecision; import com.gempukku.lotro.cards.decisions.ForEachYouSpotDecision;
import com.gempukku.lotro.cards.effects.AddBurdenEffect; import com.gempukku.lotro.cards.effects.AddBurdenEffect;
@@ -43,8 +44,9 @@ public class Card1_189 extends AbstractResponseEvent {
@Override @Override
public List<? extends Action> getOptionalAfterActions(final String playerId, final LotroGame game, EffectResult effectResult, PhysicalCard self) { public List<? extends Action> getOptionalAfterActions(final String playerId, final LotroGame game, EffectResult effectResult, PhysicalCard self) {
if ((effectResult.getType() == EffectResult.Type.EXERT && game.getModifiersQuerying().hasKeyword(game.getGameState(), ((ExertResult) effectResult).getExertedCard(), Keyword.RING_BEARER)) if (((effectResult.getType() == EffectResult.Type.EXERT && game.getModifiersQuerying().hasKeyword(game.getGameState(), ((ExertResult) effectResult).getExertedCard(), Keyword.RING_BEARER))
|| (effectResult.getType() == EffectResult.Type.WOUND && game.getModifiersQuerying().hasKeyword(game.getGameState(), ((WoundResult) effectResult).getWoundedCard(), Keyword.RING_BEARER))) { || (effectResult.getType() == EffectResult.Type.WOUND && game.getModifiersQuerying().hasKeyword(game.getGameState(), ((WoundResult) effectResult).getWoundedCard(), Keyword.RING_BEARER)))
&& PlayConditions.canPayForShadowCard(game, self, 0)) {
final PlayEventAction action = new PlayEventAction(self); final PlayEventAction action = new PlayEventAction(self);
action.addEffect( action.addEffect(
new PlayoutDecisionEffect(game.getUserFeedback(), playerId, new PlayoutDecisionEffect(game.getUserFeedback(), playerId,

View File

@@ -40,7 +40,8 @@ public class Card1_194 extends AbstractResponseEvent {
@Override @Override
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, EffectResult effectResult, PhysicalCard self) { public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, EffectResult effectResult, PhysicalCard self) {
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.type(CardType.EVENT), Filters.keyword(Keyword.STEALTH))) if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effectResult, Filters.and(Filters.type(CardType.EVENT), Filters.keyword(Keyword.STEALTH)))
&& Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.MORIA), Filters.type(CardType.MINION)) >= 3) { && Filters.countActive(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.MORIA), Filters.type(CardType.MINION)) >= 3
&& PlayConditions.canPayForShadowCard(game, self, 0)) {
PlayEventAction action = new PlayEventAction(self); PlayEventAction action = new PlayEventAction(self);
action.addEffect(new CancelEffect(effect)); action.addEffect(new CancelEffect(effect));
return Collections.singletonList(action); return Collections.singletonList(action);

View File

@@ -0,0 +1,58 @@
package com.gempukku.lotro.cards.set1.wraith;
import com.gempukku.lotro.cards.AbstractResponseEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.effects.WoundCharacterEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.UnrespondableEffect;
import com.gempukku.lotro.logic.timing.results.WoundResult;
import java.util.Collections;
import java.util.List;
/**
* Set: The Fellowship of the Ring
* Side: Shadow
* Culture: Wraith
* Twilight Cost: 0
* Type: Event
* Game Text: Response: If a Nazgul is about to take a wound, prevent that wound.
*/
public class Card1_203 extends AbstractResponseEvent {
public Card1_203() {
super(Side.SHADOW, Culture.WRAITH, "All Blades Perish");
}
@Override
public int getTwilightCost() {
return 0;
}
@Override
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, final Effect effect, EffectResult effectResult, PhysicalCard self) {
if (effectResult.getType() == EffectResult.Type.WOUND) {
final WoundResult woundResult = (WoundResult) effectResult;
if (game.getModifiersQuerying().hasKeyword(game.getGameState(), woundResult.getWoundedCard(), Keyword.NAZGUL)
&& PlayConditions.canPayForShadowCard(game, self, 0)) {
PlayEventAction action = new PlayEventAction(self);
action.addEffect(
new UnrespondableEffect() {
@Override
public void playEffect(LotroGame game) {
((WoundCharacterEffect) effect).prevent();
}
});
return Collections.singletonList(action);
}
}
return null;
}
}

View File

@@ -7,7 +7,7 @@ import java.util.Map;
public class LotroCardBlueprintLibrary { public class LotroCardBlueprintLibrary {
private String[] _packageNames = private String[] _packageNames =
new String[]{ new String[]{
"", ".dwarven", ".elven", ".gandalf", ".gondor", ".isengard", ".moria", ".shire", ".site" "", ".dwarven", ".elven", ".gandalf", ".gondor", ".isengard", ".moria", ".wraith", ".sauron", ".shire", ".site"
}; };
private Map<String, LotroCardBlueprint> _blueprintMap = new HashMap<String, LotroCardBlueprint>(); private Map<String, LotroCardBlueprint> _blueprintMap = new HashMap<String, LotroCardBlueprint>();