Add config and tests for v2 Denethor
This commit is contained in:
@@ -157,17 +157,73 @@
|
||||
race: Man
|
||||
strength: 5
|
||||
vitality: 3
|
||||
/*requires: {
|
||||
|
||||
}
|
||||
effects: [
|
||||
{
|
||||
|
||||
type: modifier
|
||||
modifier: {
|
||||
type: modifyStrength
|
||||
filter: culture(gondor),companion
|
||||
amount: {
|
||||
type: requires
|
||||
requires: {
|
||||
type: IsGreaterThanOrEqual
|
||||
firstNumber: {
|
||||
type: ForEachThreat
|
||||
}
|
||||
secondNumber: {
|
||||
type: ForEachYouCanSpot
|
||||
filter: companion
|
||||
}
|
||||
}
|
||||
true: -2
|
||||
false: 0
|
||||
}
|
||||
}
|
||||
}
|
||||
{
|
||||
|
||||
type: trigger
|
||||
optional: true
|
||||
text: Would you like to add 2 threats to choose a Gondor companion to become strength +2 and Defender +1 until the regroup phase (1 threat if target is Boromir)?
|
||||
trigger: {
|
||||
type: startOfPhase
|
||||
phase: maneuver
|
||||
}
|
||||
cost: [
|
||||
{
|
||||
type: spot
|
||||
filter: choose(culture(gondor),companion)
|
||||
memorize: chosenGondorian
|
||||
}
|
||||
{
|
||||
type: addThreats
|
||||
amount: {
|
||||
type: requires
|
||||
requires: {
|
||||
type: memoryMatches
|
||||
memory: chosenGondorian
|
||||
filter: name(Boromir)
|
||||
}
|
||||
true: 1
|
||||
false: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
effect: [
|
||||
{
|
||||
type: modifyStrength
|
||||
filter: memory(chosenGondorian)
|
||||
amount: 2
|
||||
until: start(regroup)
|
||||
}
|
||||
{
|
||||
type: addKeyword
|
||||
filter: memory(chosenGondorian)
|
||||
keyword: defender+1
|
||||
until: start(regroup)
|
||||
}
|
||||
]
|
||||
}
|
||||
]*/
|
||||
]
|
||||
gametext: While you can spot the same number of threats as companions, each [gondor] companion is strength -2.<br>At the start of the maneuver phase, you may add 2 threats to make a [gondor] companion defender +1 and strength +2 until the regroup phase (or add 1 threat if that companion is Boromir).
|
||||
lore: ""
|
||||
promotext: ""
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.CardNotFoundException;
|
||||
import com.gempukku.lotro.game.PhysicalCardImpl;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.modifiers.FPCulturesSideSpotCountModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.FPCulturesSpotCountModifier;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
@@ -19,6 +19,9 @@ public class Card_V2_018_Tests
|
||||
new HashMap<>()
|
||||
{{
|
||||
put("card", "102_18");
|
||||
put("boromir", "1_97");
|
||||
put("faramir", "4_117");
|
||||
put("twk", "1_237");
|
||||
// put other cards in here as needed for the test case
|
||||
}},
|
||||
GenericCardTestHelper.FellowshipSites,
|
||||
@@ -46,9 +49,9 @@ public class Card_V2_018_Tests
|
||||
* At the start of the maneuver phase, you may add 2 threats to make a [gondor] companion defender +1 and strength +2 until the regroup phase (or add 1 threat if that companion is Boromir).
|
||||
*/
|
||||
|
||||
var scn = GetScenario();
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var card = scn.GetFreepsCard("card");
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
|
||||
assertEquals("Denethor", card.getBlueprint().getTitle());
|
||||
assertEquals("Formidable Father", card.getBlueprint().getSubtitle());
|
||||
@@ -64,18 +67,133 @@ public class Card_V2_018_Tests
|
||||
assertEquals(SitesBlock.KING, card.getBlueprint().getAllyHomeSiteBlock());
|
||||
}
|
||||
|
||||
// Uncomment any @Test markers below once this is ready to be used
|
||||
//@Test
|
||||
public void DenethorTest1() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
@Test
|
||||
public void gondorCompanionsAreDiminishedWhenThreatsAreFull() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
var scn = GetScenario();
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
var card = scn.GetFreepsCard("card");
|
||||
scn.FreepsMoveCardToHand(card);
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl faramir = scn.GetFreepsCard("faramir");
|
||||
|
||||
scn.FreepsMoveCardToHand(card, boromir, faramir);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
|
||||
assertEquals(3, scn.GetTwilight());
|
||||
|
||||
scn.FreepsPlayCard(boromir);
|
||||
scn.FreepsPlayCard(faramir);
|
||||
|
||||
// Their starting strengths should be 7 with zero threats
|
||||
assertEquals(0, scn.GetThreats());
|
||||
assertEquals(7, scn.GetStrength(boromir));
|
||||
assertEquals(7, scn.GetStrength(faramir));
|
||||
|
||||
|
||||
// Their starting strengths should be 7 with one threat
|
||||
scn.AddThreats(1);
|
||||
assertEquals(1, scn.GetThreats());
|
||||
assertEquals(7, scn.GetStrength(boromir));
|
||||
assertEquals(7, scn.GetStrength(faramir));
|
||||
|
||||
// Their starting strengths should be 7 with two threats
|
||||
scn.AddThreats(1);
|
||||
assertEquals(2, scn.GetThreats());
|
||||
assertEquals(7, scn.GetStrength(boromir));
|
||||
assertEquals(7, scn.GetStrength(faramir));
|
||||
|
||||
// Their starting strengths should be 5 with three threats
|
||||
scn.AddThreats(1);
|
||||
assertEquals(3, scn.GetThreats());
|
||||
assertEquals(5, scn.GetStrength(boromir));
|
||||
assertEquals(5, scn.GetStrength(faramir));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void startOfManeuverTriggerCostTwoThreatsToBoostFaramir() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl faramir = scn.GetFreepsCard("faramir");
|
||||
PhysicalCardImpl twk = scn.GetShadowCard("twk");
|
||||
|
||||
scn.FreepsMoveCardToHand(card, boromir, faramir, twk);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
|
||||
assertEquals(3, scn.GetTwilight());
|
||||
|
||||
scn.FreepsPlayCard(boromir);
|
||||
scn.FreepsPlayCard(faramir);
|
||||
|
||||
// Their starting strengths should be 7 with zero threats
|
||||
assertEquals(0, scn.GetThreats());
|
||||
assertEquals(7, scn.GetStrength(faramir));
|
||||
assertFalse(scn.HasKeyword(faramir, Keyword.DEFENDER));
|
||||
|
||||
scn.SkipToPhase(Phase.SHADOW);
|
||||
scn.ShadowMoveCardToHand(twk);
|
||||
|
||||
scn.ShadowPlayCard(twk);
|
||||
|
||||
scn.SkipToPhase(Phase.MANEUVER);
|
||||
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
|
||||
scn.FreepsChooseCard(faramir);
|
||||
|
||||
assertEquals(2, scn.GetThreats());
|
||||
assertEquals(9, scn.GetStrength(faramir));
|
||||
assertTrue(scn.HasKeyword(faramir, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetKeywordCount(faramir, Keyword.DEFENDER));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void startOfManeuverTriggerCostOneThreatToBoostBoromir() throws DecisionResultInvalidException, CardNotFoundException {
|
||||
//Pre-game setup
|
||||
GenericCardTestHelper scn = GetScenario();
|
||||
|
||||
PhysicalCardImpl card = scn.GetFreepsCard("card");
|
||||
PhysicalCardImpl boromir = scn.GetFreepsCard("boromir");
|
||||
PhysicalCardImpl faramir = scn.GetFreepsCard("faramir");
|
||||
PhysicalCardImpl twk = scn.GetShadowCard("twk");
|
||||
|
||||
scn.FreepsMoveCardToHand(card, boromir, faramir, twk);
|
||||
|
||||
scn.StartGame();
|
||||
scn.FreepsPlayCard(card);
|
||||
|
||||
assertEquals(3, scn.GetTwilight());
|
||||
|
||||
scn.FreepsPlayCard(boromir);
|
||||
scn.FreepsPlayCard(faramir);
|
||||
|
||||
// Their starting strengths should be 7 with zero threats
|
||||
assertEquals(0, scn.GetThreats());
|
||||
assertEquals(7, scn.GetStrength(boromir));
|
||||
assertFalse(scn.HasKeyword(boromir, Keyword.DEFENDER));
|
||||
|
||||
scn.SkipToPhase(Phase.SHADOW);
|
||||
scn.ShadowMoveCardToHand(twk);
|
||||
|
||||
scn.ShadowPlayCard(twk);
|
||||
|
||||
scn.SkipToPhase(Phase.MANEUVER);
|
||||
|
||||
assertTrue(scn.FreepsHasOptionalTriggerAvailable());
|
||||
scn.FreepsAcceptOptionalTrigger();
|
||||
|
||||
scn.FreepsChooseCard(boromir);
|
||||
|
||||
assertEquals(1, scn.GetThreats());
|
||||
assertEquals(9, scn.GetStrength(boromir));
|
||||
assertTrue(scn.HasKeyword(boromir, Keyword.DEFENDER));
|
||||
assertEquals(1, scn.GetKeywordCount(boromir, Keyword.DEFENDER));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user