Added all Gondor cards from Second Edition
This commit is contained in:
@@ -642,6 +642,195 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_116": {
|
||||
"title": "Ranger's Guile",
|
||||
"culture": "gondor",
|
||||
"cost": 0,
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": [
|
||||
{
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(ranger)",
|
||||
"amount": 1,
|
||||
"memorize": "chosenRanger"
|
||||
},
|
||||
{
|
||||
"type": "addTrigger",
|
||||
"trigger": {
|
||||
"type": "winsSkirmish",
|
||||
"filter": "memory(chosenRanger)"
|
||||
},
|
||||
"effect": {
|
||||
"type": "choice",
|
||||
"texts": [
|
||||
"Play fellowship's next site",
|
||||
"Wound a roaming minion twice"
|
||||
],
|
||||
"effects": [
|
||||
{
|
||||
"type": "playNextSite"
|
||||
},
|
||||
{
|
||||
"type": "wound",
|
||||
"filter": "choose(minion)",
|
||||
"times": 2
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"40_117": {
|
||||
"title": "*Ranger's Sword",
|
||||
"culture": "gondor",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "hand weapon",
|
||||
"strength": 2,
|
||||
"target": "name(Aragorn)",
|
||||
"effects": {
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "addKeyword",
|
||||
"filter": "bearer",
|
||||
"keyword": "damage+1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_118": {
|
||||
"title": "*Ring of Barahir",
|
||||
"subtitle": "Heirloom of Kings",
|
||||
"culture": "gondor",
|
||||
"cost": 0,
|
||||
"type": "artifact",
|
||||
"possession": "ring",
|
||||
"target": "name(Aragorn)",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": [
|
||||
"fellowship",
|
||||
"regroup"
|
||||
],
|
||||
"cost": {
|
||||
"type": "discardFromHand",
|
||||
"forced": false,
|
||||
"count": 2,
|
||||
"filter": "choose(culture(gondor))"
|
||||
},
|
||||
"effect": {
|
||||
"type": "heal",
|
||||
"filter": "choose(unbound,companion)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_119": {
|
||||
"title": "*The Saga of Elendil",
|
||||
"culture": "gondor",
|
||||
"cost": 1,
|
||||
"type": "condition",
|
||||
"vitality": 1,
|
||||
"keyword": "tale",
|
||||
"target": "culture(gondor),man,companion",
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "skirmish",
|
||||
"cost": [
|
||||
{
|
||||
"type": "memorize",
|
||||
"memory": "bearer",
|
||||
"filter": "bearer"
|
||||
},
|
||||
{
|
||||
"type": "discard",
|
||||
"filter": "self"
|
||||
}
|
||||
],
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"amount": 2,
|
||||
"filter": "memory(bearer)"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_120": {
|
||||
"title": "Sentinels of Numenor",
|
||||
"culture": "gondor",
|
||||
"cost": 0,
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(culture(gondor),companion)",
|
||||
"memorize": "chosenCompanion",
|
||||
"amount": {
|
||||
"type": "condition",
|
||||
"condition": [
|
||||
{
|
||||
"type": "fierceSkirmish"
|
||||
},
|
||||
{
|
||||
"type": "memoryMatches",
|
||||
"memory": "chosenCompanion",
|
||||
"filter": "inSkirmish"
|
||||
}
|
||||
],
|
||||
"true": 4,
|
||||
"false": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_121": {
|
||||
"title": "Sword of the North",
|
||||
"culture": "gondor",
|
||||
"cost": 1,
|
||||
"type": "possession",
|
||||
"possession": "hand weapon",
|
||||
"strength": 2,
|
||||
"target": "culture(gondor),man",
|
||||
"effects": {
|
||||
"type": "modifier",
|
||||
"modifier": {
|
||||
"type": "addKeyword",
|
||||
"condition": {
|
||||
"type": "location",
|
||||
"filter": "your"
|
||||
},
|
||||
"filter": "bearer",
|
||||
"keyword": "damage+1"
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_122": {
|
||||
"title": "Swordarm of the White Tower",
|
||||
"culture": "gondor",
|
||||
"cost": 0,
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(culture(gondor),companion)",
|
||||
"memorize": "chosenCompanion",
|
||||
"amount": {
|
||||
"type": "condition",
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "memory(chosenCompanion),defender"
|
||||
},
|
||||
"true": 4,
|
||||
"false": 2
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"40_313": {
|
||||
"title": "Athelas",
|
||||
"subtitle": "Asëa Aranion",
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gondor;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.filters.Filters;
|
||||
import com.gempukku.lotro.game.AbstractActionProxy;
|
||||
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.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseActionProxyEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChoiceEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndWoundCharactersEffect;
|
||||
import com.gempukku.lotro.logic.effects.PlayNextSiteEffect;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.EffectResult;
|
||||
import com.gempukku.lotro.logic.timing.TriggerConditions;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Ranger's Guile
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1R116
|
||||
* Game Text: Make a ranger strength +1. If that ranger wins this skirmish, you may play the fellowship's next site
|
||||
* (replacing opponent's site if necessary) or wound a roaming minion twice.
|
||||
*/
|
||||
public class Card40_116 extends AbstractEvent {
|
||||
public Card40_116() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Ranger's Guile", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, 1, Keyword.RANGER) {
|
||||
@Override
|
||||
protected void selectedCharacterCallback(final PhysicalCard selectedCharacter) {
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseActionProxyEffect(
|
||||
new AbstractActionProxy() {
|
||||
@Override
|
||||
public List<? extends OptionalTriggerAction> getOptionalAfterTriggers(String playerId, LotroGame game, EffectResult effectResult) {
|
||||
if (TriggerConditions.winsSkirmish(game, effectResult, selectedCharacter)
|
||||
&& playerId.equals(self.getOwner())) {
|
||||
OptionalTriggerAction action = new OptionalTriggerAction(self);
|
||||
action.setVirtualCardAction(true);
|
||||
List<Effect> possibleEffects = new ArrayList<Effect>(2);
|
||||
possibleEffects.add(
|
||||
new PlayNextSiteEffect(action, playerId));
|
||||
possibleEffects.add(
|
||||
new ChooseAndWoundCharactersEffect(action, playerId, 1, 1, 2,
|
||||
Filters.roamingMinion) {
|
||||
@Override
|
||||
public String getText(LotroGame game) {
|
||||
return "Wound a roaming minion twice";
|
||||
}
|
||||
});
|
||||
action.appendEffect(
|
||||
new ChoiceEffect(action, playerId, possibleEffects));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gondor;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Keyword;
|
||||
import com.gempukku.lotro.common.PossessionClass;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
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.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Ranger's Sword
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Hand Weapon
|
||||
* Strength: +2
|
||||
* Card Number: 1U117
|
||||
* Game Text: Bearer must be Aragorn. He is damage +1.
|
||||
*/
|
||||
public class Card40_117 extends AbstractAttachableFPPossession {
|
||||
public Card40_117() {
|
||||
super(1, 2, 0, Culture.GONDOR, PossessionClass.HAND_WEAPON, "Ranger's Sword", null, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.aragorn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
return Collections.singletonList(new KeywordModifier(self, Filters.hasAttached(self), Keyword.DAMAGE));
|
||||
}
|
||||
}
|
||||
@@ -1,54 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gondor;
|
||||
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Filterable;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.PossessionClass;
|
||||
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.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndDiscardCardsFromHandEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseAndHealCharactersEffect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *Ring of Barahir, Heirloom of Kings
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 0
|
||||
* Type: Artifact - Ring
|
||||
* Card Number: 1R118
|
||||
* Game Text: Bearer must be Aragorn.
|
||||
* Fellowship or Regroup: Discard 2 [GONDOR] cards from hand to heal an unbound companion.
|
||||
*/
|
||||
public class Card40_118 extends AbstractAttachableFPPossession {
|
||||
public Card40_118() {
|
||||
super(0, 0, 0, Culture.GONDOR, PossessionClass.RING, "Ring of Barahir", "Heirloom of Kings", true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.aragorn;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if ((PlayConditions.canUseFPCardDuringPhase(game, Phase.FELLOWSHIP, self)
|
||||
|| PlayConditions.canUseFPCardDuringPhase(game, Phase.REGROUP, self))
|
||||
&& PlayConditions.canDiscardFromHand(game, playerId, 2, Culture.GONDOR)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(
|
||||
new ChooseAndDiscardCardsFromHandEffect(action, playerId, false, 2, Culture.GONDOR));
|
||||
action.appendEffect(
|
||||
new ChooseAndHealCharactersEffect(action, playerId, Filters.unboundCompanion));
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gondor;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.filters.Filter;
|
||||
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.AbstractAttachable;
|
||||
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.logic.effects.SelfDiscardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: *The Saga of Elendil
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 1
|
||||
* Type: Condition - Companion
|
||||
* Vitality: +1
|
||||
* Card Number: 1R119
|
||||
* Game Text: Tale. Bearer must be a [GONDOR] Man. Skirmish: Discard this condition to make bearer strength +2.
|
||||
*/
|
||||
public class Card40_119 extends AbstractAttachable {
|
||||
public Card40_119() {
|
||||
super(Side.FREE_PEOPLE, CardType.CONDITION, 1, Culture.GONDOR, null, "The Saga of Elendil", null, true);
|
||||
addKeyword(Keyword.TALE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filter getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.and(Culture.GONDOR, CardType.COMPANION);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends ActivateCardAction> getPhaseActionsInPlay(String playerId, LotroGame game, PhysicalCard self) {
|
||||
if (PlayConditions.canUseFPCardDuringPhase(game, Phase.SKIRMISH, self)) {
|
||||
ActivateCardAction action = new ActivateCardAction(self);
|
||||
action.appendCost(new SelfDiscardEffect(self));
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, Filters.sameCard(self.getAttachedTo()), 2)));
|
||||
|
||||
return Collections.singletonList(action);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVitality() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gondor;
|
||||
|
||||
import com.gempukku.lotro.common.CardType;
|
||||
import com.gempukku.lotro.common.Culture;
|
||||
import com.gempukku.lotro.common.Phase;
|
||||
import com.gempukku.lotro.common.Side;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.choose.ChooseAndAddUntilEOPStrengthBonusEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.condition.FierceSkirmishCondition;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.ConditionEvaluator;
|
||||
|
||||
/**
|
||||
* Title: Sentinels of Numenor
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1C120
|
||||
* Game Text: Make a [GONDOR] companion strength +2 or make a [GONDOR] companion strength +4 if that companion is in
|
||||
* a fierce skirmish.
|
||||
*/
|
||||
public class Card40_120 extends AbstractEvent {
|
||||
public Card40_120() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Sentinels of Numenor", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, PhysicalCard self) {
|
||||
PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseAndAddUntilEOPStrengthBonusEffect(action, self, playerId, new ConditionEvaluator(2, 4, new FierceSkirmishCondition()),
|
||||
Culture.GONDOR, CardType.COMPANION));
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gondor;
|
||||
|
||||
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.AbstractAttachableFPPossession;
|
||||
import com.gempukku.lotro.logic.modifiers.KeywordModifier;
|
||||
import com.gempukku.lotro.logic.modifiers.Modifier;
|
||||
import com.gempukku.lotro.logic.modifiers.condition.LocationCondition;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Title: Sword of the North
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 1
|
||||
* Type: Possession - Hand Weapon
|
||||
* Strength: +2
|
||||
* Card Number: 1C121
|
||||
* Game Text: Bearer must be a [GONDOR] Man. While at a site from your adventure deck, bearer is damage +1.
|
||||
*/
|
||||
public class Card40_121 extends AbstractAttachableFPPossession {
|
||||
public Card40_121() {
|
||||
super(1, 2, 0, Culture.GONDOR, PossessionClass.HAND_WEAPON, "Sword of the North");
|
||||
}
|
||||
|
||||
@Override
|
||||
public Filterable getValidTargetFilter(String playerId, LotroGame game, PhysicalCard self) {
|
||||
return Filters.and(Culture.GONDOR, Race.MAN);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<? extends Modifier> getInPlayModifiers(LotroGame game, PhysicalCard self) {
|
||||
KeywordModifier modifier = new KeywordModifier(self, Filters.hasAttached(self),
|
||||
new LocationCondition(Filters.owner(self.getOwner())), Keyword.DAMAGE, 1);
|
||||
return Collections.singletonList(modifier);
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package com.gempukku.lotro.cards.set40.gondor;
|
||||
|
||||
import com.gempukku.lotro.common.*;
|
||||
import com.gempukku.lotro.game.PhysicalCard;
|
||||
import com.gempukku.lotro.game.state.LotroGame;
|
||||
import com.gempukku.lotro.logic.actions.PlayEventAction;
|
||||
import com.gempukku.lotro.logic.cardtype.AbstractEvent;
|
||||
import com.gempukku.lotro.logic.effects.AddUntilEndOfPhaseModifierEffect;
|
||||
import com.gempukku.lotro.logic.effects.ChooseActiveCardEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.StrengthModifier;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
|
||||
/**
|
||||
* Title: Swordarm of the White Tower
|
||||
* Set: Second Edition
|
||||
* Side: Free
|
||||
* Culture: Gondor
|
||||
* Twilight Cost: 0
|
||||
* Type: Event - Skirmish
|
||||
* Card Number: 1C122
|
||||
* Game Text: Make a [GONDOR] companion strength +2 or make a [GONDOR] companion strength +4 if he is defender +1.
|
||||
*/
|
||||
public class Card40_122 extends AbstractEvent {
|
||||
public Card40_122() {
|
||||
super(Side.FREE_PEOPLE, 0, Culture.GONDOR, "Swordarm of the White Tower", Phase.SKIRMISH);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PlayEventAction getPlayEventCardAction(String playerId, LotroGame game, final PhysicalCard self) {
|
||||
final PlayEventAction action = new PlayEventAction(self);
|
||||
action.appendEffect(
|
||||
new ChooseActiveCardEffect(self, playerId, "Choose GONDOR companion", Culture.GONDOR, CardType.COMPANION) {
|
||||
@Override
|
||||
protected void cardSelected(LotroGame game, PhysicalCard card) {
|
||||
int bonus = PlayConditions.canSpot(game, card, Keyword.DEFENDER)?4:2;
|
||||
action.appendEffect(
|
||||
new AddUntilEndOfPhaseModifierEffect(
|
||||
new StrengthModifier(self, card, bonus)));
|
||||
}
|
||||
});
|
||||
return action;
|
||||
}
|
||||
}
|
||||
@@ -49,17 +49,16 @@ public class ValueResolver {
|
||||
JSONObject object = (JSONObject) value;
|
||||
final String type = FieldUtils.getString(object.get("type"), "type");
|
||||
if (type.equalsIgnoreCase("condition")) {
|
||||
final Requirement condition = environment.getRequirementFactory().getRequirement((JSONObject) object.get("condition"), environment);
|
||||
final JSONObject[] conditionArray = FieldUtils.getObjectArray(object.get("condition"), "condition");
|
||||
final Requirement[] conditions = environment.getRequirementFactory().getRequirements(conditionArray, environment);
|
||||
int trueValue = FieldUtils.getInteger(object.get("true"), "true");
|
||||
int falseValue = FieldUtils.getInteger(object.get("false"), "false");
|
||||
return (actionContext) -> {
|
||||
return (Evaluator) (game, cardAffected) -> {
|
||||
final boolean accepts = condition.accepts(actionContext);
|
||||
if (accepts)
|
||||
return trueValue;
|
||||
else
|
||||
return (actionContext) -> (Evaluator) (game, cardAffected) -> {
|
||||
for (Requirement condition : conditions) {
|
||||
if (!condition.accepts(actionContext))
|
||||
return falseValue;
|
||||
};
|
||||
}
|
||||
return trueValue;
|
||||
};
|
||||
} else if (type.equalsIgnoreCase("forEachInMemory")) {
|
||||
final String memory = FieldUtils.getString(object.get("memory"), "memory");
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.gempukku.lotro.cards.build.field.effect.requirement;
|
||||
|
||||
import com.gempukku.lotro.cards.build.CardGenerationEnvironment;
|
||||
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.common.Phase;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import org.json.simple.JSONObject;
|
||||
|
||||
public class FierceSkirmish implements RequirementProducer {
|
||||
@Override
|
||||
public Requirement getPlayRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(object);
|
||||
|
||||
return (actionContext) -> PlayConditions.isPhase(actionContext.getGame(), Phase.SKIRMISH)
|
||||
&& actionContext.getGame().getGameState().isFierceSkirmishes();
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@ public class RequirementFactory {
|
||||
requirementProducers.put("memorymatches", new MemoryMatches());
|
||||
requirementProducers.put("cantspotfpcultures", new CantSpotFPCultures());
|
||||
requirementProducers.put("haveinitiative", new HaveInitiative());
|
||||
requirementProducers.put("fierceskirmish", new FierceSkirmish());
|
||||
}
|
||||
|
||||
public Requirement getRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
|
||||
Reference in New Issue
Block a user