Fixing Resistance Becomes Unbearable not working when the Ring-bearer was already exhausted at time of play.

This commit is contained in:
Christian 'ketura' McCarty
2025-03-20 14:22:25 -05:00
parent cdd0a472d7
commit 97d202d6c6
2 changed files with 25 additions and 16 deletions

View File

@@ -204,13 +204,12 @@
{ {
type: exert type: exert
select: choose(ringBearer) select: choose(ringBearer)
memorize: ringBearer
} }
{ {
type: If type: If
check: { check: {
type: canSpot type: canSpot
filter: memory(ringBearer),exhausted filter: ringBearer,exhausted
} }
true: { true: {
type: putOnRing type: putOnRing

View File

@@ -1,10 +1,7 @@
package com.gempukku.lotro.cards.official.set02; package com.gempukku.lotro.cards.official.set02;
import com.gempukku.lotro.cards.GenericCardTestHelper; import com.gempukku.lotro.cards.GenericCardTestHelper;
import com.gempukku.lotro.common.CardType; import com.gempukku.lotro.common.*;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Side;
import com.gempukku.lotro.common.Timeword;
import com.gempukku.lotro.game.CardNotFoundException; import com.gempukku.lotro.game.CardNotFoundException;
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException; import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
import org.junit.Test; import org.junit.Test;
@@ -20,8 +17,8 @@ public class Card_02_079_Tests
return new GenericCardTestHelper( return new GenericCardTestHelper(
new HashMap<>() new HashMap<>()
{{ {{
put("card", "2_79"); put("resistance", "2_79");
// put other cards in here as needed for the test case put("twigul", "2_82");
}}, }},
GenericCardTestHelper.FellowshipSites, GenericCardTestHelper.FellowshipSites,
GenericCardTestHelper.FOTRFrodo, GenericCardTestHelper.FOTRFrodo,
@@ -46,7 +43,7 @@ public class Card_02_079_Tests
var scn = GetScenario(); var scn = GetScenario();
var card = scn.GetFreepsCard("card"); var card = scn.GetFreepsCard("resistance");
assertEquals("Resistance Becomes Unbearable", card.getBlueprint().getTitle()); assertEquals("Resistance Becomes Unbearable", card.getBlueprint().getTitle());
assertNull(card.getBlueprint().getSubtitle()); assertNull(card.getBlueprint().getSubtitle());
@@ -58,18 +55,31 @@ public class Card_02_079_Tests
assertEquals(1, card.getBlueprint().getTwilightCost()); assertEquals(1, card.getBlueprint().getTwilightCost());
} }
// Uncomment any @Test markers below once this is ready to be used @Test
//@Test public void ResistanceBecomesbrUnbearablePutsOnRingWhenRBWasAlreadyExhausted() throws DecisionResultInvalidException, CardNotFoundException {
public void ResistanceBecomesbrUnbearableTest1() throws DecisionResultInvalidException, CardNotFoundException {
//Pre-game setup //Pre-game setup
var scn = GetScenario(); var scn = GetScenario();
var card = scn.GetFreepsCard("card"); var resistance = scn.GetShadowCard("resistance");
scn.FreepsMoveCardToHand(card); var twigul = scn.GetShadowCard("twigul");
scn.ShadowMoveCardToHand(resistance);
scn.ShadowMoveCharToTable(twigul);
var frodo = scn.GetRingBearer();
scn.StartGame(); scn.StartGame();
scn.FreepsPlayCard(card); scn.AddWoundsToChar(frodo, 3);
scn.SkipToPhase(Phase.MANEUVER);
scn.FreepsPassCurrentPhaseAction();
assertEquals(1, scn.GetTwilight()); assertEquals(3, scn.GetWoundsOn(frodo));
assertEquals(0, scn.GetWoundsOn(twigul));
assertFalse(scn.RBWearingOneRing());
assertTrue(scn.ShadowPlayAvailable(resistance));
scn.ShadowPlayCard(resistance);
assertEquals(3, scn.GetWoundsOn(frodo));
assertEquals(1, scn.GetWoundsOn(twigul));
assertTrue(scn.RBWearingOneRing());
} }
} }