Fixed "Ever Watchful", "To Mordor We Will Take You!", "The Witch-king, Greatest of the Nine" to not allow to exert an exhausted character
This commit is contained in:
@@ -10,6 +10,7 @@ import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachable;
|
||||
import com.gempukku.lotro.logic.effects.*;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.*;
|
||||
import com.gempukku.lotro.logic.timing.*;
|
||||
|
||||
@@ -58,7 +59,7 @@ public class Card40_001 extends AbstractAttachable {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
List<Effect> possibleCosts = new LinkedList<Effect>();
|
||||
possibleCosts.add(
|
||||
new ExertCharactersEffect(action, self, Filters.hasAttached(self)));
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.hasAttached(self)));
|
||||
possibleCosts.add(
|
||||
new DiscardCardAtRandomFromHandEffect(self, self.getOwner(), false));
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachable;
|
||||
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.ExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.AbstractExtraPlayCostModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.cost.ExertExtraPlayCostModifier;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
@@ -61,7 +61,7 @@ public class Card40_216 extends AbstractAttachable {
|
||||
possibleEffects.add(
|
||||
new AddTwilightEffect(self, 3));
|
||||
possibleEffects.add(
|
||||
new ExertCharactersEffect(action, self, self.getAttachedTo()));
|
||||
new ChooseAndExertCharactersEffect(action, GameUtils.getFreePeoplePlayer(game), 1, 1, self.getAttachedTo()));
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, GameUtils.getFreePeoplePlayer(game), possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
package com.gempukku.lotro.cards.set40.wraith;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.effects.*;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
@@ -14,9 +9,17 @@ import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.AddBurdenEffect;
|
||||
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseActionProxyEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -57,7 +60,7 @@ public class Card40_202 extends AbstractEvent {
|
||||
possibleEffects.add(
|
||||
new AddBurdenEffect(freePeoplePlayer, self, 1));
|
||||
possibleEffects.add(
|
||||
new ExertCharactersEffect(action, self, Filters.ringBearer));
|
||||
new ChooseAndExertCharactersEffect(action, GameUtils.getFreePeoplePlayer(game), 1, 1, Filters.ringBearer));
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, freePeoplePlayer, possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
package com.gempukku.lotro.cards.set40.wraith;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.logic.effects.AddBurdenEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.ExertCharactersEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Names;
|
||||
@@ -14,8 +9,13 @@ import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
|
||||
import com.gempukku.lotro.logic.effects.AddBurdenEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -50,7 +50,7 @@ public class Card40_211 extends AbstractMinion {
|
||||
possibleEffects.add(
|
||||
new AddBurdenEffect(freePeoplePlayer, self, 1));
|
||||
possibleEffects.add(
|
||||
new ExertCharactersEffect(action, self, Filters.ringBearer));
|
||||
new ChooseAndExertCharactersEffect(action, GameUtils.getFreePeoplePlayer(game), 1, 1, Filters.ringBearer));
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, freePeoplePlayer, possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
|
||||
@@ -623,7 +623,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
playerDecided(P2, "0");
|
||||
|
||||
// Choose Hobbit Sword to discard
|
||||
playerDecided(P2, ""+hobbitSword.getCardId());
|
||||
playerDecided(P2, "" + hobbitSword.getCardId());
|
||||
|
||||
// Use Scourge of the Shire
|
||||
playerDecided(P1, "0");
|
||||
@@ -678,7 +678,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
playerDecided(P1, _game.getGameState().getRingBearer(P1).getCardId() + " " + nelya.getCardId());
|
||||
|
||||
// Choose skirmish to resolve
|
||||
playerDecided(P1, ""+_game.getGameState().getRingBearer(P1).getCardId());
|
||||
playerDecided(P1, "" + _game.getGameState().getRingBearer(P1).getCardId());
|
||||
|
||||
// Skirmish phase
|
||||
AwaitingDecision skirmishAction = _userFeedback.getAwaitingDecision(P1);
|
||||
@@ -701,7 +701,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
playerDecided(P1, _game.getGameState().getRingBearer(P1).getCardId() + " " + nelya.getCardId());
|
||||
|
||||
// Choose skirmish to resolve
|
||||
playerDecided(P1, ""+_game.getGameState().getRingBearer(P1).getCardId());
|
||||
playerDecided(P1, "" + _game.getGameState().getRingBearer(P1).getCardId());
|
||||
|
||||
// End fierce skirmish phase
|
||||
playerDecided(P1, "");
|
||||
@@ -757,7 +757,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
playerDecided(P2, "");
|
||||
|
||||
// Choose skirmish to start
|
||||
playerDecided(P1, gimli.getCardId()+"");
|
||||
playerDecided(P1, gimli.getCardId() + "");
|
||||
|
||||
// End skirmish
|
||||
playerDecided(P1, "");
|
||||
@@ -808,7 +808,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
playerDecided(P1, frodo.getCardId() + " " + goblinRunner.getCardId());
|
||||
|
||||
// Choose skirmish to start
|
||||
playerDecided(P1, frodo.getCardId()+"");
|
||||
playerDecided(P1, frodo.getCardId() + "");
|
||||
|
||||
AwaitingDecision playSkirmishAction = _userFeedback.getAwaitingDecision(P1);
|
||||
assertEquals(AwaitingDecisionType.CARD_ACTION_CHOICE, playSkirmishAction.getDecisionType());
|
||||
@@ -857,7 +857,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
playerDecided(P1, "0");
|
||||
|
||||
_game.carryOutPendingActionsUntilDecisionNeeded();
|
||||
|
||||
|
||||
assertFalse(_game.isFinished());
|
||||
}
|
||||
|
||||
@@ -917,10 +917,10 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
initializeSimplestGame();
|
||||
|
||||
PhysicalCardImpl troll = new PhysicalCardImpl(100, "20_256", P2, _library.getLotroCardBlueprint("20_256"));
|
||||
PhysicalCardImpl runner1 = new PhysicalCardImpl(101, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
PhysicalCardImpl runner2 = new PhysicalCardImpl(102, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
PhysicalCardImpl runner3 = new PhysicalCardImpl(103, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
PhysicalCardImpl runner4 = new PhysicalCardImpl(104, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
PhysicalCardImpl runner1 = new PhysicalCardImpl(101, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
PhysicalCardImpl runner2 = new PhysicalCardImpl(102, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
PhysicalCardImpl runner3 = new PhysicalCardImpl(103, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
PhysicalCardImpl runner4 = new PhysicalCardImpl(104, "20_268", P2, _library.getLotroCardBlueprint("20_268"));
|
||||
|
||||
skipMulligans();
|
||||
|
||||
@@ -931,7 +931,7 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
_game.getGameState().addCardToZone(_game, runner4, Zone.HAND);
|
||||
|
||||
_game.getGameState().addTwilight(7);
|
||||
|
||||
|
||||
// End fellowship
|
||||
playerDecided(P1, "");
|
||||
|
||||
@@ -946,21 +946,64 @@ public class IndividualCardAtTest extends AbstractAtTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void extraPossessionClass() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
initializeSimplestGame();
|
||||
public void exertingEhaustedFrodo() throws CardNotFoundException, DecisionResultInvalidException {
|
||||
Map<String, LotroDeck> decks = new HashMap<String, LotroDeck>();
|
||||
LotroDeck lotroDeck = new LotroDeck("Some deck");
|
||||
lotroDeck.setRingBearer("10_121");
|
||||
lotroDeck.setRing("40_1");
|
||||
// 7_330,7_336,8_117,7_342,7_345,7_350,8_120,10_120,7_360
|
||||
lotroDeck.addSite("1_323");
|
||||
lotroDeck.addSite("7_335");
|
||||
lotroDeck.addSite("8_117");
|
||||
lotroDeck.addSite("7_342");
|
||||
lotroDeck.addSite("7_345");
|
||||
lotroDeck.addSite("7_350");
|
||||
lotroDeck.addSite("8_120");
|
||||
lotroDeck.addSite("10_120");
|
||||
lotroDeck.addSite("7_360");
|
||||
decks.put(P1, lotroDeck);
|
||||
decks.put(P2, createSimplestDeck());
|
||||
|
||||
PhysicalCardImpl aragorn = new PhysicalCardImpl(100, "6_50", P1, _library.getLotroCardBlueprint("6_50"));
|
||||
PhysicalCardImpl flamingBrand = new PhysicalCardImpl(101, "2_32", P1, _library.getLotroCardBlueprint("2_32"));
|
||||
PhysicalCardImpl rangersSword = new PhysicalCardImpl(101, "1_112", P1, _library.getLotroCardBlueprint("1_112"));
|
||||
_userFeedback = new DefaultUserFeedback();
|
||||
|
||||
_game.getGameState().addCardToZone(_game, aragorn, Zone.HAND);
|
||||
_game.getGameState().addCardToZone(_game, rangersSword, Zone.HAND);
|
||||
_game.getGameState().addCardToZone(_game, flamingBrand, Zone.HAND);
|
||||
LotroFormatLibrary formatLibrary = new LotroFormatLibrary(new DefaultAdventureLibrary(), _library);
|
||||
LotroFormat format = formatLibrary.getFormat("movie");
|
||||
|
||||
skipMulligans();
|
||||
_game = new DefaultLotroGame(format, decks, _userFeedback, _library);
|
||||
_userFeedback.setGame(_game);
|
||||
_game.startGame();
|
||||
|
||||
playerDecided(P1, getCardActionId(_userFeedback.getAwaitingDecision(P1), "Play Aragorn"));
|
||||
playerDecided(P1, getCardActionId(_userFeedback.getAwaitingDecision(P1), "Attach Ranger"));
|
||||
playerDecided(P1, getCardActionId(_userFeedback.getAwaitingDecision(P1), "Attach Flaming"));
|
||||
PhysicalCardImpl cheapMinion = new PhysicalCardImpl(100, "40_165", P2, _library.getLotroCardBlueprint("40_165"));
|
||||
PhysicalCardImpl randomCard1 = new PhysicalCardImpl(101, "20_268", P1, _library.getLotroCardBlueprint("20_268"));
|
||||
|
||||
// Bidding
|
||||
playerDecided(P1, "1");
|
||||
playerDecided(P2, "0");
|
||||
|
||||
// Seating choice
|
||||
playerDecided(P1, "0");
|
||||
|
||||
// Mulligans
|
||||
playerDecided(P1, "0");
|
||||
playerDecided(P2, "0");
|
||||
|
||||
final PhysicalCard frodo = _game.getGameState().getRingBearer(P1);
|
||||
_game.getGameState().addCardToZone(_game, cheapMinion, Zone.HAND);
|
||||
_game.getGameState().addCardToZone(_game, randomCard1, Zone.HAND);
|
||||
|
||||
_game.getGameState().addTokens(frodo, Token.WOUND, 4);
|
||||
_game.getGameState().addTwilight(3);
|
||||
|
||||
// Pass felloship
|
||||
playerDecided(P1, "");
|
||||
|
||||
// Play minion
|
||||
playerDecided(P2, "0");
|
||||
playerDecided(P2, "");
|
||||
|
||||
// Put on the ring
|
||||
playerDecided(P1, "0");
|
||||
|
||||
assertEquals(Zone.DISCARD, randomCard1.getZone());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user