"Uruk Scout"
This commit is contained in:
@@ -29,6 +29,10 @@ public class PlayEventAction extends AbstractCostToEffectAction {
|
||||
private boolean _cardDiscarded;
|
||||
|
||||
public PlayEventAction(PhysicalCard card) {
|
||||
this(card, false);
|
||||
}
|
||||
|
||||
public PlayEventAction(PhysicalCard card, boolean requiresRanger) {
|
||||
_source = card;
|
||||
|
||||
List<Effect> preCostEffects = new LinkedList<Effect>();
|
||||
@@ -41,6 +45,8 @@ public class PlayEventAction extends AbstractCostToEffectAction {
|
||||
_preCostIterator = preCostEffects.iterator();
|
||||
|
||||
_playCardEffect = new PlayEventEffect(card);
|
||||
if (requiresRanger)
|
||||
_playCardEffect.setRequiresRanger(true);
|
||||
|
||||
_discardCardEffect = new PutCardIntoDiscardEffect(card);
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public class Card1_088 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
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 RemoveTwilightEffect(4));
|
||||
return action;
|
||||
|
||||
@@ -37,7 +37,7 @@ public class Card1_099 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
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(
|
||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
||||
action.appendEffect(
|
||||
|
||||
@@ -28,7 +28,7 @@ public class Card1_104 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
PlayEventAction action = new PlayEventAction(self, true);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
||||
action.appendEffect(
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Card1_106 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
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(
|
||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.type(CardType.COMPANION), Filters.canExert()));
|
||||
action.appendEffect(
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Card1_110 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
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));
|
||||
return action;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class Card1_111 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, PhysicalCard self, int twilightModifier) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
PlayEventAction action = new PlayEventAction(self, true);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER), Filters.canExert()));
|
||||
action.appendEffect(
|
||||
|
||||
@@ -26,7 +26,7 @@ public class Card1_113 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
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(
|
||||
new ChooseAndExertCharactersCost(action, playerId, 1, 1, Filters.keyword(Keyword.RANGER)));
|
||||
action.appendEffect(
|
||||
|
||||
@@ -27,7 +27,7 @@ public class Card1_117 extends AbstractEvent {
|
||||
|
||||
@Override
|
||||
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(
|
||||
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
|
||||
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(
|
||||
new ChooseActiveCardEffect(playerId, "Choose a roaming minion", Filters.keyword(Keyword.ROAMING), Filters.type(CardType.MINION)) {
|
||||
@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 {
|
||||
private boolean _cancelled;
|
||||
private boolean _requiresRanger;
|
||||
|
||||
public PlayEventEffect(PhysicalCard cardPlayed) {
|
||||
super(cardPlayed);
|
||||
}
|
||||
|
||||
public boolean isRequiresRanger() {
|
||||
return _requiresRanger;
|
||||
}
|
||||
|
||||
public void setRequiresRanger(boolean requiresRanger) {
|
||||
_requiresRanger = requiresRanger;
|
||||
}
|
||||
|
||||
public void cancel() {
|
||||
_cancelled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user