Migrated Site cards in set 10 to hjson

This commit is contained in:
MarcinSc
2024-05-16 22:38:40 +07:00
parent d2229276c3
commit 040ddcd827
6 changed files with 73 additions and 217 deletions

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set10.site;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.SitesBlock;
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.AbstractSite;
import com.gempukku.lotro.logic.effects.AddThreatsEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDeckEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Mount Doom
* Twilight Cost: 0
* Type: Site
* Site: 3K
* Game Text: Sanctuary. Fellowship: If you cannot spot 2 threats, add a threat to play a fortification from your
* draw deck.
*/
public class Card10_117 extends AbstractSite {
public Card10_117() {
super("Base of Mindolluin", SitesBlock.KING, 3, 0, Direction.RIGHT);
addKeyword(Keyword.SANCTUARY);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.FELLOWSHIP, self)
&& !PlayConditions.canSpotThreat(game, 2)
&& PlayConditions.canAddThreat(game, self, 1)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new AddThreatsEffect(playerId, self, 1));
action.appendEffect(
new ChooseAndPlayCardFromDeckEffect(playerId, Keyword.FORTIFICATION));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,50 +0,0 @@
package com.gempukku.lotro.cards.set10.site;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.SitesBlock;
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.AbstractSite;
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Mount Doom
* Twilight Cost: 3
* Type: Site
* Site: 4K
* Game Text: Plains. Shadow: Exert a minion and remove a burden to make the Free Peoples player discard one of his
* or her conditions.
*/
public class Card10_118 extends AbstractSite {
public Card10_118() {
super("Pelennor Prairie", SitesBlock.KING, 4, 3, Direction.RIGHT);
addKeyword(Keyword.PLAINS);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.SHADOW, self)
&& PlayConditions.canExert(self, game, CardType.MINION)
&& PlayConditions.canRemoveBurdens(game, self, 1)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, CardType.MINION));
action.appendCost(
new RemoveBurdenEffect(playerId, self));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1, CardType.CONDITION, Filters.owner(game.getGameState().getCurrentPlayerId())));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,36 +0,0 @@
package com.gempukku.lotro.cards.set10.site;
import com.gempukku.lotro.common.SitesBlock;
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.AbstractSite;
import com.gempukku.lotro.logic.modifiers.*;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Mount Doom
* Twilight Cost: 8
* Type: Site
* Site: 5K
* Game Text: Wounds cannot be prevented or healed. Burdens cannot be removed.
*/
public class Card10_119 extends AbstractSite {
public Card10_119() {
super("Steward's Tomb", SitesBlock.KING, 5, 8, Direction.LEFT);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new CantHealModifier(self, Filters.character));
modifiers.add(
new SpecialFlagModifier(self, ModifierFlag.CANT_PREVENT_WOUNDS));
modifiers.add(
new CantRemoveBurdensModifier(self, null, Filters.any));
return modifiers;
}
}

View File

@@ -1,45 +0,0 @@
package com.gempukku.lotro.cards.set10.site;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.SitesBlock;
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.AbstractSite;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Mount Doom
* Twilight Cost: 8
* Type: Site
* Site: 8K
* Game Text: Skirmish: Spot your [WRAITH] Orc and remove 2 threats to make that [WRAITH] Orc strength +3.
*/
public class Card10_120 extends AbstractSite {
public Card10_120() {
super("Watchers of Cirith Ungol", SitesBlock.KING, 8, 8, Direction.RIGHT);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseSiteDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canSpot(game, Filters.owner(playerId), Culture.WRAITH, Race.ORC)
&& PlayConditions.canRemoveThreat(game, self, 2)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveThreatsEffect(self, 2));
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 3, Filters.owner(playerId), Culture.WRAITH, Race.ORC));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -23,17 +23,23 @@
block: King
direction: Right
keywords: Sanctuary
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: fellowship
requires: {
type: cantSpotThreats
amount: 2
}
cost: {
type: addThreats
}
effect: {
type: playCardFromDrawDeck
filter: choose(fortification)
}
}
]
gametext: <b>Sanctuary</b>. <b>Fellowship:</b> If you cannot spot 2 threats, add a threat to play a fortification from your draw deck.
lore: ""
promotext: ""
@@ -68,17 +74,26 @@
block: King
direction: Right
keywords: Plains
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: shadow
cost: [
{
type: exert
filter: choose(minion)
}
{
type: removeBurdens
}
]
effect: {
type: discard
player: free people
filter: choose(side(free people),condition)
}
}
]
gametext: <b>Plains</b>. <b>Shadow:</b> Exert a minion and remove a burden to make the Free Peoples player discard one of his or her conditions.
lore: ""
promotext: ""
@@ -112,17 +127,26 @@
site: 5
block: King
direction: Left
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: modifier
modifier: {
type: cantHeal
}
}
{
type: modifier
modifier: {
type: cantPreventWounds
}
}
{
type: modifier
modifier: {
type: cantRemoveBurdens
}
}
]
gametext: Wounds cannot be prevented or healed. Burdens cannot be removed.
lore: ""
promotext: ""
@@ -156,17 +180,25 @@
site: 8
block: King
direction: Right
/*requires: {
}
effects: [
{
}
{
}
]*/
{
type: activated
phase: skirmish
requires: {
type: canSpot
filter: your,culture(wraith),orc
}
cost: {
type: removeThreats
amount: 2
}
effect: {
type: modifyStrength
filter: choose(your,culture(wraith),orc)
amount: 3
}
}
]
gametext: <b>Skirmish:</b> Spot your [wraith] Orc and remove 2 threats to make that [wraith] Orc strength +3.
lore: ""
promotext: ""

View File

@@ -11,7 +11,7 @@ public class CantHeal implements ModifierSourceProducer {
FieldUtils.validateAllowedFields(object, "filter", "requires");
final JSONObject[] conditionArray = FieldUtils.getObjectArray(object.get("requires"), "requires");
final String filter = FieldUtils.getString(object.get("filter"), "filter");
final String filter = FieldUtils.getString(object.get("filter"), "filter", "character");
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
final Requirement[] requirements = environment.getRequirementFactory().getRequirements(conditionArray, environment);