Various errata/V1 fixes. Changed the IncrementPerPhaseLimit param to take a ValueResolver rather than a hard-coded int.
This commit is contained in:
@@ -114,14 +114,14 @@
|
||||
{
|
||||
"type": "revealRandomCardsFromHand",
|
||||
"forced": true,
|
||||
"hand": "fp",
|
||||
"hand": "shadowPlayer",
|
||||
"count": 3,
|
||||
"memorize": "revealedCards"
|
||||
},
|
||||
{
|
||||
"type": "putCardsFromHandOnTopOfDeck",
|
||||
"filter": "choose(memory(revealedCards))",
|
||||
"player": "fp"
|
||||
"player": "shadowPlayer"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
},
|
||||
"53_42": {
|
||||
"side": "free_people",
|
||||
"cost": 0,
|
||||
"cost": 1,
|
||||
"culture": "Gondor",
|
||||
"title": "*Horn of Boromir",
|
||||
"type": "possession",
|
||||
@@ -157,7 +157,9 @@
|
||||
"type": "addKeyword",
|
||||
"filter": "choose(uruk-hai)",
|
||||
"keyword": "fierce",
|
||||
"until": "start(regroup)"
|
||||
"until": "start(regroup)",
|
||||
"memorize": "chosenUruk",
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -291,7 +293,7 @@
|
||||
"optional": true,
|
||||
"trigger": {
|
||||
"type": "removesBurden",
|
||||
"filter": "not(hobbit)"
|
||||
"filter": "your,not(hobbit)"
|
||||
},
|
||||
"condition": {
|
||||
"type": "perPhaseLimit",
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
"type": "conditional",
|
||||
"condition": {
|
||||
"type": "memorymatches",
|
||||
"memory": "discardedCard",
|
||||
"memory": "chosenMinion",
|
||||
"filter": "strengthLessThan(7)"
|
||||
},
|
||||
"effect": {
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
]
|
||||
},
|
||||
"151_16": {
|
||||
"title": "My Heart Tells Me",
|
||||
"title": "*My Heart Tells Me",
|
||||
"culture": "gandalf",
|
||||
"cost": 1,
|
||||
"type": "condition",
|
||||
@@ -233,19 +233,32 @@
|
||||
{
|
||||
"type": "activated",
|
||||
"phase": "skirmish",
|
||||
"condition": {
|
||||
"type": "perPhaseLimit",
|
||||
"limit": 3
|
||||
},
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "choose(name(Gandalf))"
|
||||
},
|
||||
"effect": {
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(or(culture(gandalf),culture(elven)),companion)",
|
||||
"amount": {
|
||||
"type": "forEachYouCanSpot",
|
||||
"filter": "culture(elven),ally",
|
||||
"limit": 3
|
||||
}
|
||||
}
|
||||
"effect": [
|
||||
{
|
||||
"type": "modifyStrength",
|
||||
"filter": "choose(or(culture(gandalf),culture(elven)),companion)",
|
||||
"amount": {
|
||||
"type": "forEachYouCanSpot",
|
||||
"filter": "culture(elven),ally",
|
||||
"limit": 3
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "incrementPerPhaseLimit",
|
||||
"limit": {
|
||||
"type": "forEachYouCanSpot",
|
||||
"filter": "culture(elven),ally",
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,6 +1,14 @@
|
||||
<pre style="font-size:80%">
|
||||
<b>Most recent update</b>
|
||||
|
||||
<b>2022 February 20</b>
|
||||
- Fixed The Mirror of Galadriel (1R55) errata operating on the Free People's hand instead of Shadow...oops!
|
||||
- Fixed Horn of Boromir (3R42) errata not including the 1 twilight cost
|
||||
- Fixed The Shire Countryside (3R113) errata triggering from Shadow cards and sites removing burdens
|
||||
- Fixed Cirdan, the Shipwright (10R8) errata not removing events from the discard pile
|
||||
- Fixed My Heart Tells Me (V1_16) not being unique
|
||||
- Fixed The White Council (V1_18) not respecting the +3 limit for the whole phase
|
||||
|
||||
<b>2021 December 26 - A</b>
|
||||
- Fixed Scouring of the Shire (18R112) errata not being unique.
|
||||
- Fixed Fell Voices Call (V1_37) likely crashing due to a bad memory reference.
|
||||
|
||||
@@ -3,11 +3,14 @@ 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.ValueSource;
|
||||
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.ValueResolver;
|
||||
import com.gempukku.lotro.logic.actions.CostToEffectAction;
|
||||
import com.gempukku.lotro.logic.effects.IncrementPhaseLimitEffect;
|
||||
import com.gempukku.lotro.logic.modifiers.evaluator.Evaluator;
|
||||
import com.gempukku.lotro.logic.timing.Effect;
|
||||
import com.gempukku.lotro.logic.timing.PlayConditions;
|
||||
import org.json.simple.JSONObject;
|
||||
@@ -17,12 +20,15 @@ public class IncrementPerPhaseLimit implements EffectAppenderProducer {
|
||||
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
|
||||
FieldUtils.validateAllowedFields(effectObject, "limit", "perPlayer");
|
||||
|
||||
final int limit = FieldUtils.getInteger(effectObject.get("limit"), "limit", 1);
|
||||
final ValueSource limitSource = ValueResolver.resolveEvaluator(effectObject.get("limit"), 1, environment);
|
||||
final boolean perPlayer = FieldUtils.getBoolean(effectObject.get("perPlayer"), "perPlayer", false);
|
||||
|
||||
return new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final Evaluator evaluator = limitSource.getEvaluator(actionContext);
|
||||
final int limit = evaluator.evaluateExpression(actionContext.getGame(), actionContext.getSource());
|
||||
|
||||
if (perPlayer)
|
||||
return new IncrementPhaseLimitEffect(actionContext.getSource(), actionContext.getPerformingPlayer() + "_", limit);
|
||||
else
|
||||
@@ -31,6 +37,9 @@ public class IncrementPerPhaseLimit implements EffectAppenderProducer {
|
||||
|
||||
@Override
|
||||
public boolean isPlayableInFull(ActionContext actionContext) {
|
||||
final Evaluator evaluator = limitSource.getEvaluator(actionContext);
|
||||
final int limit = evaluator.evaluateExpression(actionContext.getGame(), actionContext.getSource());
|
||||
|
||||
if (perPlayer)
|
||||
return PlayConditions.checkPhaseLimit(actionContext.getGame(), actionContext.getSource(), actionContext.getPerformingPlayer() + "_", limit);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user