Couple of Shire cards
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
"40_243": {
|
||||
"title": "*Bilbo",
|
||||
"subtitle": "Well-preserved Hobbit",
|
||||
|
||||
"culture": "shire",
|
||||
"cost": 2,
|
||||
"type": "ally",
|
||||
@@ -30,6 +29,54 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_244": {
|
||||
"title": "*Bilbo's Pipe",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "pipe",
|
||||
"target": "hobbit",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "fellowship",
|
||||
"cost": [
|
||||
{
|
||||
"type": "discard",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
},
|
||||
{
|
||||
"type": "chooseHowManyToSpot",
|
||||
"filter": "pipe",
|
||||
"memorize": "numberOfPipes"
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "shuffleCardsFromDiscardIntoDrawDeck",
|
||||
"count": {
|
||||
"type": "fromMemory",
|
||||
"memory": "numberOfPipes"
|
||||
},
|
||||
"filter": "choose(tale)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_245": {
|
||||
"title": "Crossing the Threshold",
|
||||
"culture": "shire",
|
||||
"cost": 0,
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"cost": {
|
||||
"type": "putOnRing"
|
||||
},
|
||||
"effect": {
|
||||
"type": "wound",
|
||||
"filter": "all(minion,inSkirmishAgainst(ring bearer))"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_246": {
|
||||
"title": "*Dimple Boffin",
|
||||
"subtitle": "Bounder of the Shire",
|
||||
@@ -84,6 +131,142 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_248": {
|
||||
"title": "*Frodo",
|
||||
"subtitle": "Bane of the Sackville-Bagginses",
|
||||
"culture": "shire",
|
||||
"cost": 0,
|
||||
"type": "companion",
|
||||
"race": "hobbit",
|
||||
"strength": 3,
|
||||
"vitality": 4,
|
||||
"resistance": 10,
|
||||
"keyword": "can start with ring",
|
||||
"effects": {
|
||||
"type": "trigger",
|
||||
"optional": true,
|
||||
"trigger": {
|
||||
"type": "played",
|
||||
"filter": "culture(shire),tale"
|
||||
},
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"filter": "all(name(Frodo))"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_249": {
|
||||
"title": "*Frodo",
|
||||
"subtitle": "Extraordinarily Resilient",
|
||||
"culture": "shire",
|
||||
"cost": 0,
|
||||
"type": "companion",
|
||||
"race": "hobbit",
|
||||
"strength": 3,
|
||||
"vitality": 4,
|
||||
"resistance": 10,
|
||||
"keyword": "can start with ring",
|
||||
"effects": {
|
||||
"type": "trigger",
|
||||
"optional": true,
|
||||
"trigger": {
|
||||
"type": "startOfTurn"
|
||||
},
|
||||
"effect": {
|
||||
"type": "choice",
|
||||
"texts": [
|
||||
"Exert Frodo to heal a companion of another culture",
|
||||
"Exert a companion of another culture to heal Frodo"
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"type": "costToEffect",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "self"
|
||||
},
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"filter": "choose(companion,not(culture(shire)))"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "costToEffect",
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(companion,not(culture(shire)))"
|
||||
},
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"filter": "self"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_250": {
|
||||
"title": "*Frodo's Pipe",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "pipe",
|
||||
"target": "name(Frodo)",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "fellowship",
|
||||
"cost": [
|
||||
{
|
||||
"type": "discard",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
},
|
||||
{
|
||||
"type": "chooseHowManyToSpot",
|
||||
"filter": "pipe",
|
||||
"memorize": "numberOfPipes"
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"times": {
|
||||
"type": "fromMemory",
|
||||
"memory": "numberOfPipes"
|
||||
},
|
||||
"filter": "choose(companion,hasAttached(pipe))"
|
||||
},
|
||||
"limitPerPhase": 1
|
||||
}
|
||||
},
|
||||
"40_251": {
|
||||
"title": "*The Gaffer's Pipe",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "pipe",
|
||||
"target": "hobbit",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "fellowship",
|
||||
"cost": [
|
||||
{
|
||||
"type": "discard",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
},
|
||||
{
|
||||
"type": "chooseHowManyToSpot",
|
||||
"filter": "pipe",
|
||||
"memorize": "numberOfPipes"
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "removeTwilight",
|
||||
"amount": {
|
||||
"type": "fromMemory",
|
||||
"memory": "numberOfPipes"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_252": {
|
||||
"title": "*Hamfast Gamgee",
|
||||
"subtitle": "The Gaffer",
|
||||
@@ -143,6 +326,42 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"40_254": {
|
||||
"title": "Hobbit Sword",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "hand weapon",
|
||||
"strength": 2,
|
||||
"target": "hobbit"
|
||||
},
|
||||
"40_255": {
|
||||
"title": "Longbottom Leaf",
|
||||
"subtitle": "Hornblower's Crop",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"keyword": [
|
||||
"support area",
|
||||
"pipeweed"
|
||||
],
|
||||
"effects": {
|
||||
"type": "trigger",
|
||||
"optional": true,
|
||||
"trigger": {
|
||||
"type": "played",
|
||||
"filter": "self"
|
||||
},
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(hobbit,companion)"
|
||||
},
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"filter": "choose(shire,ally)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_256": {
|
||||
"title": "*Merry",
|
||||
"subtitle": "Bucklander",
|
||||
@@ -166,6 +385,241 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_257": {
|
||||
"title": "*Merry",
|
||||
"subtitle": "Pipeweed Aficionado",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "companion",
|
||||
"race": "hobbit",
|
||||
"strength": 3,
|
||||
"vitality": 4,
|
||||
"resistance": 8,
|
||||
"effects": [
|
||||
{
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "classSpot",
|
||||
"class": "pipe"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "trigger",
|
||||
"optional": true,
|
||||
"trigger": {
|
||||
"type": "startOfTurn"
|
||||
},
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(name(Merry))",
|
||||
"times": 2
|
||||
},
|
||||
"effect": {
|
||||
"type": "playCardFromDrawDeck",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"40_258": {
|
||||
"title": "*Merry's Pipe",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "pipe",
|
||||
"target": "name(Merry)",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "fellowship",
|
||||
"cost": {
|
||||
"type": "discard",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
},
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"filter": "all(companion,hasAttached(pipe))"
|
||||
},
|
||||
"limitPerPhase": 1
|
||||
}
|
||||
},
|
||||
"40_259": {
|
||||
"title": "Nimble and Deft",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "event",
|
||||
"keyword": [
|
||||
"skirmish",
|
||||
"stealth"
|
||||
],
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
"type": "choice",
|
||||
"texts": [
|
||||
"Cancel a skirmish involving a Hobbit",
|
||||
"Make a Hobbit strength +2"
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"type": "conditional",
|
||||
"condition": [
|
||||
{
|
||||
"type": "location",
|
||||
"filter": "siteNumber(1-5)"
|
||||
},
|
||||
{
|
||||
"type": "canSpot",
|
||||
"filter": "hobbit,companion",
|
||||
"count": 2
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "cancelSkirmish",
|
||||
"filter": "hobbit"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(hobbit)",
|
||||
"amount": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_260": {
|
||||
"title": "*Old Toby",
|
||||
"subtitle": "Finest Weed in the Southfarthing",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"keyword": [
|
||||
"support area",
|
||||
"pipeweed"
|
||||
],
|
||||
"effects": {
|
||||
"type": "trigger",
|
||||
"optional": true,
|
||||
"trigger": {
|
||||
"type": "played",
|
||||
"filter": "self"
|
||||
},
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "name(Bilbo)"
|
||||
},
|
||||
"effect": {
|
||||
"type": "drawCards"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_261": {
|
||||
"title": "*Pippin",
|
||||
"subtitle": "Frodo's Cousin",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "companion",
|
||||
"race": "hobbit",
|
||||
"strength": 3,
|
||||
"vitality": 4,
|
||||
"resistance": 8,
|
||||
"effects": [
|
||||
{
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "companion,hasAttached(pipe)",
|
||||
"amount": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "self,hasAttached(pipe)",
|
||||
"amount": 1
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"40_262": {
|
||||
"title": "*Pippin",
|
||||
"subtitle": "Halfling Trickster",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "companion",
|
||||
"race": "hobbit",
|
||||
"strength": 3,
|
||||
"vitality": 4,
|
||||
"resistance": 8,
|
||||
"effects": {
|
||||
"type": "trigger",
|
||||
"optional": true,
|
||||
"trigger": {
|
||||
"type": "played",
|
||||
"filter": "self"
|
||||
},
|
||||
"effect": {
|
||||
"type": "playNextSite"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_263": {
|
||||
"title": "*Pippin's Pipe",
|
||||
"culture": "shire",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "pipe",
|
||||
"target": "name(Pippin)",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "regroup",
|
||||
"cost": [
|
||||
{
|
||||
"type": "discard",
|
||||
"filter": "choose(pipeweed,possession)"
|
||||
},
|
||||
{
|
||||
"type": "chooseHowManyToSpot",
|
||||
"filter": "pipe",
|
||||
"memorize": "numberOfPipes"
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "removeThreats",
|
||||
"amount": {
|
||||
"type": "fromMemory",
|
||||
"memory": "numberOfPipes"
|
||||
}
|
||||
},
|
||||
"limitPerPhase": 1
|
||||
}
|
||||
},
|
||||
"40_264": {
|
||||
"title": "A Promise",
|
||||
"culture": "shire",
|
||||
"cost": 0,
|
||||
"type": "condition",
|
||||
"keyword": "support area",
|
||||
"effects": {
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "or(name(Frodo),name(Sam))",
|
||||
"amount": 1,
|
||||
"condition": [
|
||||
{
|
||||
"type": "canSpot",
|
||||
"filter": "not(exhausted),name(Frodo)"
|
||||
},
|
||||
{
|
||||
"type": "canSpot",
|
||||
"filter": "not(exhausted),name(Sam)"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_265": {
|
||||
"title": "*Robin Smallburrow",
|
||||
"subtitle": "Shiriff of Hobbiton",
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.effects.ShuffleCardsFromDiscardIntoDeckEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseCardsFromDiscardEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Bilbo's Pipe
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Pipe
|
||||
* Card Number: 1U244
|
||||
* Game Text: Bearer must be a Hobbit.
|
||||
* Fellowship: Discard a pipeweed possession and spot X pipes to shuffle X tales from your discard pile into your draw deck.
|
||||
*/
|
||||
public class Card40_244 extends AbstractAttachableFPPossession {
|
||||
public Card40_244() {
|
||||
super(1, 0, 0, Culture.SHIRE, PossessionClass.PIPE, "Bilbo's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Race.HOBBIT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Keyword.PIPEWEED));
|
||||
final int pipeCount = Filters.countSpottable(game, PossessionClass.PIPE);
|
||||
action.appendEffect(
|
||||
new ChooseCardsFromDiscardEffect(playerId, 0, pipeCount, Keyword.TALE) {
|
||||
@Override
|
||||
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> cards) {
|
||||
action.appendEffect(
|
||||
new ShuffleCardsFromDiscardIntoDeckEffect(self, playerId, cards));
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.PutOnTheOneRingEffect;
|
||||
import com.gempukku.lotro.logic.effects.WoundCharactersEffect;
|
||||
|
||||
/**
|
||||
* Title: Crossing the Threshold
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1R245
|
||||
* Game Text: Put on The One Ring to wound each minion skirmishing the Ring-bearer.
|
||||
*/
|
||||
public class Card40_245 extends AbstractEvent {
|
||||
public Card40_245() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.SHIRE, "Crossing the Threshold", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
|
||||
return !game.getGameState().isWearingRing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendCost(
|
||||
new PutOnTheOneRingEffect());
|
||||
action.appendEffect(
|
||||
new WoundCharactersEffect(self, CardType.MINION, Filters.inSkirmishAgainst(Filters.ringBearer)));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Frodo, Bane of the Sackville-Bagginses
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 0
|
||||
* Type: Companion - Hobbit
|
||||
* Strength: 3
|
||||
* Vitality: 4
|
||||
* Resistance: 10R
|
||||
* Card Number: 1C248
|
||||
* Game Text: Ring-bound. Each time you play a [SHIRE] tale, you may heal Frodo.
|
||||
*/
|
||||
public class Card40_248 extends AbstractCompanion {
|
||||
public Card40_248() {
|
||||
super(0, 3, 4, 10, Culture.SHIRE, Race.HOBBIT, null, "Frodo",
|
||||
"Bane of the Sackville-Bagginses", true);
|
||||
addKeyword(Keyword.CAN_START_WITH_RING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, Culture.SHIRE, Keyword.TALE)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new HealCharactersEffect(self, self));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.SelfExertEffect;
|
||||
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.PlayConditions;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Frodo, Extraordinarily Resilient
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 0
|
||||
* Type: Companion - Hobbit
|
||||
* Strength: 3
|
||||
* Vitality: 4
|
||||
* Resistance: 10R
|
||||
* Card Number: 1R249
|
||||
* Game Text: Ring-bound. At the start of each of your turn, you may exert Frodo to heal a companion of another culture
|
||||
* or exert a companion of another culture to heal Frodo.
|
||||
*/
|
||||
public class Card40_249 extends AbstractCompanion {
|
||||
public Card40_249() {
|
||||
super(0, 3, 4, 10, Culture.SHIRE, Race.HOBBIT, null, "Frodo",
|
||||
"Extraordinarily Resilient", true);
|
||||
addKeyword(Keyword.CAN_START_WITH_RING);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (TriggerConditions.startOfTurn(game, effectResult)
|
||||
&& (PlayConditions.canSelfExert(self, game) || PlayConditions.canExert(self, game, CardType.COMPANION, Filters.not(Culture.SHIRE)))) {
|
||||
final OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
List<Effect> possibleCosts = new ArrayList<Effect>(2);
|
||||
possibleCosts.add(
|
||||
new SelfExertEffect(action, self) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Exert Frodo to heal a companion of another culture";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void forEachExertedByEffect(PhysicalCard physicalCard) {
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, CardType.COMPANION, Filters.not(Culture.SHIRE)));
|
||||
}
|
||||
});
|
||||
possibleCosts.add(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.COMPANION, Filters.not(Culture.SHIRE)) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Exert a companion of another culture to heal Frodo";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void forEachCardExertedCallback(PhysicalCard character) {
|
||||
action.appendEffect(
|
||||
new HealCharactersEffect(self, self));
|
||||
}
|
||||
});
|
||||
action.appendCost(
|
||||
new ChoiceEffect(action, playerId, possibleCosts));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.decisions.ForEachYouSpotDecision;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.IncrementPhaseLimitEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Frodo's Pipe
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Pipe
|
||||
* Card Number: 1U250
|
||||
* Game Text: Bearer must be Frodo.
|
||||
* Fellowship: Discard a pipeweed possession and spot X pipes to heal a companion bearing a pipe X times (limit once per phase).
|
||||
*/
|
||||
public class Card40_250 extends AbstractAttachableFPPossession {
|
||||
public Card40_250() {
|
||||
super(1, 0, 0, Culture.SHIRE, PossessionClass.PIPE, "Frodo's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.frodo;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game, Keyword.PIPEWEED, CardType.POSSESSION)
|
||||
&& PlayConditions.checkPhaseLimit(game, self, 1)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new IncrementPhaseLimitEffect(self, 1));
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, Integer.MAX_VALUE, PossessionClass.PIPE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
final int spotCount = getValidatedResult(result);
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, 1, 1, spotCount, CardType.COMPANION, Filters.hasAttached(PossessionClass.PIPE)));
|
||||
}
|
||||
}));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.decisions.ForEachYouSpotDecision;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
import com.gempukku.lotro.logic.effects.RemoveTwilightEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *The Gaffer's Pipe
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Pipe
|
||||
* Card Number: 1U251
|
||||
* Game Text: Bearer must be a Hobbit. Fellowship: Discard a pipeweed possession and spot X pipes to remove (X).
|
||||
*/
|
||||
public class Card40_251 extends AbstractAttachableFPPossession {
|
||||
public Card40_251() {
|
||||
super(1, 0, 0, Culture.SHIRE, PossessionClass.PIPE, "The Gaffer's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Race.HOBBIT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& Filters.canSpot(game, Keyword.PIPEWEED, CardType.POSSESSION)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.PIPEWEED, CardType.POSSESSION));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, Integer.MAX_VALUE, PossessionClass.PIPE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
int spotCount = getValidatedResult(result);
|
||||
action.appendEffect(new RemoveTwilightEffect(spotCount));
|
||||
}
|
||||
}));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Filterable;
|
||||
import com.gempukku.lotro.common.PossessionClass;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
|
||||
/**
|
||||
* Title: Hobbit Sword
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Hand Weapon
|
||||
* Strength: +2
|
||||
* Card Number: 1C254
|
||||
* Game Text: Bearer must be a Hobbit.
|
||||
*/
|
||||
public class Card40_254 extends AbstractAttachableFPPossession {
|
||||
public Card40_254() {
|
||||
super(1, 2, 0, Culture.SHIRE, PossessionClass.HAND_WEAPON, "Hobbit Sword");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Race.HOBBIT;
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Longbottom Leaf, Hornblower's Crop
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Support Area
|
||||
* Card Number: 1C255
|
||||
* Game Text: Pipeweed. When you play this possession, you may exert a Hobbit companion to heal a Shire ally.
|
||||
*/
|
||||
public class Card40_255 extends AbstractPermanent {
|
||||
public Card40_255() {
|
||||
super(Side.FREE_PEOPLE, 1, CardType.POSSESSION, Culture.SHIRE, "Longbottom Leaf", "Hornblower's Crop", false);
|
||||
addKeyword(Keyword.PIPEWEED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, self)
|
||||
&& PlayConditions.canExert(self, game, Race.HOBBIT, CardType.COMPANION)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Race.HOBBIT, CardType.COMPANION));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, CardType.ALLY, Keyword.SHIRE));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDeckEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.PossessionClassSpotModifier;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Merry, Pipeweed Aficionado
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Companion - Hobbit
|
||||
* Strength: 3
|
||||
* Vitality: 4
|
||||
* Resistance: 8
|
||||
* Card Number: 1R257
|
||||
* Game Text: Add 1 to the number of pipes you can spot. At the start of each of your turns, you may exert Merry twice
|
||||
* to play a pipeweed possession from your draw deck.
|
||||
*/
|
||||
public class Card40_257 extends AbstractCompanion {
|
||||
public Card40_257() {
|
||||
super(1, 3, 4, 8, Culture.SHIRE, Race.HOBBIT, null, "Merry",
|
||||
"Pipeweed Aficionado", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
PossessionClassSpotModifier modifier = new PossessionClassSpotModifier(self, PossessionClass.PIPE);
|
||||
return Collections.singletonList(modifier);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.startOfTurn(game, effectResult)
|
||||
&& PlayConditions.canSelfExert(self, 2, game)
|
||||
&& PlayConditions.canPlayFromDeck(playerId, game, CardType.POSSESSION, Keyword.PIPEWEED)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, self));
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, CardType.POSSESSION, Keyword.PIPEWEED));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.effects.HealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.IncrementPhaseLimitEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Merry's Pipe
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Pipe
|
||||
* Card Number: 1U258
|
||||
* Game Text: Bearer must be Merry. Fellowship: Discard a pipeweed possession to heal every companion bearing a pipe
|
||||
* (limit once per phase).
|
||||
*/
|
||||
public class Card40_258 extends AbstractAttachableFPPossession {
|
||||
public Card40_258() {
|
||||
super(1, 0, 0, Culture.SHIRE, PossessionClass.PIPE, "Merry's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.name("Merry");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED)
|
||||
&& PlayConditions.checkPhaseLimit(game, self, 1)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new IncrementPhaseLimitEffect(self, 1));
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Keyword.PIPEWEED));
|
||||
action.appendEffect(
|
||||
new HealCharactersEffect(self, CardType.COMPANION, Filters.hasAttached(PossessionClass.PIPE)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.CancelSkirmishEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Nimble and Deft
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1C259
|
||||
* Game Text: Stealth. At sites 1-5, spot 2 Hobbit companions to cancel a skirmish involving a Hobbit or make a Hobbit strength +2 at any site.
|
||||
*/
|
||||
public class Card40_259 extends AbstractEvent {
|
||||
public Card40_259() {
|
||||
super(Side.FREE_PEOPLE, 1, Culture.SHIRE, "Nimble and Deft", Phase.SKIRMISH);
|
||||
addKeyword(Keyword.STEALTH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
List<Effect> possibleEffects = new ArrayList<Effect>(2);
|
||||
if (PlayConditions.canSpot(game, 2, Race.HOBBIT, CardType.COMPANION)
|
||||
&& game.getGameState().getCurrentSiteNumber() <= 5)
|
||||
possibleEffects.add(
|
||||
new CancelSkirmishEffect(Race.HOBBIT));
|
||||
possibleEffects.add(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 2, Race.HOBBIT) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Make a Hobbit strength +2";
|
||||
}
|
||||
});
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, playerId, possibleEffects));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
|
||||
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Old Toby, Finest Weed in the Southfarthing
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Support Area
|
||||
* Card Number: 1C260
|
||||
* Game Text: Pipeweed. When you play this possession, you may spot Bilbo to draw a card.
|
||||
*/
|
||||
public class Card40_260 extends AbstractPermanent {
|
||||
public Card40_260() {
|
||||
super(Side.FREE_PEOPLE, 1, CardType.POSSESSION, Culture.SHIRE, "Old Toby",
|
||||
"Finest Weed in the Southfarthing", false);
|
||||
addKeyword(Keyword.PIPEWEED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, self)
|
||||
&& PlayConditions.canSpot(game, Filters.name("Bilbo"))) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new DrawCardsEffect(action, playerId, 1));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.PossessionClass;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Pippin, Frodo's Cousin
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Companion - Hobbit
|
||||
* Strength: 3
|
||||
* Vitality: 4
|
||||
* Resistance: 8
|
||||
* Card Number: 1C261
|
||||
* Game Text: Each companion bearing a pipe is strength +1. While Pippin bears a pipe, he is strength +1.
|
||||
*/
|
||||
public class Card40_261 extends AbstractCompanion {
|
||||
public Card40_261() {
|
||||
super(1, 3, 4, 8, Culture.SHIRE, Race.HOBBIT, null, "Pippin",
|
||||
"Frodo's Cousin", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
StrengthModifier modifier1 = new StrengthModifier(self, Filters.and(CardType.COMPANION, Filters.hasAttached(PossessionClass.PIPE)), 1);
|
||||
StrengthModifier modifier2= new StrengthModifier(self, Filters.and(self, Filters.hasAttached(PossessionClass.PIPE)), 1);
|
||||
return Arrays.asList(modifier1, modifier2);
|
||||
}
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractCompanion;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.logic.effects.PlayNextSiteEffect;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Race;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Pippin, Halfling Trickster
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Companion - Hobbit
|
||||
* Strength: 3
|
||||
* Vitality: 4
|
||||
* Resistance: 8
|
||||
* Card Number: 1R262
|
||||
* Game Text: When you play Pippin, you may play the Fellowship's next site (replacing opponent's site if necessary).
|
||||
*/
|
||||
public class Card40_262 extends AbstractCompanion {
|
||||
public Card40_262() {
|
||||
super(1, 3, 4, 8, Culture.SHIRE, Race.HOBBIT, null, "Pippin",
|
||||
"Halfling Trickster", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.played(game, effectResult, self)) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new PlayNextSiteEffect(action, playerId));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.ActivateCardAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
|
||||
import com.gempukku.lotro.logic.decisions.ForEachYouSpotDecision;
|
||||
import com.gempukku.lotro.logic.effects.IncrementPhaseLimitEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
|
||||
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Pippin's Pipe
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Pipe
|
||||
* Card Number: 1U263
|
||||
* Game Text: Bearer must be Pippin. Regroup: Discard a pipeweed possession and spot X pipes to remove X threats (limit once per phase).
|
||||
*/
|
||||
public class Card40_263 extends AbstractAttachableFPPossession {
|
||||
public Card40_263() {
|
||||
super(1, 0, 0, Culture.SHIRE, PossessionClass.PIPE, "Pippin's Pipe", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.name("Pippin");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, LotroGame game, final PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
|
||||
&& PlayConditions.canDiscardFromPlay(self, game, CardType.POSSESSION, Keyword.PIPEWEED)
|
||||
&& PlayConditions.checkPhaseLimit(game,self, 1)) {
|
||||
final ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new IncrementPhaseLimitEffect(self, 1));
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Keyword.PIPEWEED));
|
||||
action.appendEffect(
|
||||
new PlayoutDecisionEffect(playerId,
|
||||
new ForEachYouSpotDecision(1, "Choose number of pipes you wish to spot", game, Integer.MAX_VALUE, PossessionClass.PIPE) {
|
||||
@Override
|
||||
public void decisionMade(String result) throws DecisionResultInvalidException {
|
||||
final int spotCount = getValidatedResult(result);
|
||||
action.appendEffect(
|
||||
new RemoveThreatsEffect(self, spotCount));
|
||||
}
|
||||
}));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.shire;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
|
||||
import com.gempukku.lotro.logic.modifiers.Condition;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: A Promise
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Shire
|
||||
* Twilight Cost: 0
|
||||
* Type: Condition - Support Area
|
||||
* Card Number: 1R264
|
||||
* Game Text: While you can spot Frodo and Sam and neither is exhausted, each is strength +1.
|
||||
*/
|
||||
public class Card40_264 extends AbstractPermanent {
|
||||
public Card40_264() {
|
||||
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.SHIRE, "A Promise");
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(
|
||||
new StrengthModifier(self, Filters.or(Filters.frodo, Filters.sam),
|
||||
new Condition() {
|
||||
@Override
|
||||
public boolean isFullfilled(LotroGame game) {
|
||||
return Filters.canSpot(game, Filters.frodo, Filters.not(Filters.exhausted))
|
||||
&& Filters.canSpot(game, Filters.sam, Filters.not(Filters.exhausted));
|
||||
}
|
||||
}, 1));
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,9 @@ public class ChooseHowManyToSpot implements EffectAppenderProducer {
|
||||
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter");
|
||||
final String memorize = FieldUtils.getString(effectObject.get("memorize"), "memorize");
|
||||
|
||||
if (memorize == null)
|
||||
throw new InvalidCardDefinitionException("ChooseHowManyToSpot requires a field to memorize the value");
|
||||
|
||||
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
|
||||
|
||||
return new DelayedAppender() {
|
||||
|
||||
@@ -9,6 +9,7 @@ import com.gempukku.lotro.cards.build.field.effect.EffectAppender;
|
||||
import com.gempukku.lotro.cards.build.field.effect.EffectAppenderProducer;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.CardResolver;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.ValueResolver;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
@@ -17,12 +18,15 @@ import com.gempukku.lotro.logic.timing.Effect;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
public class Heal implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "count", "filter", "memorize");
|
||||
FieldUtils.validateAllowedFields(effectObject, "count", "filter", "times", "memorize");
|
||||
|
||||
final ValueSource times = ValueResolver.resolveEvaluator(effectObject.get("times"), 1, environment);
|
||||
final ValueSource count = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment);
|
||||
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter");
|
||||
final String memory = FieldUtils.getString(effectObject.get("memorize"), "memorize", "_temp");
|
||||
@@ -32,13 +36,22 @@ public class Heal implements EffectAppenderProducer {
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCards(filter,
|
||||
(actionContext) -> Filters.canHeal,
|
||||
(actionContext) -> (Filter) (game, physicalCard) -> {
|
||||
final int healTimes = times.getEvaluator(actionContext).evaluateExpression(game, physicalCard);
|
||||
return game.getGameState().getWounds(physicalCard) >= healTimes && game.getModifiersQuerying().canBeHealed(game, physicalCard);
|
||||
},
|
||||
count, memory, "you", "Choose cards to heal", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
protected List<? extends Effect> createEffects(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final int healTimes = times.getEvaluator(actionContext).evaluateExpression(actionContext.getGame(), null);
|
||||
final Collection<? extends PhysicalCard> cardsFromMemory = actionContext.getCardsFromMemory(memory);
|
||||
return new HealCharactersEffect(actionContext.getSource(), cardsFromMemory.toArray(new PhysicalCard[0]));
|
||||
List<Effect> result = new LinkedList<>();
|
||||
for (int i = 0; i < healTimes; i++) {
|
||||
result.add(new HealCharactersEffect(actionContext.getSource(), cardsFromMemory.toArray(new PhysicalCard[0])));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@ public class PlayCardFromDrawDeck implements EffectAppenderProducer {
|
||||
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCardsInDeck(filter,
|
||||
(actionContext) -> Filters.playable(actionContext.getGame()),
|
||||
(actionContext) -> Filters.playable(actionContext.getGame()),
|
||||
new ConstantEvaluator(1), "_temp", "you", "Choose card to play", environment));
|
||||
result.addEffectAppender(
|
||||
|
||||
@@ -31,7 +31,7 @@ public class PutCardsFromDeckIntoHand implements EffectAppenderProducer {
|
||||
MultiEffectAppender result = new MultiEffectAppender();
|
||||
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCardsInDeck(filter, null, null, valueSource, "_temp", "you", "Choose cards from deck", environment));
|
||||
CardResolver.resolveCardsInDeck(filter, null, valueSource, "_temp", "you", "Choose cards from deck", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@Override
|
||||
|
||||
@@ -269,7 +269,7 @@ public class CardResolver {
|
||||
throw new RuntimeException("Unable to resolve card resolver of type: " + type);
|
||||
}
|
||||
|
||||
public static EffectAppender resolveCardsInDeck(String type, FilterableSource choiceFilter, FilterableSource playabilityFilter, ValueSource countSource, String memory, String choicePlayer, String choiceText, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
public static EffectAppender resolveCardsInDeck(String type, FilterableSource choiceFilter, ValueSource countSource, String memory, String choicePlayer, String choiceText, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
if (type.startsWith("choose(") && type.endsWith(")")) {
|
||||
final String filter = type.substring(type.indexOf("(") + 1, type.lastIndexOf(")"));
|
||||
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
|
||||
@@ -314,12 +314,16 @@ public class CardResolver {
|
||||
}
|
||||
|
||||
public static EffectAppender resolveCards(String type, FilterableSource additionalFilter, ValueSource countSource, String memory, String choicePlayer, String choiceText, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
return resolveCards(type, additionalFilter, additionalFilter, countSource, memory, choicePlayer, choiceText, environment);
|
||||
}
|
||||
|
||||
public static EffectAppender resolveCards(String type, FilterableSource additionalFilter, FilterableSource playabilityFilter, ValueSource countSource, String memory, String choicePlayer, String choiceText, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
if (type.equals("self")) {
|
||||
return new DelayedAppender() {
|
||||
@Override
|
||||
public boolean isPlayableInFull(ActionContext actionContext) {
|
||||
if (additionalFilter != null)
|
||||
return PlayConditions.isActive(actionContext.getGame(), actionContext.getSource(), additionalFilter.getFilterable(actionContext));
|
||||
if (playabilityFilter != null)
|
||||
return PlayConditions.isActive(actionContext.getGame(), actionContext.getSource(), playabilityFilter.getFilterable(actionContext));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -338,10 +342,10 @@ public class CardResolver {
|
||||
return new DelayedAppender() {
|
||||
@Override
|
||||
public boolean isPlayableInFull(ActionContext actionContext) {
|
||||
if (additionalFilter != null) {
|
||||
if (playabilityFilter != null) {
|
||||
final Collection<? extends PhysicalCard> cardsFromMemory = actionContext.getCardsFromMemory(sourceMemory);
|
||||
for (PhysicalCard physicalCard : cardsFromMemory) {
|
||||
if (!PlayConditions.isActive(actionContext.getGame(), physicalCard, additionalFilter.getFilterable(actionContext)))
|
||||
if (!PlayConditions.isActive(actionContext.getGame(), physicalCard, playabilityFilter.getFilterable(actionContext)))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -389,8 +393,8 @@ public class CardResolver {
|
||||
int min = countSource.getMinimum(actionContext);
|
||||
final Filterable filterable = filterableSource.getFilterable(actionContext);
|
||||
Filterable additionalFilterable = Filters.any;
|
||||
if (additionalFilter != null)
|
||||
additionalFilterable = additionalFilter.getFilterable(actionContext);
|
||||
if (playabilityFilter != null)
|
||||
additionalFilterable = playabilityFilter.getFilterable(actionContext);
|
||||
return PlayConditions.isActive(actionContext.getGame(), min, filterable, additionalFilterable);
|
||||
}
|
||||
|
||||
|
||||
@@ -217,7 +217,7 @@ public class ValueResolver {
|
||||
final int second = secondNumber.getEvaluator(actionContext).evaluateExpression(actionContext.getGame(), null);
|
||||
return first - second;
|
||||
};
|
||||
} else if (type.equals("twilightCostInMemory")) {
|
||||
} else if (type.equalsIgnoreCase("twilightCostInMemory")) {
|
||||
FieldUtils.validateAllowedFields(object, "memory");
|
||||
final String memory = FieldUtils.getString(object.get("memory"), "memory");
|
||||
return actionContext -> (Evaluator) (game, cardAffected) -> {
|
||||
@@ -227,7 +227,7 @@ public class ValueResolver {
|
||||
}
|
||||
return total;
|
||||
};
|
||||
} else if (type.equals("maxOfRaces")) {
|
||||
} else if (type.equalsIgnoreCase("maxOfRaces")) {
|
||||
FieldUtils.validateAllowedFields(object, "filter");
|
||||
final String filter = FieldUtils.getString(object.get("filter"), "filter");
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.gempukku.lotro.cards.build.field.effect.modifier;
|
||||
|
||||
import com.gempukku.lotro.cards.build.ActionContext;
|
||||
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
|
||||
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
|
||||
import com.gempukku.lotro.cards.build.ModifierSource;
|
||||
import com.gempukku.lotro.cards.build.field.FieldUtils;
|
||||
import com.gempukku.lotro.common.PossessionClass;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.PossessionClassSpotModifier;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class ClassSpot implements ModifierSourceProducer {
|
||||
@Override
|
||||
public ModifierSource getModifierSource(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(object, "class");
|
||||
|
||||
final PossessionClass spotClass = FieldUtils.getEnum(PossessionClass.class, object.get("class"), "class");
|
||||
|
||||
return new ModifierSource() {
|
||||
@Override
|
||||
public Modifier getModifier(ActionContext actionContext) {
|
||||
return new PossessionClassSpotModifier(actionContext.getSource(), spotClass);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ public class ModifierSourceFactory {
|
||||
modifierProducers.put("cantbeassignedtoskirmishagainst", new CantBeAssignedToSkirmishAgainst());
|
||||
modifierProducers.put("cantbear", new CantBear());
|
||||
modifierProducers.put("cantdiscardcardsfromhandortopofdrawdeck", new CantDiscardCardsFromHandOrTopOfDrawDeck());
|
||||
modifierProducers.put("classspot", new ClassSpot());
|
||||
}
|
||||
|
||||
public ModifierSource getModifier(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
|
||||
Reference in New Issue
Block a user