Migrated Site cards in set 8 to hjson
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set8.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.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: Siege of Gondor
|
||||
* Twilight Cost: 1
|
||||
* Type: Site
|
||||
* Site: 3K
|
||||
* Game Text: Sanctuary. Underground. Fellowship: Add 3 threats to play an enduring companion from your draw deck.
|
||||
*/
|
||||
public class Card8_117 extends AbstractSite {
|
||||
public Card8_117() {
|
||||
super("The Dimholt", SitesBlock.KING, 3, 1, Direction.RIGHT);
|
||||
addKeyword(Keyword.UNDERGROUND);
|
||||
addKeyword(Keyword.SANCTUARY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseSiteDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
&& PlayConditions.canAddThreat(game, self, 3)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new AddThreatsEffect(playerId, self, 3));
|
||||
action.appendEffect(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, CardType.COMPANION, Keyword.ENDURING));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set8.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.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.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.RemoveBurdenEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDeckEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDiscardEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Siege of Gondor
|
||||
* Twilight Cost: 4
|
||||
* Type: Site
|
||||
* Site: 4K
|
||||
* Game Text: Underground. Shadow: Remove 2 burdens to play an enduring minion from your draw deck or discard pile.
|
||||
*/
|
||||
public class Card8_118 extends AbstractSite {
|
||||
public Card8_118() {
|
||||
super("City of the Dead", SitesBlock.KING, 4, 4, Direction.RIGHT);
|
||||
addKeyword(Keyword.UNDERGROUND);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseSiteDuringPhase(game, Phase.SHADOW, self)
|
||||
&& PlayConditions.canRemoveBurdens(game, self, 2)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new RemoveBurdenEffect(playerId, self, 2));
|
||||
List<Effect> possibleEffects = new LinkedList<>();
|
||||
possibleEffects.add(
|
||||
new ChooseAndPlayCardFromDeckEffect(playerId, CardType.MINION, Keyword.ENDURING) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Play from deck";
|
||||
}
|
||||
});
|
||||
possibleEffects.add(
|
||||
new ChooseAndPlayCardFromDiscardEffect(playerId, game, CardType.MINION, Keyword.ENDURING) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Play from discard";
|
||||
}
|
||||
});
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, playerId, possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set8.site;
|
||||
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractSite;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.OptionalEffect;
|
||||
import com.gempukku.lotro.logic.effects.TakeControlOfASiteEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseOpponentEffect;
|
||||
import com.gempukku.lotro.common.SitesBlock;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
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.effects.AddThreatsEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Siege of Gondor
|
||||
* Twilight Cost: 7
|
||||
* Type: Site
|
||||
* Site: 5K
|
||||
* Game Text: At the start of the regroup phase, the Free Peoples player must add 3 threats or choose an opponent who
|
||||
* may take control of a site.
|
||||
*/
|
||||
public class Card8_119 extends AbstractSite {
|
||||
public Card8_119() {
|
||||
super("Crashed Gate", SitesBlock.KING, 5, 7, Direction.LEFT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RequiredTriggerAction> getRequiredAfterTriggers(LotroGame game, EffectResult effectResult, final PhysicalCard self) {
|
||||
if (TriggerConditions.startOfPhase(game, effectResult, Phase.REGROUP)) {
|
||||
final RequiredTriggerAction action = new RequiredTriggerAction(self);
|
||||
List<Effect> possibleEffects = new LinkedList<>();
|
||||
possibleEffects.add(
|
||||
new AddThreatsEffect(game.getGameState().getCurrentPlayerId(), self, 3));
|
||||
possibleEffects.add(
|
||||
new ChooseOpponentEffect(game.getGameState().getCurrentPlayerId()) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Choose an opponent who may take control of a site";
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void opponentChosen(String opponentId) {
|
||||
action.appendEffect(
|
||||
new OptionalEffect(action, opponentId,
|
||||
new TakeControlOfASiteEffect(self, opponentId)));
|
||||
}
|
||||
});
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, game.getGameState().getCurrentPlayerId(), possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set8.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.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
|
||||
import com.gempukku.lotro.logic.modifiers.SpecialFlagModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Set: Siege of Gondor
|
||||
* Twilight Cost: 6
|
||||
* Type: Site
|
||||
* Site: 7K
|
||||
* Game Text: River. Regroup: Spot your minion and 6 companions to make the Free Peoples player choose to move again
|
||||
* this turn.
|
||||
*/
|
||||
public class Card8_120 extends AbstractSite {
|
||||
public Card8_120() {
|
||||
super("Osgiliath Channel", SitesBlock.KING, 7, 6, Direction.RIGHT);
|
||||
addKeyword(Keyword.RIVER);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseSiteDuringPhase(game, Phase.REGROUP, self)
|
||||
&& PlayConditions.canSpot(game, Filters.owner(playerId), CardType.MINION)
|
||||
&& PlayConditions.canSpot(game, 6, CardType.COMPANION)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new SpecialFlagModifier(self, ModifierFlag.HAS_TO_MOVE_IF_POSSIBLE)));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -26,17 +26,20 @@
|
||||
Underground
|
||||
Sanctuary
|
||||
]
|
||||
/*requires: {
|
||||
|
||||
}
|
||||
effects: [
|
||||
{
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
}
|
||||
]*/
|
||||
{
|
||||
type: activated
|
||||
phase: fellowship
|
||||
cost: {
|
||||
type: addThreats
|
||||
amount: 3
|
||||
}
|
||||
effect: {
|
||||
type: playCardFromDrawDeck
|
||||
filter: choose(enduring,companion)
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>Underground</b>. <b>Sanctuary</b>. <b>Fellowship:</b> Add 3 threats to play an enduring companion from your draw deck.
|
||||
lore: ""
|
||||
promotext: ""
|
||||
@@ -71,17 +74,33 @@
|
||||
block: King
|
||||
direction: Right
|
||||
keywords: Underground
|
||||
/*requires: {
|
||||
|
||||
}
|
||||
effects: [
|
||||
{
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
}
|
||||
]*/
|
||||
{
|
||||
type: activated
|
||||
phase: shadow
|
||||
cost: {
|
||||
type: removeBurdens
|
||||
amount: 2
|
||||
}
|
||||
effect: {
|
||||
type: choice
|
||||
texts: [
|
||||
Play enduring minion from draw deck
|
||||
Play enduring minion from discard pile
|
||||
]
|
||||
effects: [
|
||||
{
|
||||
type: playCardFromDrawDeck
|
||||
filter: choose(enduring,minion)
|
||||
}
|
||||
{
|
||||
type: playCardFromDiscard
|
||||
filter: choose(enduring,minion)
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>Underground</b>. <b>Shadow:</b> Remove 2 burdens to play an enduring minion from your draw deck or discard pile.
|
||||
lore: ""
|
||||
promotext: ""
|
||||
@@ -115,17 +134,33 @@
|
||||
site: 5
|
||||
block: King
|
||||
direction: Left
|
||||
/*requires: {
|
||||
|
||||
}
|
||||
effects: [
|
||||
{
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
}
|
||||
]*/
|
||||
{
|
||||
type: trigger
|
||||
trigger: {
|
||||
type: startOfPhase
|
||||
phase: regroup
|
||||
}
|
||||
player: free people
|
||||
effect: {
|
||||
type: choice
|
||||
texts: [
|
||||
Add 3 threats
|
||||
Opponent takes control of site
|
||||
]
|
||||
effects: [
|
||||
{
|
||||
type: addThreats
|
||||
amount: 3
|
||||
}
|
||||
{
|
||||
type: takeControlOfSite
|
||||
player: shadow
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: At the start of the regroup phase, the Free Peoples player must add 3 threats or choose an opponent who may take control of a site.
|
||||
lore: ""
|
||||
promotext: ""
|
||||
@@ -160,17 +195,29 @@
|
||||
block: King
|
||||
direction: Right
|
||||
keywords: River
|
||||
/*requires: {
|
||||
|
||||
}
|
||||
effects: [
|
||||
{
|
||||
|
||||
}
|
||||
{
|
||||
|
||||
}
|
||||
]*/
|
||||
{
|
||||
type: activated
|
||||
phase: regroup
|
||||
requires: [
|
||||
{
|
||||
type: canSpot
|
||||
filter: your,minion
|
||||
}
|
||||
{
|
||||
type: canSpot
|
||||
filter: companion
|
||||
count: 6
|
||||
}
|
||||
]
|
||||
effect: {
|
||||
type: addModifier
|
||||
modifier: {
|
||||
type: hasToMoveIfAble
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
gametext: <b>River</b>. <b>Regroup:</b> Spot your minion and 6 companions to make the Free Peoples player choose to move again this turn.
|
||||
lore: ""
|
||||
promotext: ""
|
||||
@@ -3,9 +3,11 @@ package com.gempukku.lotro.cards.build.field.effect.appender;
|
||||
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.PlayerSource;
|
||||
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.PlayerResolver;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
@@ -16,7 +18,10 @@ import org.json.simple.JSONObject;
|
||||
public class TakeControlOfSite implements EffectAppenderProducer {
|
||||
@Override
|
||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject);
|
||||
FieldUtils.validateAllowedFields(effectObject, "player");
|
||||
|
||||
String player = FieldUtils.getString(effectObject.get("player"), "player", "you");
|
||||
final PlayerSource playerSource = PlayerResolver.resolvePlayer(player, environment);
|
||||
|
||||
return new DelayedAppender() {
|
||||
@Override
|
||||
@@ -37,7 +42,7 @@ public class TakeControlOfSite implements EffectAppenderProducer {
|
||||
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
return new TakeControlOfASiteEffect(action.getActionSource(), action.getPerformingPlayer());
|
||||
return new TakeControlOfASiteEffect(action.getActionSource(), playerSource.getPlayer(actionContext));
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user