10 more Gondor cards

This commit is contained in:
marcin.sciesinski
2019-08-04 23:54:08 -07:00
parent cd8bfc582e
commit e14bc1ea2b
9 changed files with 476 additions and 1 deletions

View File

@@ -0,0 +1,56 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.modifiers.evaluator.CountSpottableEvaluator;
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.GameState;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.ModifiersQuerying;
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
import java.util.Collections;
import java.util.List;
/**
* Title: *Boromir, Champion of Minas Tirith
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 3
* Type: Companion - Man
* Strength: 7
* Vitality: 3
* Resistance: 6
* Card Number: 1R101
* Game Text: Ranger. Boromir is strength +1 for each wound on each character in his skirmish.
*/
public class Card40_101 extends AbstractCompanion {
public Card40_101() {
super(3, 7, 3, 6, Culture.GONDOR, Race.MAN, null, "Boromor",
"Champion of Minas Tirith", true);
addKeyword(Keyword.RANGER);
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
StrengthModifier modifier = new StrengthModifier(
self, self, null,
new Evaluator() {
@Override
public int evaluateExpression(GameState gameState, ModifiersQuerying modifiersQuerying, PhysicalCard cardAffected) {
int woundCount = 0;
for (PhysicalCard physicalCard : Filters.filterActive(gameState, modifiersQuerying, Filters.character, Filters.inSkirmish, Filters.wounded)) {
woundCount += gameState.getWounds(physicalCard);
}
return woundCount;
}
});
return Collections.singletonList(modifier);
}
}

View File

@@ -0,0 +1,48 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractCompanion;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.SelfExertEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
import com.gempukku.lotro.common.Culture;
import com.gempukku.lotro.common.Phase;
import com.gempukku.lotro.common.Race;
import com.gempukku.lotro.common.Signet;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import java.util.Collections;
import java.util.List;
/**
* Title: *Boromir, Son of Denethor
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 3
* Type: Companion - Man
* Strength: 7
* Vitality: 3
* Resistance: 6
* Card Number: 1U102
* Game Text: Skirmish: Exert Boromir to make a Hobbit strength +3.
*/
public class Card40_102 extends AbstractCompanion {
public Card40_102() {
super(3, 7, 3, 6, Culture.GONDOR, Race.MAN, null, "Boromir", "Son of Denethor", true);
}
@Override
protected List<ActivateCardAction> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, self)) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(new SelfExertEffect(action, self));
action.appendEffect(
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 3, Race.HOBBIT));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,64 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.CancelSkirmishEffect;
import com.gempukku.lotro.cards.effects.PreventableEffect;
import com.gempukku.lotro.cards.effects.RemoveTwilightEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.GameUtils;
import com.gempukku.lotro.logic.actions.ActivateCardAction;
import com.gempukku.lotro.logic.actions.SubAction;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.Collections;
import java.util.List;
/**
* Title: *Boromir's Gauntlets
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Possession - Gauntlets
* Card Number: 1C103
* Game Text: Bearer must be a [GONDOR] Man.
* Skirmish: Exert bearer to cancel a skirmish involving bearer. The Shadow player may remove (1) to prevent this.
*/
public class Card40_103 extends AbstractAttachableFPPossession {
public Card40_103() {
super(1, 0, 0, Culture.GONDOR, PossessionClass.GAUNTLETS, "Boromir's Gauntlets", null, true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, Filters.hasAttached(self))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.hasAttached(self)));
action.appendEffect(
new PreventableEffect(action,
new CancelSkirmishEffect(Filters.hasAttached(self)),
GameUtils.getShadowPlayers(game),
new PreventableEffect.PreventionCost() {
@Override
public Effect createPreventionCostForPlayer(SubAction subAction, String playerId) {
return new RemoveTwilightEffect(1);
}
}));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,60 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndDiscardCardsFromPlayEffect;
import com.gempukku.lotro.cards.modifiers.ArcheryTotalModifier;
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.modifiers.Modifier;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Title: *Boromir's Shield
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Possession - Shield
* Card Number: 1U104
* Game Text: Bearer must be a [GONDOR] Man. The minion archery total is -1.
* Regroup: If bearer is Boromir, discard this possession to discard a Shadow possession.
*/
public class Card40_104 extends AbstractAttachableFPPossession {
public Card40_104() {
super(1, 0, 0, Culture.GONDOR, PossessionClass.SHIELD, "Boromir's Shield", null, true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
protected List<? extends Modifier> getNonBasicStatsModifiers(PhysicalCard self) {
ArcheryTotalModifier modifier = new ArcheryTotalModifier(self, Side.SHADOW, -1);
return Collections.singletonList(modifier);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self)
&& PlayConditions.canSpot(game, Filters.hasAttached(self), Filters.boromir)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new ChooseAndDiscardCardsFromPlayEffect(action, playerId, 1, 1, Side.SHADOW, CardType.POSSESSION));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,72 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ChoiceEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.effects.ChooseAndWoundCharactersEffect;
import com.gempukku.lotro.logic.timing.Action;
import com.gempukku.lotro.logic.timing.Effect;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* Title: Bow of the North
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Possession - Ranged Weapon
* Strength: +1
* Card Number: 1C105
* Game Text: Bearer must be a [GONDOR] Man.
* Skirmish: Exert bearer to wound a roaming minion he is skirmishing or exert bearer to wound any minion he
* is skirmishing if at a site from your adventure deck.
*/
public class Card40_105 extends AbstractAttachableFPPossession {
public Card40_105() {
super(1, 1, 0, Culture.GONDOR, PossessionClass.RANGED_WEAPON, "Bow of the North");
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, Filters.hasAttached(self))) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Filters.hasAttached(self)));
List<Effect> possibleEffects = new ArrayList<Effect>(2);
possibleEffects.add(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.roamingMinion, Filters.inSkirmishAgainst(Filters.hasAttached(self))) {
@Override
public String getText(LotroGame game) {
return "Wound a roaming minion in skirmish against bearer";
}
});
if (PlayConditions.location(game, Filters.owner(playerId)))
possibleEffects.add(
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, Filters.inSkirmishAgainst(Filters.hasAttached(self))) {
@Override
public String getText(LotroGame game) {
return "Wound any minion in skirmish against bearer";
}
});
action.appendEffect(
new ChoiceEffect(action, playerId, possibleEffects));
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,48 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractEvent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.actions.PlayEventAction;
import com.gempukku.lotro.cards.effects.AddUntilStartOfPhaseModifierEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
import com.gempukku.lotro.common.*;
import com.gempukku.lotro.game.PhysicalCard;
import com.gempukku.lotro.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
/**
* Title: Elendil!
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Event - Maneuver
* Card Number: 1C107
* Game Text: Exert a [GONDOR] companion to make him defender +1 until the regroup phase.
*/
public class Card40_107 extends AbstractEvent {
public Card40_107() {
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Elendil!", Phase.MANEUVER);
}
@Override
public boolean checkPlayRequirements(String playerId, LotroGame game, PhysicalCard self, int withTwilightRemoved, int twilightModifier, boolean ignoreRoamingPenalty, boolean ignoreCheckingDeadPile) {
return super.checkPlayRequirements(playerId, game, self, withTwilightRemoved, twilightModifier, ignoreRoamingPenalty, ignoreCheckingDeadPile)
&& PlayConditions.canExert(self, game, Culture.GONDOR, CardType.COMPANION);
}
@Override
public PlayEventAction getPlayCardAction(String playerId, LotroGame game, final PhysicalCard self, int twilightModifier, boolean ignoreRoamingPenalty) {
final PlayEventAction action = new PlayEventAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, Culture.GONDOR, CardType.COMPANION) {
@Override
protected void forEachCardExertedCallback(PhysicalCard character) {
action.appendEffect(
new AddUntilStartOfPhaseModifierEffect(
new KeywordModifier(self, character, Keyword.DEFENDER, 1), Phase.REGROUP));
}
});
return action;
}
}

View File

@@ -0,0 +1,59 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractAttachableFPPossession;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.effects.ReplaceInSkirmishEffect;
import com.gempukku.lotro.cards.effects.choose.ChooseAndExertCharactersEffect;
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.effects.ChooseActiveCardEffect;
import com.gempukku.lotro.logic.timing.Action;
import java.util.Collections;
import java.util.List;
/**
* Title: *Horn of Gondor
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 0
* Type: Possession - Horn
* Card Number: 1U109
* Game Text: Bearer must be a [GONDOR] Man.
* Skirmish: Exert bearer twice to have another companion replace this companion in this skirmish.
*/
public class Card40_109 extends AbstractAttachableFPPossession {
public Card40_109() {
super(0, 0, 0, Culture.GONDOR, PossessionClass.HORN, "Horn of Gondor", null, true);
}
@Override
protected Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
return Filters.and(Culture.GONDOR, Race.MAN);
}
@Override
protected List<? extends Action> getExtraInPlayPhaseActions(String playerId, LotroGame game, final PhysicalCard self) {
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)
&& PlayConditions.canExert(self, game, 2, Filters.hasAttached(self))) {
final ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ChooseAndExertCharactersEffect(action, playerId, 1, 1, 2, Filters.hasAttached(self)));
if (PlayConditions.isActive(game, Filters.inSkirmish, Filters.hasAttached(self)))
action.appendEffect(
new ChooseActiveCardEffect(self, playerId, "Choose a companion to replace in skirmish", CardType.COMPANION, Filters.notAssignedToSkirmish) {
@Override
protected void cardSelected(LotroGame game, PhysicalCard card) {
action.appendEffect(
new ReplaceInSkirmishEffect(card, Filters.hasAttached(self)));
}
});
return Collections.singletonList(action);
}
return null;
}
}

View File

@@ -0,0 +1,66 @@
package com.gempukku.lotro.cards.set40.gondor;
import com.gempukku.lotro.cards.AbstractPermanent;
import com.gempukku.lotro.cards.PlayConditions;
import com.gempukku.lotro.cards.TriggerConditions;
import com.gempukku.lotro.cards.effects.ExertCharactersEffect;
import com.gempukku.lotro.cards.effects.PlayNextSiteEffect;
import com.gempukku.lotro.cards.effects.SelfDiscardEffect;
import com.gempukku.lotro.cards.modifiers.MinionSiteNumberModifier;
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.modifiers.Modifier;
import com.gempukku.lotro.logic.modifiers.SpotCondition;
import com.gempukku.lotro.logic.timing.EffectResult;
import com.gempukku.lotro.logic.timing.results.CharacterWonSkirmishResult;
import java.util.Collections;
import java.util.List;
/**
* Title: *Into the Wild
* Set: Second Edition
* Side: Free
* Culture: Gondor
* Twilight Cost: 1
* Type: Condition - Support Area
* Card Number: 1U110
* Game Text: While you can spot a ranger, the site number of each minion in play is +1.
* Response: If a ranger wins a skirmish, exert that ranger and discard this condition to play the fellowship's
* next site (replacing opponent's site if necessary).
*/
public class Card40_110 extends AbstractPermanent {
public Card40_110() {
super(Side.FREE_PEOPLE, 1, CardType.CONDITION, Culture.GONDOR, Zone.SUPPORT, "Into the Wild", null, true);
}
@Override
public List<? extends Modifier> getAlwaysOnModifiers(LotroGame game, PhysicalCard self) {
MinionSiteNumberModifier modifier = new MinionSiteNumberModifier(self,
Filters.and(CardType.MINION, Filters.inPlay()), new SpotCondition(Keyword.RANGER), 1);
return Collections.singletonList(modifier);
}
@Override
public List<? extends ActivateCardAction> getOptionalInPlayAfterActions(String playerId, LotroGame game, EffectResult effectResult, PhysicalCard self) {
if (TriggerConditions.winsSkirmish(game, effectResult, Keyword.RANGER)) {
CharacterWonSkirmishResult result = (CharacterWonSkirmishResult) effectResult;
final PhysicalCard winner = result.getWinner();
if (PlayConditions.canExert(self, game, winner)
&& PlayConditions.canSelfDiscard(self, game)) {
ActivateCardAction action = new ActivateCardAction(self);
action.appendCost(
new ExertCharactersEffect(action, self, winner));
action.appendCost(
new SelfDiscardEffect(self));
action.appendEffect(
new PlayNextSiteEffect(action, playerId));
return Collections.singletonList(action);
}
}
return null;
}
}

View File

@@ -235,4 +235,6 @@ gl_theOneRing,1_2
40_87,4_99
40_88,2_26
40_90,1_87
40_98,1_92
40_98,1_92
40_106,1_102
40_108,2_32