"Greatest Kingdom..." is now unique
"Saruman's Snows" should now be working "Goblin Wallcrawler" now has +2 strength "Ulaire Enquea" from FotR should now be playable "Erestor" from set 3, should not allow to use the ability if it cannot be exerted "Desperate Defense of the Ring" will no longer give an option to discard 3 cards, if there is no 3 cards in hand
This commit is contained in:
@@ -340,7 +340,7 @@
|
||||
]
|
||||
},
|
||||
"1_16": {
|
||||
"title": "Greatest Kingdom of My People",
|
||||
"title": "*Greatest Kingdom of My People",
|
||||
"culture": "dwarven",
|
||||
"cost": 0,
|
||||
"type": "condition",
|
||||
|
||||
@@ -532,7 +532,8 @@
|
||||
"condition": {
|
||||
"type": "location",
|
||||
"filter": "hasAttached(self)"
|
||||
}
|
||||
},
|
||||
"phase": "skirmish"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
@@ -498,7 +498,8 @@
|
||||
"condition": {
|
||||
"type": "location",
|
||||
"filter": "underground"
|
||||
}
|
||||
},
|
||||
"amount": 2
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -808,7 +809,7 @@
|
||||
"phase": "shadow",
|
||||
"cost": {
|
||||
"type": "discardFromHand",
|
||||
"forced": false
|
||||
"forced": false,
|
||||
"count": 3
|
||||
},
|
||||
"effect": {
|
||||
|
||||
@@ -847,23 +847,23 @@
|
||||
"vitality": 4,
|
||||
"site": 3,
|
||||
"keyword": "fierce",
|
||||
"condition": {
|
||||
"type": "or",
|
||||
"condition": [
|
||||
{
|
||||
"type": "canSpot",
|
||||
"count": 6,
|
||||
"filter": "companion"
|
||||
},
|
||||
{
|
||||
"type": "canSpotBurdens",
|
||||
"amount": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"effects": {
|
||||
"type": "activated",
|
||||
"phase": "maneuver",
|
||||
"condition": {
|
||||
"type": "or",
|
||||
"condition": [
|
||||
{
|
||||
"type": "canSpot",
|
||||
"count": 6,
|
||||
"filter": "companion"
|
||||
},
|
||||
{
|
||||
"type": "canSpotBurdens",
|
||||
"amount": 5
|
||||
}
|
||||
]
|
||||
},
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "self"
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"3_14": {
|
||||
"title": "*Erestor",
|
||||
"subtitle": "Chief Advisor to Elrond",
|
||||
"culture": "elven",
|
||||
"cost": 2,
|
||||
"type": "ally",
|
||||
"allyHome": "fellowship,3",
|
||||
"race": "elf",
|
||||
"strength": 5,
|
||||
"vitality": 2,
|
||||
"condition": {
|
||||
"type": "canSpot",
|
||||
"filter": "elf"
|
||||
},
|
||||
"effects": {
|
||||
"type": "activatedTrigger",
|
||||
"trigger": {
|
||||
"type": "aboutToTakeWound",
|
||||
"filter": "elf",
|
||||
"source": "culture(sauron),or(minion,event)"
|
||||
},
|
||||
"cost": {
|
||||
"type": "exert",
|
||||
"filter": "self"
|
||||
},
|
||||
"effect": {
|
||||
"type": "preventWound",
|
||||
"filter": "choose(elf)"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,11 +37,16 @@ public class Choice implements EffectAppenderProducer {
|
||||
return new DelayedAppender() {
|
||||
@Override
|
||||
protected Effect createEffect(boolean cost, CostToEffectAction action, ActionContext actionContext) {
|
||||
final String choosingPlayer = playerSource.getPlayer(actionContext);
|
||||
ActionContext delegateActionContext = new DelegateActionContext(actionContext,
|
||||
choosingPlayer, actionContext.getGame(), actionContext.getSource(),
|
||||
actionContext.getEffectResult(), actionContext.getEffect());
|
||||
|
||||
int textIndex = 0;
|
||||
List<EffectAppender> playableEffectAppenders = new LinkedList<>();
|
||||
List<String> effectTexts = new LinkedList<>();
|
||||
for (EffectAppender possibleEffectAppender : possibleEffectAppenders) {
|
||||
if (possibleEffectAppender.isPlayableInFull(actionContext)) {
|
||||
if (possibleEffectAppender.isPlayableInFull(delegateActionContext)) {
|
||||
playableEffectAppenders.add(possibleEffectAppender);
|
||||
effectTexts.add(textArray[textIndex]);
|
||||
}
|
||||
@@ -58,14 +63,10 @@ public class Choice implements EffectAppenderProducer {
|
||||
|
||||
if (playableEffectAppenders.size() == 1) {
|
||||
SubAction subAction = new SubAction(action);
|
||||
playableEffectAppenders.get(0).appendEffect(cost, subAction, actionContext);
|
||||
playableEffectAppenders.get(0).appendEffect(cost, subAction, delegateActionContext);
|
||||
return new StackActionEffect(subAction);
|
||||
}
|
||||
|
||||
final String choosingPlayer = playerSource.getPlayer(actionContext);
|
||||
ActionContext delegateActionContext = new DelegateActionContext(actionContext,
|
||||
choosingPlayer, actionContext.getGame(), actionContext.getSource(),
|
||||
actionContext.getEffectResult(), actionContext.getEffect());
|
||||
SubAction subAction = new SubAction(action);
|
||||
subAction.appendCost(
|
||||
new PlayoutDecisionEffect(choosingPlayer,
|
||||
|
||||
@@ -13,6 +13,9 @@ public class CantPlayPhaseEventsOrPhaseSpecialAbilities implements ModifierSourc
|
||||
FieldUtils.validateAllowedFields(object, "phase", "condition");
|
||||
|
||||
final Phase phase = FieldUtils.getEnum(Phase.class, object.get("phase"), "phase");
|
||||
if (phase == null)
|
||||
throw new InvalidCardDefinitionException("Has to have a phase defined");
|
||||
|
||||
final JSONObject[] conditionArray = FieldUtils.getObjectArray(object.get("condition"), "condition");
|
||||
|
||||
final Requirement[] requirements = environment.getRequirementFactory().getRequirements(conditionArray, environment);
|
||||
|
||||
Reference in New Issue
Block a user