Migrated Shire cards in set 18 to hjson

This commit is contained in:
MarcinSc
2024-05-27 13:40:54 +07:00
parent 5493499f33
commit 814a2de584
9 changed files with 172 additions and 446 deletions

View File

@@ -1,56 +0,0 @@
package com.gempukku.lotro.cards.set18.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.AbstractPermanent;
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: Tale. To play, spot a Hobbit. Maneuver: Discard a tale from play to choose a Shadow player who must exert
* one of his or her minions.
*/
public class Card18_106 extends AbstractPermanent {
public Card18_106() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.SHIRE, "A Dragon's Tale");
addKeyword(Keyword.TALE);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canSpot(game, Race.HOBBIT);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
&& PlayConditions.canDiscardFromPlay(self, game, Keyword.TALE)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Keyword.TALE));
action.appendEffect(
new ChooseOpponentEffect(playerId) {
@Override
protected void opponentChosen(String opponentId) {
action.appendEffect(
new ChooseAndExertCharactersEffect(action, opponentId, 1, 1, Filters.owner(opponentId), CardType.MINION));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,41 +0,0 @@
package com.gempukku.lotro.cards.set18.shire;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
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.SpotCondition;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.modifiers.condition.AndCondition;
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Companion • Hobbit
* Strength: 3
* Vitality: 3
* Resistance: 7
* Game Text: While the fellowship is in region 1 and you can spot 2 other [SHIRE] companions, Fredegar Bolger
* is strength +3.
*/
public class Card18_107 extends AbstractCompanion {
public Card18_107() {
super(1, 3, 3, 7, Culture.SHIRE, Race.HOBBIT, null, "Fredegar Bolger", "Fatty", true);
}
@Override
public java.util.List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return java.util.Collections.singletonList(new StrengthModifier(self, self,
new AndCondition(
new LocationCondition(Filters.region(1)),
new SpotCondition(2, Filters.not(self), Culture.SHIRE, CardType.COMPANION)
), 3));
}
}

View File

@@ -1,57 +0,0 @@
package com.gempukku.lotro.cards.set18.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.ActivateCardAction;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
import com.gempukku.lotro.logic.effects.RemoveTokenEffect;
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;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 1
* Type: Possession • Support Area
* Game Text: Each time a [SHIRE] companion wins a skimish, you may add a [SHIRE] token here.
* Fellowship: Remove a [SHIRE] token here to remove a burden.
*/
public class Card18_108 extends AbstractPermanent {
public Card18_108() {
super(Side.FREE_PEOPLE, 1, CardType.POSSESSION, Culture.SHIRE, "Golden Perch Ale", null, true);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Culture.SHIRE, CardType.COMPANION)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendEffect(
new AddTokenEffect(self, self, Token.SHIRE));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
&& PlayConditions.canRemoveTokens(game, self, Token.SHIRE)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveTokenEffect(self, self, Token.SHIRE));
action.appendEffect(
new RemoveBurdenEffect(playerId, self, 1));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,42 +0,0 @@
package com.gempukku.lotro.cards.set18.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.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.effects.CancelSkirmishEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndRemoveCultureTokensFromCardEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 2
* Type: Event • Skirmish
* Game Text: Remove 2 [SHIRE] tokens to cancel a skirmish involving an unbound Hobbit.
*/
public class Card18_109 extends AbstractEvent {
public Card18_109() {
super(Side.FREE_PEOPLE, 2, Culture.SHIRE, "Make a Run For It", Phase.SKIRMISH);
}
@Override
public boolean checkPlayRequirements(LotroGame game, PhysicalCard self) {
return PlayConditions.canRemoveTokensFromAnything(game, Token.SHIRE, 2);
}
@Override
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.SHIRE, 1, Filters.any));
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.SHIRE, 1, Filters.any));
action.appendEffect(
new CancelSkirmishEffect(Filters.unboundCompanion, Race.HOBBIT));
return action;
}
}

View File

@@ -1,65 +0,0 @@
package com.gempukku.lotro.cards.set18.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.ActivateCardAction;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.*;
import com.gempukku.lotro.logic.modifiers.RemoveKeywordModifier;
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;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 0
* Type: Condition • Support Area
* Game Text: At the start of each turn, you may add (2) to heal a [SHIRE] companion. Maneuver: Add a threat to spot
* a minion. That minion loses fierce and cannot gain fierce until the regroup phase.
*/
public class Card18_110 extends AbstractPermanent {
public Card18_110() {
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.SHIRE, "Prized Lagan");
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.startOfTurn(game, effectResult)) {
OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new AddTwilightEffect(self, 2));
action.appendEffect(
new ChooseAndHealCharactersEffect(action, playerId, Culture.SHIRE, CardType.COMPANION));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.MANEUVER, self)
&& PlayConditions.canAddThreat(game, self, 1)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new AddThreatsEffect(playerId, self, 1));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a minion", CardType.MINION) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new RemoveKeywordModifier(self, card, Keyword.FIERCE), Phase.REGROUP));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,64 +0,0 @@
package com.gempukku.lotro.cards.set18.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.actions.CostToEffectAction;
import com.gempukku.lotro.logic.actions.OptionalTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractFollower;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.DrawCardsEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 2
* Type: Follower
* Resistance: +1
* Game Text: Aid - (2). (At the start of the maneuver phase, you may add (2) to transfer this to a companion.)
* Each time you attach this follower to a [SHIRE] companion, you may discard X cards from hand to draw X cards.
*/
public class Card18_111 extends AbstractFollower {
public Card18_111() {
super(Side.FREE_PEOPLE, 2, 0, 0, 1, Culture.SHIRE, "Robin Smallburrow", "Shirriff Cock-Robin", true);
}
@Override
public boolean canPayAidCost(LotroGame game, PhysicalCard self) {
return true;
}
@Override
public void appendAidCosts(LotroGame game, CostToEffectAction action, PhysicalCard self) {
action.appendCost(new AddTwilightEffect(self, 2));
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(final String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.transferredCard(game, effectResult, self, null, Filters.and(Culture.SHIRE, CardType.COMPANION))) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 0, Integer.MAX_VALUE, Filters.any) {
@Override
protected void cardsBeingDiscardedCallback(Collection<PhysicalCard> cardsBeingDiscarded) {
if (cardsBeingDiscarded.size() > 0)
action.appendEffect(
new DrawCardsEffect(action, playerId, cardsBeingDiscarded.size()));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,60 +0,0 @@
package com.gempukku.lotro.cards.set18.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.actions.RequiredTriggerAction;
import com.gempukku.lotro.logic.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.logic.effects.PreventableCardEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPreventCardEffect;
import com.gempukku.lotro.logic.timing.Effect;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 0
* Type: Condition • Support Area
* Game Text: Tale. When there are 4 [SHIRE] tokens here, discard this condition from play.
* Response: If a [SHIRE] condition or [SHIRE] possession is about to be discarded from play by a Shadow card,
* add a [SHIRE] token here to prevent that.
*/
public class Card18_112 extends AbstractPermanent {
public Card18_112() {
super(Side.FREE_PEOPLE, 0, CardType.CONDITION, Culture.SHIRE, "Scouring of the Shire");
addKeyword(Keyword.TALE);
}
@Override
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (game.getGameState().getTokenCount(self, Token.SHIRE) >= 4) {
RequiredTriggerAction action = new RequiredTriggerAction(self);
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayBeforeActions(String playerId, LotroGame game, Effect effect, PhysicalCard self) {
if (TriggerConditions.isGettingDiscardedBy(effect, game, Side.SHADOW, Culture.SHIRE, Filters.or(CardType.CONDITION, CardType.POSSESSION))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new AddTokenEffect(self, self, Token.SHIRE));
action.appendEffect(
new ChooseAndPreventCardEffect(self, (PreventableCardEffect) effect, playerId, "Choose card to prevent discarding of", Culture.SHIRE, Filters.or(CardType.CONDITION, CardType.POSSESSION)));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,58 +0,0 @@
package com.gempukku.lotro.cards.set18.shire;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Filterable;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.PossessionClass;
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.ExertCharactersEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Treachery & Deceit
* Side: Free
* Culture: Shire
* Twilight Cost: 2
* Type: Possession • Hand Weapon
* Strength: +1
* Vitality: +1
* Resistance: +1
* Game Text: Bearer must be Bilbo or Frodo. Regroup: Exert bearer to remove a threat.
*/
public class Card18_113 extends AbstractAttachableFPPossession {
public Card18_113() {
super(2, 1, 1, Culture.SHIRE, PossessionClass.HAND_WEAPON, "Sting", "Elven Long Knife", true);
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.or(Filters.name("Bilbo"), Filters.frodo);
}
@Override
public int getResistance() {
return 1;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& PlayConditions.canExert(self, game, self.getAttachedTo())) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ExertCharactersEffect(action, self, self.getAttachedTo()));
action.appendEffect(
new RemoveThreatsEffect(self, 1));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -26,6 +26,26 @@
Support Area
]
effects: [
{
type: toPlay
requires: {
type: canSpot
filter: hobbit
}
}
{
type: activated
phase: maneuver
cost: {
type: discard
filter: choose(tale)
}
effect: {
type: exert
player: shadow
filter: choose(minion)
}
}
]
gametext: <b>Tale</b>. To play, spot a Hobbit.<br><b>Maneuver:</b> Discard a tale from play to choose a Shadow player who must exert one of his or her minions.
lore: If you're referring to the incident with the dragon, I was barely involved. All I did was give your uncle a little nudge out of the door.
@@ -65,6 +85,25 @@
vitality: 3
resistance: 7
effects: [
{
type: modifier
modifier: {
type: modifyStrength
requires: [
{
type: location
filter: regionNumber(1)
}
{
type: canSpot
filter: other,culture(shire),companion
count: 2
}
]
filter: self
amount: 3
}
}
]
gametext: While the fellowship is in region 1 and you can spot 2 other [shire] companions, Fredegar Bolger is strength +3.
lore: You'll wish you were back here with me before this time tomorrow.'
@@ -101,6 +140,31 @@
#target:
keywords: Support Area
effects: [
{
type: trigger
optional: true
trigger: {
type: winsSkirmish
filter: culture(shire),companion
}
effect: {
type: addTokens
culture: shire
filter: self
}
}
{
type: activated
phase: fellowship
cost: {
type: removeTokens
culture: shire
filter: self
}
effect: {
type: removeBurdens
}
}
]
gametext: Each time a [shire] companion wins a skirmish, you may add a [shire] token here.<br><b>Fellowship:</b> Remove a [shire] token here to remove a burden.
lore: The best beer in the Eastfarthing, or used to be: it is a long time since I tasted it.'
@@ -135,13 +199,17 @@
twilight: 2
type: Event
keywords: Skirmish
effects: {
type: event
cost: {
},
type: removeTokensCumulative
culture: shire
count: 2
}
effect: [
{
type: cancelSkirmish
filter: unbound,hobbit
}
]
}
@@ -179,6 +247,34 @@
type: Condition
keywords: Support Area
effects: [
{
type: trigger
optional: true
trigger: {
type: startOfTurn
}
cost: {
type: addTwilight
amount: 2
}
effect: {
type: heal
filter: choose(culture(shire),companion)
}
}
{
type: activated
phase: maneuver
cost: {
type: addThreats
}
effect: {
type: removeKeyword
filter: choose(minion)
keyword: fierce
until: regroup
}
}
]
gametext: At the start of each turn, you may add (2) to heal a [shire] companion.<br><b>Maneuver:</b> Add a threat to spot a minion. That minion loses <b>fierce</b> and cannot gain fierce until the regroup phase.
lore: We are sitting on the field of victory, enjoying a few well-earned comforts.
@@ -215,6 +311,35 @@
type: Follower
resistance: 1
effects: [
{
type: aidCost
cost: {
type: addTwilight
amount: 2
}
}
{
type: trigger
optional: true
trigger: {
type: transferred
filter: self
to: culture(shire),companion
}
cost: {
type: discardFromHand
forced: false
count: any
memorize: discardedCards
}
effect: {
type: drawCards
count: {
type: forEachInMemory
memory: discardedCards
}
}
}
]
gametext: <b>Aid</b> (2). <helper>(At the start of the maneuver phase, you may add (2) to transfer this to a companion.)</helper><br>Each time you attach this follower to a [shire] companion, you may discard X cards from hand to draw X cards.
lore: ""
@@ -253,6 +378,39 @@
Support Area
]
effects: [
{
type: trigger
trigger: {
type: constantlyCheck
}
requires: {
type: canSpotCultureTokens
filter: self
culture: shire
amount: 4
}
effect: {
type: discard
filter: self
}
}
{
type: activatedTrigger
trigger: {
type: aboutToDiscard
filter: culture(shire),or(condition,possession)
source: side(shadow)
}
cost: {
type: addTokens
culture: shire
filter: self
}
effect: {
type: preventDiscard
filter: choose(culture(shire),or(condition,possession))
}
}
]
gametext: <b>Tale</b>.<br>When there are 4 [shire] tokens here, discard this condition from play.<br><b>Response:</b> If a [shire] condition or [shire] possession is about to be discarded from play by a Shadow card, add a [shire] token here to prevent that.
lore: ""
@@ -291,8 +449,19 @@
vitality: 1
resistance: 1
itemclass: Hand weapon
#target: title(Bilbo or Frodo)
target: or(name(Bilbo),name(Frodo))
effects: [
{
type: activated
phase: regroup
cost: {
type: exert
filter: bearer
}
effect: {
type: removeThreats
}
}
]
gametext: Bearer must be Bilbo or Frodo.<br><b>Regroup:</b> Exert bearer to remove a threat.
lore: My old sword, Sting! Here! Take it, take it!