From f9559c9ecf21911a3fa4a47f94022652b4edbb2e Mon Sep 17 00:00:00 2001 From: "marcin.sciesinski" Date: Tue, 10 Sep 2019 10:41:18 -0700 Subject: [PATCH] Fixing spot modifier --- .../effect/appender/ChooseHowManyToSpot.java | 2 +- .../logic/actions/AttachPermanentAction.java | 2 +- .../com/gempukku/lotro/at/NewCardsAtTest.java | 22 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/ChooseHowManyToSpot.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/ChooseHowManyToSpot.java index 69a0325e7..3c5fb70bf 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/ChooseHowManyToSpot.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/cards/build/field/effect/appender/ChooseHowManyToSpot.java @@ -33,7 +33,7 @@ public class ChooseHowManyToSpot implements EffectAppenderProducer { @Override protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) { final Filterable filterable = filterableSource.getFilterable(actionContext); - final int count = Filters.countActive(actionContext.getGame(), filterable); + final int count = Filters.countSpottable(actionContext.getGame(), filterable); return new PlayoutDecisionEffect(actionContext.getPerformingPlayer(), new IntegerAwaitingDecision(1, "Choose how many to spot", 0, count, count) { @Override diff --git a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/AttachPermanentAction.java b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/AttachPermanentAction.java index 1f7e1b6ce..cc5072667 100644 --- a/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/AttachPermanentAction.java +++ b/gemp-lotr/gemp-lotr-logic/src/main/java/com/gempukku/lotro/logic/actions/AttachPermanentAction.java @@ -87,7 +87,7 @@ public class AttachPermanentAction extends AbstractCostToEffectAction { @Override public String getText(LotroGame game) { - return "Attach " + GameUtils.getFullName(_cardToAttach); + return "Play " + GameUtils.getFullName(_cardToAttach); } @Override diff --git a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/at/NewCardsAtTest.java b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/at/NewCardsAtTest.java index e6ea06c5a..19c71b672 100644 --- a/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/at/NewCardsAtTest.java +++ b/gemp-lotr/gemp-lotr-server/src/test/java/com/gempukku/lotro/at/NewCardsAtTest.java @@ -566,4 +566,26 @@ public class NewCardsAtTest extends AbstractAtTest { assertEquals(Zone.SHADOW_CHARACTERS, orcAssassin1.getZone()); assertEquals(Zone.SHADOW_CHARACTERS, orcAssassin2.getZone()); } + + @Test + public void spotCountChange() throws DecisionResultInvalidException, CardNotFoundException { + initializeSimplestGame(); + + final PhysicalCardImpl merry = createCard(P1, "40_257"); + final PhysicalCardImpl bilbosPipe = createCard(P1, "40_244"); + final PhysicalCardImpl pipeweed = createCard(P1, "40_255"); + + _game.getGameState().addCardToZone(_game, merry, Zone.HAND); + _game.getGameState().addCardToZone(_game, pipeweed, Zone.SUPPORT); + _game.getGameState().addCardToZone(_game, bilbosPipe, Zone.HAND); + + skipMulligans(); + + playerDecided(P1, getCardActionId(P1, "Play Merry")); + playerDecided(P1, getCardActionId(P1, "Play Bilbo's Pipe")); + + playerDecided(P1, "" + merry.getCardId()); + playerDecided(P1, getCardActionId(P1, "Use Bilbo's Pipe")); + assertEquals("2", _userFeedback.getAwaitingDecision(P1).getDecisionParameters().get("max")); + } }