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

View File

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

View File

@@ -44,6 +44,7 @@ public class RequirementFactory {
requirementProducers.put("cardsinhandmorethan", new CardsInHandMoreThan());
requirementProducers.put("cardsindeckcount", new CardsInDeckCount());
requirementProducers.put("playedcardthisphase", new PlayedCardThisPhase());
requirementProducers.put("sarumanfirstsentenceactive", new SarumanFirstSentenceActive());
}
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);
};
}
}