"Uruk Scout"
This commit is contained in:
@@ -29,6 +29,10 @@ public class PlayEventAction extends AbstractCostToEffectAction {
|
|||||||
private boolean _cardDiscarded;
|
private boolean _cardDiscarded;
|
||||||
|
|
||||||
public PlayEventAction(PhysicalCard card) {
|
public PlayEventAction(PhysicalCard card) {
|
||||||
|
this(card, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PlayEventAction(PhysicalCard card, boolean requiresRanger) {
|
||||||
_source = card;
|
_source = card;
|
||||||
|
|
||||||
List<Effect> preCostEffects = new LinkedList<Effect>();
|
List<Effect> preCostEffects = new LinkedList<Effect>();
|
||||||
@@ -41,6 +45,8 @@ public class PlayEventAction extends AbstractCostToEffectAction {
|
|||||||
_preCostIterator = preCostEffects.iterator();
|
_preCostIterator = preCostEffects.iterator();
|
||||||
|
|
||||||
_playCardEffect = new PlayEventEffect(card);
|
_playCardEffect = new PlayEventEffect(card);
|
||||||
|
if (requiresRanger)
|
||||||
|
_playCardEffect.setRequiresRanger(true);
|
||||||
|
|
||||||
_discardCardEffect = new PutCardIntoDiscardEffect(card);
|
_discardCardEffect = new PutCardIntoDiscardEffect(card);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ public class Card1_088 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||||
PlayEventAction action = new PlayEventAction(self);
|
PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
new RemoveTwilightEffect(4));
|
new RemoveTwilightEffect(4));
|
||||||
return action;
|
return action;
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class Card1_099 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
final PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendCost(
|
action.appendCost(
|
||||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class Card1_104 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||||
PlayEventAction action = new PlayEventAction(self);
|
PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendCost(
|
action.appendCost(
|
||||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class Card1_106 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
final PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendCost(
|
action.appendCost(
|
||||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.type(CardType.COMPANION), Filters.canExert()));
|
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.type(CardType.COMPANION), Filters.canExert()));
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class Card1_110 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||||
PlayEventAction action = new PlayEventAction(self);
|
PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendEffect(new PlaySiteEffect(playerId, game.getGameState().getCurrentSiteNumber() + 1));
|
action.appendEffect(new PlaySiteEffect(playerId, game.getGameState().getCurrentSiteNumber() + 1));
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class Card1_111 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||||
PlayEventAction action = new PlayEventAction(self);
|
PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendCost(
|
action.appendCost(
|
||||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class Card1_113 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(final String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
final PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendCost(
|
action.appendCost(
|
||||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER)));
|
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER)));
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ public class Card1_117 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, final LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
final PlayEventAction action = new PlayEventAction(self, true);
|
||||||
|
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
new ChooseActiveCardEffect(playerId, "Choose a GONDOR companion", Filters.culture(Culture.GONDOR), Filters.type(CardType.COMPANION)) {
|
new ChooseActiveCardEffect(playerId, "Choose a GONDOR companion", Filters.culture(Culture.GONDOR), Filters.type(CardType.COMPANION)) {
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class Card1_119 extends AbstractEvent {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier) {
|
||||||
final PlayEventAction action = new PlayEventAction(self);
|
final PlayEventAction action = new PlayEventAction(self, true);
|
||||||
action.appendEffect(
|
action.appendEffect(
|
||||||
new ChooseActiveCardEffect(playerId, "Choose a roaming minion", Filters.keyword(Keyword.ROAMING), Filters.type(CardType.MINION)) {
|
new ChooseActiveCardEffect(playerId, "Choose a roaming minion", Filters.keyword(Keyword.ROAMING), Filters.type(CardType.MINION)) {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
package com.gempukku.lotro.cards.set2.isengard;
|
||||||
|
|
||||||
|
import com.gempukku.lotro.cards.AbstractMinion;
|
||||||
|
import com.gempukku.lotro.cards.PlayConditions;
|
||||||
|
import com.gempukku.lotro.cards.costs.ExertCharactersCost;
|
||||||
|
import com.gempukku.lotro.cards.effects.CancelEventEffect;
|
||||||
|
import com.gempukku.lotro.cards.modifiers.RoamingPenaltyModifier;
|
||||||
|
import com.gempukku.lotro.common.CardType;
|
||||||
|
import com.gempukku.lotro.common.Culture;
|
||||||
|
import com.gempukku.lotro.common.Keyword;
|
||||||
|
import com.gempukku.lotro.common.Race;
|
||||||
|
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.effects.PlayEventEffect;
|
||||||
|
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||||
|
import com.gempukku.lotro.logic.timing.Action;
|
||||||
|
import com.gempukku.lotro.logic.timing.Effect;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set: Mines of Moria
|
||||||
|
* Side: Shadow
|
||||||
|
* Culture: Isengard
|
||||||
|
* Twilight Cost: 3
|
||||||
|
* Type: Minion • Uruk-Hai
|
||||||
|
* Strength: 7
|
||||||
|
* Vitality: 2
|
||||||
|
* Site: 5
|
||||||
|
* Game Text: Tracker. Damage +1. The roaming penalty for each [ISENGARD] minion you play is -1. Response: If an event
|
||||||
|
* is played that spots or exerts a ranger, exert this minion to cancel that event.
|
||||||
|
*/
|
||||||
|
public class Card2_047 extends AbstractMinion {
|
||||||
|
public Card2_047() {
|
||||||
|
super(3, 7, 2, 5, Race.URUK_HAI, Culture.ISENGARD, "Uruk Scout");
|
||||||
|
addKeyword(Keyword.TRACKER);
|
||||||
|
addKeyword(Keyword.DAMAGE);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Modifier> getAlwaysOnModifiers(PhysicalCard self) {
|
||||||
|
return Collections.singletonList(
|
||||||
|
new RoamingPenaltyModifier(self, Filters.and(Filters.culture(Culture.ISENGARD), Filters.type(CardType.MINION)), -1));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<? extends Action> getOptionalBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
|
||||||
|
if (PlayConditions.played(game.getGameState(), game.getModifiersQuerying(), effect, Filters.type(CardType.EVENT))
|
||||||
|
&& PlayConditions.canExert(game.getGameState(), game.getModifiersQuerying(), self)) {
|
||||||
|
PlayEventEffect playEffect = (PlayEventEffect) effect;
|
||||||
|
if (playEffect.isRequiresRanger()) {
|
||||||
|
ActivateCardAction action = new ActivateCardAction(self, Keyword.RESPONSE);
|
||||||
|
action.appendCost(
|
||||||
|
new ExertCharactersCost(playerId, self));
|
||||||
|
action.appendEffect(
|
||||||
|
new CancelEventEffect(playerId, playEffect));
|
||||||
|
return Collections.singletonList(action);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,11 +4,20 @@ import com.gempukku.lotro.game.PhysicalCard;
|
|||||||
|
|
||||||
public class PlayEventEffect extends PlayCardEffect {
|
public class PlayEventEffect extends PlayCardEffect {
|
||||||
private boolean _cancelled;
|
private boolean _cancelled;
|
||||||
|
private boolean _requiresRanger;
|
||||||
|
|
||||||
public PlayEventEffect(PhysicalCard cardPlayed) {
|
public PlayEventEffect(PhysicalCard cardPlayed) {
|
||||||
super(cardPlayed);
|
super(cardPlayed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isRequiresRanger() {
|
||||||
|
return _requiresRanger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setRequiresRanger(boolean requiresRanger) {
|
||||||
|
_requiresRanger = requiresRanger;
|
||||||
|
}
|
||||||
|
|
||||||
public void cancel() {
|
public void cancel() {
|
||||||
_cancelled = true;
|
_cancelled = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user