"Uruk-hai Sword"
This commit is contained in:
@@ -32,7 +32,7 @@ public class Card1_008 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.DWARF), Filters.not(Filters.attached(Filters.keyword(Keyword.ARMOR))));
|
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.DWARF), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.ARMOR))));
|
||||||
|
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class Card1_009 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.DWARF), Filters.not(Filters.attached(Filters.keyword(Keyword.HAND_WEAPON))));
|
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.DWARF), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.HAND_WEAPON))));
|
||||||
|
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class Card1_014 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.name("Gimli"), Filters.not(Filters.attached(Filters.keyword(Keyword.HAND_WEAPON))));
|
Filter validTargetFilter = Filters.and(Filters.name("Gimli"), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.HAND_WEAPON))));
|
||||||
|
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ public class Card1_015 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.name("Gimli"), Filters.not(Filters.attached(Filters.keyword(Keyword.HELM))));
|
Filter validTargetFilter = Filters.and(Filters.name("Gimli"), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.HELM))));
|
||||||
|
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class Card1_031 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.ELF), Filters.not(Filters.attached(Filters.keyword(Keyword.MOUNT))));
|
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.ELF), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.MOUNT))));
|
||||||
|
|
||||||
Map<Filter, Integer> costModifiers = new HashMap<Filter, Integer>();
|
Map<Filter, Integer> costModifiers = new HashMap<Filter, Integer>();
|
||||||
costModifiers.put(Filters.name("Arwen"), -2);
|
costModifiers.put(Filters.name("Arwen"), -2);
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ public class Card1_033 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.name("Legolas"), Filters.not(Filters.attached(Filters.keyword(Keyword.RANGED_WEAPON))));
|
Filter validTargetFilter = Filters.and(Filters.name("Legolas"), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.RANGED_WEAPON))));
|
||||||
|
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class Card1_041 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.ELF), Filters.not(Filters.attached(Filters.keyword(Keyword.RANGED_WEAPON))));
|
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.ELF), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.RANGED_WEAPON))));
|
||||||
|
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
appendTransferPossessionAction(actions, game, self, validTargetFilter);
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class Card1_042 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.type(CardType.COMPANION), Filters.not(Filters.attached(Filters.keyword(Keyword.CLOAK))));
|
Filter validTargetFilter = Filters.and(Filters.type(CardType.COMPANION), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.CLOAK))));
|
||||||
|
|
||||||
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF)))
|
if (Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.keyword(Keyword.ELF)))
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public class Card1_047 extends AbstractAttachableFPPossession {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.name("Arwen"), Filters.not(Filters.attached(Filters.keyword(Keyword.HAND_WEAPON))));
|
Filter validTargetFilter = Filters.and(Filters.name("Arwen"), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.HAND_WEAPON))));
|
||||||
|
|
||||||
if (!Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Gwemegil")))
|
if (!Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.name("Gwemegil")))
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class Card1_049 extends AbstractAttachable {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
List<Action> actions = new LinkedList<Action>();
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
Filter validTargetFilter = Filters.and(Filters.culture(Culture.GONDOR), Filters.keyword(Keyword.MAN), Filters.not(Filters.attached(Filters.name("The Last Alliance of Elves and Men"))));
|
Filter validTargetFilter = Filters.and(Filters.culture(Culture.GONDOR), Filters.keyword(Keyword.MAN), Filters.not(Filters.hasAttached(Filters.name("The Last Alliance of Elves and Men"))));
|
||||||
|
|
||||||
appendAttachCardAction(actions, game, self, validTargetFilter);
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
|
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ public class Card1_134 extends AbstractLotroCardBlueprint {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
if (PlayConditions.canPlayShadowCardDuringPhase(game, Phase.SHADOW, self)
|
if (PlayConditions.canPlayShadowCardDuringPhase(game, Phase.SHADOW, self)
|
||||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert())
|
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert())
|
||||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.SITE), Filters.not(Filters.attached(Filters.name("Saruman's Chill"))))) {
|
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.SITE), Filters.not(Filters.hasAttached(Filters.name("Saruman's Chill"))))) {
|
||||||
|
|
||||||
final AttachPermanentAction action = new AttachPermanentAction(self, Filters.and(Filters.type(CardType.SITE), Filters.not(Filters.attached(Filters.name("Saruman's Chill")))), Collections.<Filter, Integer>emptyMap());
|
final AttachPermanentAction action = new AttachPermanentAction(self, Filters.and(Filters.type(CardType.SITE), Filters.not(Filters.hasAttached(Filters.name("Saruman's Chill")))), Collections.<Filter, Integer>emptyMap());
|
||||||
action.addCost(
|
action.addCost(
|
||||||
new ChooseActiveCardEffect(playerId, "Choose ISENGARD minion", Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert()) {
|
new ChooseActiveCardEffect(playerId, "Choose ISENGARD minion", Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert()) {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ public class Card1_135 extends AbstractLotroCardBlueprint {
|
|||||||
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
if (PlayConditions.canPlayShadowCardDuringPhase(game, Phase.SHADOW, self)
|
if (PlayConditions.canPlayShadowCardDuringPhase(game, Phase.SHADOW, self)
|
||||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert())
|
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert())
|
||||||
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.SITE), Filters.not(Filters.attached(Filters.name("Saruman's Frost"))))) {
|
&& Filters.canSpot(game.getGameState(), game.getModifiersQuerying(), Filters.type(CardType.SITE), Filters.not(Filters.hasAttached(Filters.name("Saruman's Frost"))))) {
|
||||||
|
|
||||||
final AttachPermanentAction action = new AttachPermanentAction(self, Filters.and(Filters.type(CardType.SITE), Filters.not(Filters.attached(Filters.name("Saruman's Frost")))), Collections.<Filter, Integer>emptyMap());
|
final AttachPermanentAction action = new AttachPermanentAction(self, Filters.and(Filters.type(CardType.SITE), Filters.not(Filters.hasAttached(Filters.name("Saruman's Frost")))), Collections.<Filter, Integer>emptyMap());
|
||||||
action.addCost(
|
action.addCost(
|
||||||
new ChooseActiveCardEffect(playerId, "Choose ISENGARD minion", Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert()) {
|
new ChooseActiveCardEffect(playerId, "Choose ISENGARD minion", Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION), Filters.canExert()) {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package com.gempukku.lotro.cards.set1.isengard;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractAttachable;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.effects.DiscardTopCardFromDeckEffect;
|
||||||
|
import com.gempukku.lotro.cards.modifiers.StrengthModifier;
|
||||||
|
import com.gempukku.lotro.common.CardType;
|
||||||
|
import com.gempukku.lotro.common.Culture;
|
||||||
|
import com.gempukku.lotro.common.Keyword;
|
||||||
|
import com.gempukku.lotro.common.Side;
|
||||||
|
import com.gempukku.lotro.filters.Filter;
|
||||||
|
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.CostToEffectAction;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||||
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.LinkedList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: The Fellowship of the Ring
|
||||||
|
* Side: Shadow
|
||||||
|
* Culture: Isengard
|
||||||
|
* Twilight Cost: 1
|
||||||
|
* Type: Possession • Hand Weapon
|
||||||
|
* Strength: +2
|
||||||
|
* Game Text: Bearer must be an Uruk-hai. Each time bearer wins a skirmish, the Free Peoples player must discard the
|
||||||
|
* top card of his draw deck.
|
||||||
|
*/
|
||||||
|
public class Card1_160 extends AbstractAttachable {
|
||||||
|
public Card1_160() {
|
||||||
|
super(Side.SHADOW, CardType.POSSESSION, 1, Culture.ISENGARD, "Uruk-hai Sword", "1_160");
|
||||||
|
addKeyword(Keyword.HAND_WEAPON);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Action> getPlayablePhaseActions(String playerId, LotroGame game, PhysicalCard self) {
|
||||||
|
List<Action> actions = new LinkedList<Action>();
|
||||||
|
|
||||||
|
Filter validTargetFilter = Filters.and(Filters.keyword(Keyword.URUK_HAI), Filters.not(Filters.hasAttached(Filters.keyword(Keyword.HAND_WEAPON))));
|
||||||
|
|
||||||
|
appendAttachCardAction(actions, game, self, validTargetFilter);
|
||||||
|
|
||||||
|
return actions;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Modifier getAlwaysOnEffect(PhysicalCard self) {
|
||||||
|
return new StrengthModifier(self, Filters.attachedTo(self), 2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Action> getRequiredWhenActions(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||||
|
if (PlayConditions.winsSkirmish(effectResult, self.getAttachedTo())) {
|
||||||
|
CostToEffectAction action = new CostToEffectAction(self, "The Free Peoples player must discard the top card of his draw deck.");
|
||||||
|
action.addEffect(new DiscardTopCardFromDeckEffect(game.getGameState().getCurrentPlayerId()));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -90,7 +90,7 @@ public class Filters {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Filter attached(final Filter filter) {
|
public static Filter hasAttached(final Filter filter) {
|
||||||
return new Filter() {
|
return new Filter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
public boolean accepts(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard physicalCard) {
|
||||||
|
|||||||
Reference in New Issue
Block a user