Some Reflections cards

This commit is contained in:
marcin.sciesinski
2019-09-12 17:07:28 -07:00
parent b153a608e9
commit 99e22b86bf
2 changed files with 116 additions and 2 deletions

View File

@@ -445,5 +445,118 @@
}
}
}
},
"9_12": {
"title": "*Aiglos",
"culture": "elven",
"cost": 2,
"type": "artifact",
"vitality": 1,
"target": "elf",
"effects": [
{
"type": "modifier",
"modifier": {
"type": "modifyStrength",
"filter": "bearer,name(Gil-galad)",
"amount": {
"type": "forEachYouCanSpot",
"filter": "culture(elven),artifact",
"limit": 6
}
}
},
{
"type": "activated",
"phase": "regroup",
"cost": {
"type": "discard",
"filter": "self"
},
"effect": {
"type": "wound",
"filter": "choose(minion)",
"count": {
"type": "forEachYouCanSpot",
"filter": "elf"
}
}
}
]
},
"9_13": {
"title": "Elven Rope",
"culture": "elven",
"cost": 1,
"type": "possession",
"condition": {
"type": "canSpot",
"filter": "elf"
},
"target": "or(elf,hobbit)",
"effects": {
"type": "activated",
"phase": "maneuver",
"cost": {
"type": "discard",
"filter": "self"
},
"effect": {
"type": "returnToHand",
"player": "shadowPlayer",
"filter": "choose(minion,strengthLessThan(7))"
}
}
},
"9_14": {
"title": "*Galadriel",
"subtitle": "Bearer of Wisdom",
"culture": "elven",
"cost": 3,
"type": "companion",
"race": "elf",
"strength": 3,
"vitality": 3,
"resistance": 3,
"keyword": "can start with ring",
"effects": {
"type": "modifier",
"modifier": {
"type": "modifyResistance",
"filter": "self,hasAttached(or(artifact,name(The One Ring)))",
"amount": {
"type": "forEachYouCanSpot",
"filter": "culture(elven),companion"
}
}
}
},
"9_15": {
"title": "*Gil-galad",
"subtitle": "Elven High King",
"culture": "elven",
"cost": 5,
"type": "companion",
"race": "elf",
"strength": 9,
"vitality": 4,
"resistance": 6,
"condition": {
"type": "canSpot",
"filter": "culture(elven),companion",
"count": 2
},
"effects": {
"type": "activated",
"phase": "regroup",
"cost": {
"type": "exert",
"filter": "self"
},
"effect": {
"type": "wound",
"filter": "all(wounded,minion)"
}
}
}
}

View File

@@ -22,9 +22,10 @@ import java.util.Collection;
public class ReturnToHand implements EffectAppenderProducer {
@Override
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(effectObject, "filter", "count");
FieldUtils.validateAllowedFields(effectObject, "filter", "count", "player");
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter");
final String player = FieldUtils.getString(effectObject.get("player"), "player", "you");
final ValueSource valueSource = ValueResolver.resolveEvaluator(effectObject.get("count"), 1, environment);
MultiEffectAppender result = new MultiEffectAppender();
@@ -32,7 +33,7 @@ public class ReturnToHand implements EffectAppenderProducer {
result.addEffectAppender(
CardResolver.resolveCards(filter,
actionContext -> (Filter) (game, physicalCard) -> game.getModifiersQuerying().canBeReturnedToHand(game, physicalCard, actionContext.getSource()),
valueSource, "_temp", "you", "Choose cards to return to hand", environment));
valueSource, "_temp", player, "Choose cards to return to hand", environment));
result.addEffectAppender(
new DelayedAppender() {
@Override