Migrated Site cards in set 17 to hjson
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set17.site;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
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.AbstractShadowsSite;
|
||||
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
|
||||
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: Rise of Saruman
|
||||
* Twilight Cost: 0
|
||||
* Type: Site
|
||||
* Game Text: Regroup: Exert your minion and remove a threat to make the Free Peoples player discard one of his or her
|
||||
* conditions.
|
||||
*/
|
||||
public class Card17_145 extends AbstractShadowsSite {
|
||||
public Card17_145() {
|
||||
super("Dol Guldur", 0, Direction.LEFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseSiteDuringPhase(game, Phase.REGROUP, self)
|
||||
&& PlayConditions.canExert(self, game, Filters.owner(playerId), CardType.MINION)
|
||||
&& PlayConditions.canRemoveThreat(game, self, 1)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.owner(playerId), CardType.MINION));
|
||||
action.appendCost(
|
||||
new RemoveThreatsEffect(self, 1));
|
||||
action.appendEffect(
|
||||
new ChooseAndDiscardCardsFromPlayEffect(action, game.getGameState().getCurrentPlayerId(), 1, 1,
|
||||
CardType.CONDITION, Filters.owner(game.getGameState().getCurrentPlayerId())));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set17.site;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractShadowsSite;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseCardsFromDeadPileEffect;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Zone;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.GameUtils;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Rise of Saruman
|
||||
* Twilight Cost: 3
|
||||
* Type: Site
|
||||
* Game Text: River. When the fellowship moves to this site in region 2, the Free Peoples player places a card from
|
||||
* the dead pile out of play.
|
||||
*/
|
||||
public class Card17_146 extends AbstractShadowsSite {
|
||||
public Card17_146() {
|
||||
super("Falls of Rauros", 3, Direction.LEFT);
|
||||
addKeyword(Keyword.RIVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.movesTo(game, effectResult, self, Filters.region(2))) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseCardsFromDeadPileEffect(game.getGameState().getCurrentPlayerId(), 1, 1, Filters.owner(game.getGameState().getCurrentPlayerId())) {
|
||||
@Override
|
||||
protected void cardsSelected(LotroGame game, Collection<PhysicalCard> cards) {
|
||||
for (PhysicalCard card : cards) {
|
||||
game.getGameState().removeCardsFromZone(game.getGameState().getCurrentPlayerId(), Collections.singleton(card));
|
||||
game.getGameState().addCardToZone(game, card, Zone.REMOVED);
|
||||
game.getGameState().sendMessage(game.getGameState().getCurrentPlayerId() + " placed " + GameUtils.getCardLink(card) + " from the dead pile out of play");
|
||||
}
|
||||
}
|
||||
});
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set17.site;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractShadowsSite;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.RequiredTriggerAction;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Rise of Saruman
|
||||
* Twilight Cost: 3
|
||||
* Type: Site
|
||||
* Game Text: River. When the fellowship moves to this site, if it is a Sanctuary, remove 2 burdens.
|
||||
*/
|
||||
public class Card17_147 extends AbstractShadowsSite {
|
||||
public Card17_147() {
|
||||
super("Imladris", 3, Direction.LEFT);
|
||||
addKeyword(Keyword.RIVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, PhysicalCard self) {
|
||||
if (TriggerConditions.movesTo(game, effectResult, self, Keyword.SANCTUARY)) {
|
||||
RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
action.appendEffect(
|
||||
new RemoveBurdenEffect(game.getGameState().getCurrentPlayerId(), self, 2));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set17.site;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractShadowsSite;
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Rise of Saruman
|
||||
* Twilight Cost: 1
|
||||
* Type: Site
|
||||
* Game Text: Plains. While you control this site, each of your hunter minions is strength +1.
|
||||
*/
|
||||
public class Card17_148 extends AbstractShadowsSite {
|
||||
public Card17_148() {
|
||||
super("Nurn", 1, Direction.LEFT);
|
||||
addKeyword(Keyword.PLAINS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getControlledSiteModifiers(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(
|
||||
new StrengthModifier(self, Filters.and(Filters.owner(self.getCardController()), CardType.MINION, Keyword.HUNTER), 1));
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,24 @@
|
||||
block: Shadows
|
||||
direction: Left
|
||||
effects: [
|
||||
{
|
||||
type: activated
|
||||
phase: regroup
|
||||
cost: [
|
||||
{
|
||||
type: exert
|
||||
filter: choose(your,minion)
|
||||
}
|
||||
{
|
||||
type: removeThreats
|
||||
}
|
||||
]
|
||||
effect: {
|
||||
type: discard
|
||||
player: free people
|
||||
filter: choose(side(free people),condition)
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>Regroup:</b> Exert your minion and remove a threat to make the Free Peoples player discard one of his or her conditions.
|
||||
lore: ""
|
||||
@@ -57,6 +75,17 @@
|
||||
direction: Right
|
||||
keywords: River
|
||||
effects: [
|
||||
{
|
||||
type: trigger
|
||||
trigger: {
|
||||
type: movesTo
|
||||
filter: self,regionNumber(2)
|
||||
}
|
||||
effect: {
|
||||
type: removeCardsInDeadPileFromGame
|
||||
player: free people
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>River</b>. When the Fellowship moves to this site in region 2, the Free Peoples player places a card from the dead pile out of play.
|
||||
lore: ""
|
||||
@@ -92,6 +121,17 @@
|
||||
direction: Right
|
||||
keywords: River
|
||||
effects: [
|
||||
{
|
||||
type: trigger
|
||||
trigger: {
|
||||
type: movesTo
|
||||
filter: self,sanctuary
|
||||
}
|
||||
effect: {
|
||||
type: removeBurdens
|
||||
amount: 2
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>River</b>. When the fellowship moves to this site, if it is a sanctuary, remove 2 burdens.
|
||||
lore: ""
|
||||
@@ -127,6 +167,18 @@
|
||||
direction: Right
|
||||
keywords: Plains
|
||||
effects: [
|
||||
{
|
||||
type: modifier
|
||||
modifier: {
|
||||
type: modifyStrength
|
||||
requires: {
|
||||
type: canSpot
|
||||
filter: self,controlledByShadowPlayer
|
||||
}
|
||||
filter: hunter,minion
|
||||
amount: 1
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>Plains</b>. While you control this site, each of your hunter minions is strength +1.
|
||||
lore: ""
|
||||
@@ -146,6 +146,7 @@ public class EffectAppenderFactory {
|
||||
effectAppenderProducers.put("reinforcetokens", new ReinforceTokens());
|
||||
effectAppenderProducers.put("removealltokens", new RemoveAllTokens());
|
||||
effectAppenderProducers.put("removeburdens", new RemoveBurdens());
|
||||
effectAppenderProducers.put("removecardsindeadpilefromgame", new RemoveCardsInDeadPileFromGame());
|
||||
effectAppenderProducers.put("removecardsindiscardfromgame", new RemoveCardsInDiscardFromGame());
|
||||
effectAppenderProducers.put("removecharacterfromskirmish", new RemoveCharacterFromSkirmish());
|
||||
effectAppenderProducers.put("removefromthegame", new RemoveFromTheGame());
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.gempukku.lotro.cards.build.field.effect.appender;
|
||||
|
||||
import com.gempukku.lotro.cards.build.*;
|
||||
import com.gempukku.lotro.cards.build.field.FieldUtils;
|
||||
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.PlayerResolver;
|
||||
import com.gempukku.lotro.cards.build.field.effect.appender.resolver.ValueResolver;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.RemoveCardsFromDeadPileEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
public class RemoveCardsInDeadPileFromGame implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "count", "filter", "player");
|
||||
|
||||
final ValueSource valueSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment);
|
||||
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter", "choose(any)");
|
||||
final String player = FieldUtils.getString(effectObject.get("player"), "player", "you");
|
||||
|
||||
PlayerSource playerSource = PlayerResolver.resolvePlayer(player, environment);
|
||||
|
||||
MultiEffectAppender result = new MultiEffectAppender();
|
||||
|
||||
result.addEffectAppender(
|
||||
CardResolver.resolveCardsInDeadPile(filter, null, null, valueSource, "_temp", player, "Choose cards from dead pile to remove from game", environment));
|
||||
result.addEffectAppender(
|
||||
new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final Collection<? extends PhysicalCard> cards = actionContext.getCardsFromMemory("_temp");
|
||||
String player = playerSource.getPlayer(actionContext);
|
||||
return new RemoveCardsFromDeadPileEffect(player, actionContext.getSource(), new ArrayList<>(cards));
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -51,6 +51,8 @@ public class FilterFactory {
|
||||
simpleFilters.put("canwound", (actionContext -> Filters.canTakeWounds(actionContext.getSource(), 1)));
|
||||
simpleFilters.put("controlledbyotherplayer",
|
||||
(actionContext -> Filters.siteControlledByOtherPlayer(actionContext.getPerformingPlayer())));
|
||||
simpleFilters.put("controlledbyshadowplayer",
|
||||
(actionContext -> Filters.siteControlledByOtherPlayer(actionContext.getGame().getGameState().getCurrentPlayerId())));
|
||||
simpleFilters.put("controlledsite",
|
||||
(actionContext -> Filters.siteControlled(actionContext.getPerformingPlayer())));
|
||||
simpleFilters.put("siteyoucontrol",
|
||||
|
||||
Reference in New Issue
Block a user