Fixed Quickbeam not taking Ent modifiers from the Bloom of Health hobbits into account
This commit is contained in:
@@ -429,11 +429,21 @@
|
||||
vitality: 3
|
||||
resistance: 6
|
||||
effects: [
|
||||
# These have to be split apart because the spot modifier only works
|
||||
# if a filter has only 1 thing in it
|
||||
{
|
||||
type: modifyOwnCost
|
||||
amount: {
|
||||
type: forEachYouCanSpot
|
||||
filter: or(ent,and(unbound,hobbit))
|
||||
filter: ent
|
||||
multiplier: -1
|
||||
}
|
||||
}
|
||||
{
|
||||
type: modifyOwnCost
|
||||
amount: {
|
||||
type: forEachYouCanSpot
|
||||
filter: unbound,hobbit
|
||||
multiplier: -1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,7 @@ public class Filters {
|
||||
GetCardsMatchingFilterVisitor matchingFilterVisitor = new GetCardsMatchingFilterVisitor(game, Filters.and(filters, Filters.spottable));
|
||||
game.getGameState().iterateActiveCards(matchingFilterVisitor);
|
||||
int result = matchingFilterVisitor.getCounter();
|
||||
//TODO: make this less dependent on how the definition is arranged
|
||||
if (filters.length == 1)
|
||||
result += game.getModifiersQuerying().getSpotBonus(game, filters[0]);
|
||||
return result;
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
package com.gempukku.lotro.cards.official.set06;
|
||||
|
||||
import com.gempukku.lotro.cards.GenericCardTestHelper;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class Card_06_033_Tests
|
||||
{
|
||||
@@ -18,8 +21,9 @@ public class Card_06_033_Tests
|
||||
return new GenericCardTestHelper(
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("card", "6_33");
|
||||
// put other cards in here as needed for the test case
|
||||
put("quickbeam", "6_33");
|
||||
put("merry", "17_107");
|
||||
put("pippin", "17_109");
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
GenericCardTestHelper.FOTRFrodo,
|
||||
@@ -47,7 +51,7 @@ public class Card_06_033_Tests
|
||||
|
||||
var scn = GetScenario();
|
||||
|
||||
var card = scn.GetFreepsCard("card");
|
||||
var card = scn.GetFreepsCard("quickbeam");
|
||||
|
||||
assertEquals("Quickbeam", card.getBlueprint().getTitle());
|
||||
assertEquals("Bregalad", card.getBlueprint().getSubtitle());
|
||||
@@ -62,18 +66,21 @@ public class Card_06_033_Tests
|
||||
assertEquals(6, card.getBlueprint().getResistance());
|
||||
}
|
||||
|
||||
// Uncomment any @Test markers below once this is ready to be used
|
||||
//@Test
|
||||
public void QuickbeamTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
@Test
|
||||
public void QuickbeamIsFreeIfBothBloomOfHealthHobbitsInPlay() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
|
||||
var card = scn.GetFreepsCard("card");
|
||||
scn.FreepsMoveCardToHand(card);
|
||||
var quickbeam = scn.GetFreepsCard("quickbeam");
|
||||
var merry = scn.GetFreepsCard("merry");
|
||||
var pippin = scn.GetFreepsCard("pippin");
|
||||
scn.FreepsMoveCardToHand(quickbeam);
|
||||
scn.FreepsMoveCharToTable(merry, pippin);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
|
||||
assertEquals(4, scn.GetTwilight());
|
||||
assertEquals(0, scn.GetTwilight());
|
||||
scn.FreepsPlayCard(quickbeam);
|
||||
assertEquals(0, scn.GetTwilight());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user