Merge pull request #8 from Tbiesty/master

Add SarumanFirstSentenceActive and Fix Breeding Pit
This commit is contained in:
Christian McCarty
2021-04-17 15:59:01 -05:00
committed by GitHub
4 changed files with 38 additions and 9 deletions

View File

@@ -30,7 +30,7 @@
"modifier": { "modifier": {
"type": "modifyStrength", "type": "modifyStrength",
"filter": "memory(chosenAlly)", "filter": "memory(chosenAlly)",
"amount": 3, "amount": 3
}, },
"until": "start(regroup)" "until": "start(regroup)"
}, },
@@ -42,7 +42,6 @@
] ]
} }
}, },
"53_68": { "53_68": {
"side": "shadow", "side": "shadow",
"site": 4, "site": 4,
@@ -60,17 +59,25 @@
"modifier": { "modifier": {
"type": "cantTakeWounds", "type": "cantTakeWounds",
"filter": "self", "filter": "self",
"condition": { "condition": [
"type": "phase", {
"phase": "archery" "type": "phase",
} "phase": "archery"
},
{
"type": "sarumanfirstsentenceactive"
}
]
} }
}, },
{ {
"type": "modifier", "type": "modifier",
"modifier": { "modifier": {
"type": "cantbeassignedtoskirmish", "type": "cantbeassignedtoskirmish",
"filter": "self" "filter": "self",
"condition": {
"type": "sarumanfirstsentenceactive"
}
} }
}, },
{ {
@@ -104,5 +111,5 @@
} }
} }
] ]
}, }
} }

View File

@@ -82,7 +82,7 @@
"type": "responseEvent", "type": "responseEvent",
"trigger": { "trigger": {
"type": "played", "type": "played",
"filter": "your,uruk hai", "filter": "your,uruk-hai",
"memorize": "playedUrukHai" "memorize": "playedUrukHai"
}, },
"effect": { "effect": {

View File

@@ -44,6 +44,7 @@ public class RequirementFactory {
requirementProducers.put("cardsinhandmorethan", new CardsInHandMoreThan()); requirementProducers.put("cardsinhandmorethan", new CardsInHandMoreThan());
requirementProducers.put("cardsindeckcount", new CardsInDeckCount()); requirementProducers.put("cardsindeckcount", new CardsInDeckCount());
requirementProducers.put("playedcardthisphase", new PlayedCardThisPhase()); requirementProducers.put("playedcardthisphase", new PlayedCardThisPhase());
requirementProducers.put("sarumanfirstsentenceactive", new SarumanFirstSentenceActive());
} }
public Requirement getRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { public Requirement getRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {

View File

@@ -0,0 +1,21 @@
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.game.state.LotroGame;
import com.gempukku.lotro.logic.modifiers.ModifierFlag;
import org.json.simple.JSONObject;
public class SarumanFirstSentenceActive implements RequirementProducer {
@Override
public Requirement getPlayRequirement(JSONObject object, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(object);
return (actionContext) -> {
final LotroGame game = actionContext.getGame();
return !game.getModifiersQuerying().hasFlagActive(game, ModifierFlag.SARUMAN_FIRST_SENTENCE_INACTIVE);
};
}
}