Migrated Raider cards in set 8 to hjson

This commit is contained in:
MarcinSc
2024-05-14 15:14:04 +07:00
parent 4102dfdc53
commit 78f154d154
22 changed files with 31 additions and 1021 deletions

View File

@@ -1,49 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.AbstractMinion;
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndRemoveCultureTokensFromCardEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 6
* Type: Minion • Man
* Strength: 12
* Vitality: 3
* Site: 4
* Game Text: Corsair. Fierce. Skirmish: If you have initiative, remove a [RAIDER] token to discard a possession borne
* by a character skirmishing this minion.
*/
public class Card8_049 extends AbstractMinion {
public Card8_049() {
super(6, 12, 3, 4, Race.MAN, Culture.RAIDER, "Black Númenorean");
addKeyword(Keyword.CORSAIR);
addKeyword(Keyword.FIERCE);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
&& PlayConditions.hasInitiative(game, Side.SHADOW)
&& PlayConditions.canRemoveTokens(game, Token.RAIDER, 1, Filters.any)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.RAIDER, 1, Filters.any));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.POSSESSION, Filters.attachedTo(Filters.inSkirmishAgainst(self))));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,74 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.decisions.DecisionResultInvalidException;
import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.logic.effects.PlayoutDecisionEffect;
import com.gempukku.lotro.logic.effects.RemoveTokenEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromDiscardEffect;
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: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 2
* Type: Possession • Support Area
* Game Text: When you play this possession, you may add a [RAIDER] token here. Shadow: Remove X [RAIDER] tokens here
* to play a corsair from your discard pile; its twilight cost is -X. Discard this possession.
*/
public class Card8_050 extends AbstractPermanent {
public Card8_050() {
super(Side.SHADOW, 2, CardType.POSSESSION, Culture.RAIDER, "Black Sails of Umbar");
}
@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 AddTokenEffect(self, self, Token.RAIDER));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(final String playerId, final LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)) {
int tokens = game.getGameState().getTokenCount(self, Token.RAIDER);
if (PlayConditions.canPlayFromDiscard(playerId, game, -tokens, Keyword.CORSAIR)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new PlayoutDecisionEffect(playerId,
new IntegerAwaitingDecision(1, "How many tokens you wish to remove?", 0, tokens, tokens) {
@Override
public void decisionMade(String result) throws DecisionResultInvalidException {
int tokens = getValidatedResult(result);
if (tokens > 0)
action.insertCost(
new RemoveTokenEffect(self, self, Token.RAIDER, tokens));
action.appendEffect(
new ChooseAndPlayCardFromDiscardEffect(playerId, game, -tokens, Keyword.CORSAIR));
action.appendEffect(
new SelfDiscardEffect(self));
}
}));
return Collections.singletonList(action);
}
}
return null;
}
}

View File

@@ -1,60 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.AbstractMinion;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.SelfExertEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPlayCardFromHandEffect;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 7
* Type: Minion • Man
* Strength: 14
* Vitality: 4
* Site: 4
* Game Text: Corsair. Enduring. Fierce. Shadow: Exert Castamir of Umbar and play a corsair to add 2 [RAIDER] tokens to
* a card that already has a [RAIDER] token on it.
*/
public class Card8_051 extends AbstractMinion {
public Card8_051() {
super(7, 14, 4, 4, Race.MAN, Culture.RAIDER, "Castamir of Umbar", null, true);
addKeyword(Keyword.CORSAIR);
addKeyword(Keyword.ENDURING);
addKeyword(Keyword.FIERCE);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)
&& PlayConditions.canSelfExert(self, game)
&& PlayConditions.canPlayFromHand(playerId, game, Keyword.CORSAIR)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfExertEffect(action, self));
action.appendCost(
new ChooseAndPlayCardFromHandEffect(playerId, game, Keyword.CORSAIR));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a card to add tokens to", Filters.hasToken(Token.RAIDER)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddTokenEffect(self, card, Token.RAIDER, 2));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,48 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.cardtype.AbstractAttachable;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.condition.InitiativeCondition;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 0
* Type: Possession • Ranged Weapon
* Strength: +2
* Game Text: Bearer must be a corsair. While you have initiative, bearer is an archer and fierce.
*/
public class Card8_052 extends AbstractAttachable {
public Card8_052() {
super(Side.SHADOW, CardType.POSSESSION, 0, Culture.RAIDER, PossessionClass.RANGED_WEAPON, "Corsair Ballista");
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Keyword.CORSAIR;
}
@Override
public int getStrength() {
return 2;
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new KeywordModifier(self, Filters.hasAttached(self), new InitiativeCondition(Side.SHADOW), Keyword.ARCHER, 1));
modifiers.add(
new KeywordModifier(self, Filters.hasAttached(self), new InitiativeCondition(Side.SHADOW), Keyword.FIERCE, 1));
return modifiers;
}
}

View File

@@ -1,59 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Token;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.RemoveThreatsEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 3
* Type: Minion • Man
* Strength: 8
* Vitality: 2
* Site: 4
* Game Text: Corsair. When you play this minion, you may remove a threat to add 2 [RAIDER] tokens to a card that
* already has a [RAIDER] token on it.
*/
public class Card8_053 extends AbstractMinion {
public Card8_053() {
super(3, 8, 2, 4, Race.MAN, Culture.RAIDER, "Corsair Buccaneer");
addKeyword(Keyword.CORSAIR);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)
&& PlayConditions.canRemoveThreat(game, self, 1)) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new RemoveThreatsEffect(self, 1));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a card to add tokens to", Filters.hasToken(Token.RAIDER)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddTokenEffect(self, card, Token.RAIDER, 2));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,61 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndRemoveCultureTokensFromCardEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Token;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 3
* Type: Minion • Man
* Strength: 8
* Vitality: 2
* Site: 4
* Game Text: Corsair. When you play this minion, you may remove 2 culture tokens to add 2 [RAIDER] tokens to a card
* that already has a [RAIDER] token on it.
*/
public class Card8_054 extends AbstractMinion {
public Card8_054() {
super(3, 8, 2, 4, Race.MAN, Culture.RAIDER, "Corsair Freebooter");
addKeyword(Keyword.CORSAIR);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)
&& PlayConditions.canRemoveAnyCultureTokens(game, 2, Filters.any)) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, null, 1, Filters.any));
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, null, 1, Filters.any));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a card to add tokens to", Filters.hasToken(Token.RAIDER)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddTokenEffect(self, card, Token.RAIDER, 2));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,57 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.AbstractMinion;
import com.gempukku.lotro.logic.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndRemoveCultureTokensFromCardEffect;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 5
* Type: Minion • Man
* Strength: 10
* Vitality: 3
* Site: 4
* Game Text: Corsair. Skirmish: If you have initiative, remove a [RAIDER] token to make a corsair fierce until
* the regroup phase.
*/
public class Card8_055 extends AbstractMinion {
public Card8_055() {
super(5, 10, 3, 4, Race.MAN, Culture.RAIDER, "Corsair Gunners");
addKeyword(Keyword.CORSAIR);
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SKIRMISH, self, 0)
&& PlayConditions.hasInitiative(game, Side.SHADOW)
&& PlayConditions.canRemoveTokens(game, Token.RAIDER, 1, Filters.any)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndRemoveCultureTokensFromCardEffect(self, playerId, Token.RAIDER, 1, Filters.any));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose Corsair", Keyword.CORSAIR) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, card, Keyword.FIERCE), Phase.REGROUP));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,57 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.logic.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
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.OptionalTriggerAction;
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 1
* Type: Minion • Man
* Strength: 5
* Vitality: 1
* Site: 4
* Game Text: Corsair. When you play this minion, if you have initiative, you may discard an ally to add 2 [RAIDER]
* tokens to a card that already has a [RAIDER] token on it.
*/
public class Card8_056 extends AbstractMinion {
public Card8_056() {
super(1, 5, 1, 4, Race.MAN, Culture.RAIDER, "Corsair Lookout");
addKeyword(Keyword.CORSAIR);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)
&& PlayConditions.hasInitiative(game, Side.SHADOW)
&& PlayConditions.canDiscardFromPlay(self, game, CardType.ALLY)) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, CardType.ALLY));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a card to add tokens to", Filters.hasToken(Token.RAIDER)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddTokenEffect(self, card, Token.RAIDER, 2));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,59 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
import com.gempukku.lotro.logic.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.timing.PlayConditions;
import com.gempukku.lotro.logic.timing.TriggerConditions;
import com.gempukku.lotro.logic.effects.AddTokenEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Keyword;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Token;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.timing.EffectResult;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 2
* Type: Minion • Man
* Strength: 6
* Vitality: 2
* Site: 4
* Game Text: Corsair. When you play this minion, you may discard 2 cards from hand to add 2 [RAIDER] tokens to a card
* that already has a [RAIDER] token on it.
*/
public class Card8_058 extends AbstractMinion {
public Card8_058() {
super(2, 6, 2, 4, Race.MAN, Culture.RAIDER, "Corsair Plunderer");
addKeyword(Keyword.CORSAIR);
}
@Override
public List<OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult, final PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, self)
&& PlayConditions.canDiscardFromHand(game, playerId, 2, Filters.any)) {
final OptionalTriggerAction action = new OptionalTriggerAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2));
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a card to add tokens to", Filters.hasToken(Token.RAIDER)) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.insertEffect(
new AddTokenEffect(self, card, Token.RAIDER, 2));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,79 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
import com.gempukku.lotro.common.*;
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.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.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.modifiers.Condition;
import com.gempukku.lotro.logic.modifiers.HasInitiativeModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import com.gempukku.lotro.logic.modifiers.condition.AndCondition;
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: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 1
* Type: Possession • Support Area
* Game Text: When you play this possession, you may add a [RAIDER] token here. While you can spot 6 [RAIDER] tokens
* and a [RAIDER] Man, the Shadow has initiative, regardless of the Free Peoples players hand. Regroup: Add (1) for
* each [RAIDER] token you can spot. Discard this possession.
*/
public class Card8_059 extends AbstractPermanent {
public Card8_059() {
super(Side.SHADOW, 1, CardType.POSSESSION, Culture.RAIDER, "Corsair War Galley");
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new HasInitiativeModifier(self,
new AndCondition(
new SpotCondition(Culture.RAIDER, Race.MAN),
new Condition() {
@Override
public boolean isFullfilled(LotroGame game) {
return GameUtils.getSpottableTokensTotal(game, Token.RAIDER) >= 6;
}
}
), Side.SHADOW));
}
@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 AddTokenEffect(self, self, Token.RAIDER));
return Collections.singletonList(action);
}
return null;
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendEffect(
new AddTwilightEffect(self, GameUtils.getSpottableTokensTotal(game, Token.RAIDER)));
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,44 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.modifiers.CantTakeArcheryWoundsModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 5
* Type: Minion • Man
* Strength: 11
* Vitality: 3
* Site: 4
* Game Text: Southron. Archer. While you can spot another [RAIDER] Man, Ring-bound companions cannot take archery
* wounds.
*/
public class Card8_060 extends AbstractMinion {
public Card8_060() {
super(5, 11, 3, 4, Race.MAN, Culture.RAIDER, "Haradrim Marksman", null, true);
addKeyword(Keyword.SOUTHRON);
addKeyword(Keyword.ARCHER);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new CantTakeArcheryWoundsModifier(self,
new SpotCondition(Filters.not(self), Culture.RAIDER, Race.MAN),
Filters.and(CardType.COMPANION, Keyword.RING_BOUND)));
}
}

View File

@@ -1,67 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
import com.gempukku.lotro.common.CardType;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Side;
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.AbstractPermanent;
import com.gempukku.lotro.logic.effects.AddTwilightEffect;
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
import com.gempukku.lotro.logic.modifiers.HasInitiativeModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import com.gempukku.lotro.logic.modifiers.condition.AndCondition;
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
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: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 1
* Type: Condition • Support Area
* Game Text: While you can spot a [RAIDER] minion at site 4K, the Shadow has initiative, regardless of the Free Peoples
* players hand. Response: If a companion is played, discard a [RAIDER] card from hand to add (5).
* Discard this condition.
*/
public class Card8_061 extends AbstractPermanent {
public Card8_061() {
super(Side.SHADOW, 1, CardType.CONDITION, Culture.RAIDER, "Haradwaith", null, true);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new HasInitiativeModifier(self,
new AndCondition(
new LocationCondition(Filters.siteNumber(4), Filters.siteBlock(SitesBlock.KING)),
new SpotCondition(Culture.RAIDER, CardType.MINION)
), Side.SHADOW));
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.played(game, effectResult, CardType.COMPANION)
&& PlayConditions.canDiscardFromHand(game, playerId, 1, Culture.RAIDER)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Culture.RAIDER));
action.appendEffect(
new AddTwilightEffect(self, 5));
action.appendEffect(
new SelfDiscardEffect(self));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,43 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.cardtype.AbstractMinion;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotBurdensCondition;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 5
* Type: Minion • Man
* Strength: 11
* Vitality: 3
* Site: 4
* Game Text: Easterling. While you can spot 4 burdens, Heavy Axeman is strength +4 and fierce.
*/
public class Card8_062 extends AbstractMinion {
public Card8_062() {
super(5, 11, 3, 4, Race.MAN, Culture.RAIDER, "Heavy Axeman", null, true);
addKeyword(Keyword.EASTERLING);
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new StrengthModifier(self, self, new SpotBurdensCondition(4), 4));
modifiers.add(
new KeywordModifier(self, self, new SpotBurdensCondition(4), Keyword.FIERCE, 1));
return modifiers;
}
}

View File

@@ -1,40 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.modifiers.CantTakeWoundsModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import com.gempukku.lotro.logic.modifiers.condition.AndCondition;
import com.gempukku.lotro.logic.modifiers.condition.NotCondition;
import com.gempukku.lotro.logic.modifiers.condition.PhaseCondition;
import java.util.Collections;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 3
* Type: Condition • Support Area
* Game Text: While you can spot a mounted [RAIDER] Man, [RAIDER] Men cannot take wounds (except during skirmishes).
*/
public class Card8_063 extends AbstractPermanent {
public Card8_063() {
super(Side.SHADOW, 3, CardType.CONDITION, Culture.RAIDER, "Line of Defense");
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
return Collections.singletonList(
new CantTakeWoundsModifier(self,
new AndCondition(
new SpotCondition(Culture.RAIDER, Race.MAN, Filters.mounted),
new NotCondition(new PhaseCondition(Phase.SKIRMISH))
), Filters.and(Culture.RAIDER, Race.MAN)));
}
}

View File

@@ -1,55 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.cardtype.AbstractAttachable;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.condition.InitiativeCondition;
import com.gempukku.lotro.logic.modifiers.condition.MinThreatCondition;
import com.gempukku.lotro.logic.modifiers.condition.OrCondition;
import java.util.LinkedList;
import java.util.List;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 3
* Type: Possession • Mount
* Strength: +3
* Game Text: Bearer must be a Southron. Bearer is fierce. While you have initiative or can spot 4 threats, bearer
* is damage +1.
*/
public class Card8_064 extends AbstractAttachable {
public Card8_064() {
super(Side.SHADOW, CardType.POSSESSION, 3, Culture.RAIDER, PossessionClass.MOUNT, "Mûmakil");
}
@Override
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Keyword.SOUTHRON;
}
@Override
public int getStrength() {
return 3;
}
@Override
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
List<Modifier> modifiers = new LinkedList<>();
modifiers.add(
new KeywordModifier(self, Filters.hasAttached(self), Keyword.FIERCE));
modifiers.add(
new KeywordModifier(self, Filters.hasAttached(self),
new OrCondition(
new InitiativeCondition(Side.SHADOW),
new MinThreatCondition(4)
), Keyword.DAMAGE, 1));
return modifiers;
}
}

View File

@@ -1,69 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
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.cardtype.AbstractPermanent;
import com.gempukku.lotro.logic.effects.*;
import com.gempukku.lotro.logic.effects.choose.ChooseAndPutCardFromDiscardOnTopOfDeckEffect;
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
* Side: Shadow
* Culture: Raider
* Twilight Cost: 2
* Type: Possession • Support Area
* Game Text: Shadow: Remove a threat or discard a [RAIDER] card from hand to add a [RAIDER] token here.
* Regroup: Remove 2 [RAIDER] tokens here to place a [RAIDER] card from your discard pile on top of your draw deck.
*/
public class Card8_065 extends AbstractPermanent {
public Card8_065() {
super(Side.SHADOW, 2, CardType.POSSESSION, Culture.RAIDER, "Ships of Great Draught");
}
@Override
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.SHADOW, self, 0)
&& (PlayConditions.canRemoveThreat(game, self, 1)
|| PlayConditions.canDiscardFromHand(game, playerId, 1, Culture.RAIDER))) {
ActivateCardAction action = new ActivateCardAction(self);
List<Effect> possibleCosts = new LinkedList<>();
possibleCosts.add(
new RemoveThreatsEffect(self, 1) {
@Override
public String getText(LotroGame game) {
return "Remove a threat";
}
});
possibleCosts.add(
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 1, Culture.RAIDER) {
@Override
public String getText(LotroGame game) {
return "Discard a RAIDER card from hand";
}
});
action.appendCost(
new ChoiceEffect(action, playerId, possibleCosts));
action.appendEffect(
new AddTokenEffect(self, self, Token.RAIDER));
return Collections.singletonList(action);
}
if (PlayConditions.canUseShadowCardDuringPhase(game, Phase.REGROUP, self, 0)
&& PlayConditions.canRemoveTokens(game, self, Token.RAIDER, 2)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new RemoveTokenEffect(self, self, Token.RAIDER, 2));
action.appendEffect(
new ChooseAndPutCardFromDiscardOnTopOfDeckEffect(action, playerId, 1, 1, Culture.RAIDER));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -1,59 +0,0 @@
package com.gempukku.lotro.cards.set8.raider;
import com.gempukku.lotro.common.*;
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.PlayEventAction;
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
import com.gempukku.lotro.logic.decisions.DecisionResultInvalidException;
import com.gempukku.lotro.logic.decisions.IntegerAwaitingDecision;
import com.gempukku.lotro.logic.effects.*;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.timing.PlayConditions;
/**
* Set: Siege of Gondor
* Side: Shadow
* Culture: Raider
* Twilight Cost: 1
* Type: Event • Skirmish
* Game Text: Make a corsair strength +1 for each [RAIDER] token you spot (limit +6). If you have initiative, you may
* place this event on top of your draw deck.
*/
public class Card8_066 extends AbstractEvent {
public Card8_066() {
super(Side.SHADOW, 1, Culture.RAIDER, "Wind That Sped Ships", Phase.SKIRMISH);
}
@Override
public PlayEventAction getPlayEventCardAction(final String playerId, LotroGame game, final PhysicalCard self) {
final PlayEventAction action = new PlayEventAction(self);
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose Corsair", Keyword.CORSAIR) {
@Override
protected void cardSelected(final LotroGame game, final PhysicalCard card) {
int count = Math.min(6, GameUtils.getSpottableTokensTotal(game, Token.RAIDER));
IntegerAwaitingDecision spotDecision = new IntegerAwaitingDecision(1, "How many RAIDER tokens you wish to spot?", 0, count) {
@Override
public void decisionMade(String result) throws DecisionResultInvalidException {
int value = getValidatedResult(result);
action.appendEffect(
new AddUntilEndOfPhaseModifierEffect(
new StrengthModifier(self, card, value)));
if (PlayConditions.hasInitiative(game, Side.SHADOW))
action.appendEffect(
new OptionalEffect(action, playerId,
new PutPlayedEventOnTopOfDeckEffect(self)));
}
};
spotDecision.setDefaultValue(count);
action.appendEffect(
new PlayoutDecisionEffect(playerId, spotDecision));
}
});
return action;
}
}

View File

@@ -1,35 +0,0 @@
{
8_57: {
title: Corsair Marauder
culture: Raider
twilight: 4
type: minion
race: Man
strength: 9
vitality: 2
site: 4
keyword: Corsair
effects: {
type: trigger
optional: true
trigger: {
type: played
filter: self
}
requires: {
type: canSpot
filter: not(self),corsair
}
cost: {
type: discard
filter: choose(possession)
}
effect: {
type: addTokens
culture: raider
filter: choose(hasToken(raider))
count: 2
}
}
}
}

View File

@@ -1,9 +1,6 @@
package com.gempukku.lotro.cards.build.field.effect.modifier;
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
import com.gempukku.lotro.cards.build.FilterableSource;
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
import com.gempukku.lotro.cards.build.ModifierSource;
import com.gempukku.lotro.cards.build.*;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.logic.modifiers.CantTakeArcheryWoundsModifier;
import org.json.simple.JSONObject;
@@ -11,13 +8,15 @@ import org.json.simple.JSONObject;
public class CantTakeArcheryWounds implements ModifierSourceProducer {
@Override
public ModifierSource getModifierSource(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(object, "filter");
FieldUtils.validateAllowedFields(object, "filter", "requires");
final JSONObject[] conditionArray = FieldUtils.getObjectArray(object.get("requires"), "requires");
final String filter = FieldUtils.getString(object.get("filter"), "filter");
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
final Requirement[] requirements = environment.getRequirementFactory().getRequirements(conditionArray, environment);
return actionContext -> new CantTakeArcheryWoundsModifier(actionContext.getSource(),
filterableSource.getFilterable(actionContext));
new RequirementCondition(requirements, actionContext), filterableSource.getFilterable(actionContext));
}
}

View File

@@ -0,0 +1,23 @@
package com.gempukku.lotro.cards.build.field.effect.requirement;
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
import com.gempukku.lotro.cards.build.FilterableSource;
import com.gempukku.lotro.cards.build.InvalidCardDefinitionException;
import com.gempukku.lotro.cards.build.Requirement;
import com.gempukku.lotro.cards.build.field.FieldUtils;
import com.gempukku.lotro.logic.timing.PlayConditions;
import org.json.simple.JSONObject;
public class CanPlayFromDiscard implements RequirementProducer {
@Override
public Requirement getPlayRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(object, "cost", "filter");
final int cost = FieldUtils.getInteger(object.get("count"), "count", 0);
final String filter = FieldUtils.getString(object.get("filter"), "filter");
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);
return (actionContext) -> PlayConditions.canPlayFromDiscard(actionContext.getPerformingPlayer(), actionContext.getGame(), cost, filterableSource.getFilterable(actionContext));
}
}

View File

@@ -17,6 +17,7 @@ public class RequirementFactory {
requirementProducers.put("and", new AndRequirementProducer());
requirementProducers.put("or", new OrRequirementProducer());
requirementProducers.put("canmove", new CanMove());
requirementProducers.put("canplayfromdiscard", new CanPlayFromDiscard());
requirementProducers.put("canselfbeplayed", new CanSelfBePlayed());
requirementProducers.put("canspot", new CanSpot());
requirementProducers.put("canspotburdens", new CanSpotBurdens());

View File

@@ -230,6 +230,8 @@ public class GameUtils {
}
else if(memory.equals("shadow")) {
found = getFirstShadowPlayer(context.getGame());
} else if (memory.equals("self")) {
found = GameUtils.getAppendedNames(Collections.singleton(context.getSource()));
}
else {
found = GameUtils.getAppendedNames(context.getCardsFromMemory(memory));