Fixing "filter -> select" in replaceInSkirmish effect

This commit is contained in:
Christian 'ketura' McCarty
2024-11-01 19:20:26 -05:00
parent d67cf3cc89
commit 2089737fd1
11 changed files with 13 additions and 13 deletions

View File

@@ -216,7 +216,7 @@
effect: [ effect: [
{ {
type: replaceInSkirmish type: replaceInSkirmish
filter: unbound,companion,not(name(Gimli)) select: unbound,companion,not(name(Gimli))
with: choose(name(Gimli)) with: choose(name(Gimli))
} }
] ]

View File

@@ -206,7 +206,7 @@
effect: [ effect: [
{ {
type: replaceInSkirmish type: replaceInSkirmish
filter: unbound,companion,not(name(Gandalf)) select: unbound,companion,not(name(Gandalf))
with: choose(name(Gandalf)) with: choose(name(Gandalf))
} }
] ]

View File

@@ -100,7 +100,7 @@
effect: [ effect: [
{ {
type: replaceInSkirmish type: replaceInSkirmish
filter: companion,not(ringBearer) select: companion,not(ringBearer)
with: memory(exertedHobbit) with: memory(exertedHobbit)
} }
] ]

View File

@@ -501,7 +501,7 @@
] ]
effect: { effect: {
type: replaceInSkirmish type: replaceInSkirmish
filter: unbound, companion, InSkirmish, resistanceLessThanFilter(self) select: unbound, companion, InSkirmish, resistanceLessThanFilter(self)
with: self with: self
} }
} }

View File

@@ -172,7 +172,7 @@
} }
{ {
type: replaceInSkirmish type: replaceInSkirmish
filter: memory(anotherCompanion) select: memory(anotherCompanion)
with: self with: self
} }
] ]

View File

@@ -48,7 +48,7 @@
} }
effect: { effect: {
type: replaceInSkirmish type: replaceInSkirmish
filter: unbound,hobbit select: unbound,hobbit
with: choose(name(Boromir)) with: choose(name(Boromir))
} }
} }
@@ -485,7 +485,7 @@
} }
effect: { effect: {
type: replaceInSkirmish type: replaceInSkirmish
filter: unbound,companion,inSkirmishAgainst(minion) select: unbound,companion,inSkirmishAgainst(minion)
with: choose(culture(gondor),companion,notAssignedToSkirmish) with: choose(culture(gondor),companion,notAssignedToSkirmish)
} }
} }

View File

@@ -541,7 +541,7 @@
} }
effect: { effect: {
type: replaceInSkirmish type: replaceInSkirmish
filter: ringBound,companion,inSkirmishAgainst(minion) select: ringBound,companion,inSkirmishAgainst(minion)
with: self with: self
} }
} }

View File

@@ -164,7 +164,7 @@
} }
effect: { effect: {
type: replaceInSkirmish type: replaceInSkirmish
filter: minion,inSkirmishAgainst(companion) select: minion,inSkirmishAgainst(companion)
with: choose(name(Gollum)) with: choose(name(Gollum))
} }
} }

View File

@@ -93,7 +93,7 @@
effect: [ effect: [
{ {
type: replaceInSkirmish type: replaceInSkirmish
filter: dwarf,not(name(Gimli)) select: dwarf,not(name(Gimli))
with: memory(exertedGimli) with: memory(exertedGimli)
} }
{ {

View File

@@ -933,7 +933,7 @@
effect: [ effect: [
{ {
type: replaceInSkirmish type: replaceInSkirmish
filter: unbound,companion,not(name(Gandalf)) select: unbound,companion,not(name(Gandalf))
with: memory(gandalf) with: memory(gandalf)
} }
{ {

View File

@@ -18,9 +18,9 @@ import org.json.simple.JSONObject;
public class ReplaceInSkirmish implements EffectAppenderProducer { public class ReplaceInSkirmish implements EffectAppenderProducer {
@Override @Override
public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException { public EffectAppender createEffectAppender(JSONObject effectObject, CardGenerationEnvironment environment) throws InvalidCardDefinitionException {
FieldUtils.validateAllowedFields(effectObject, "filter", "with"); FieldUtils.validateAllowedFields(effectObject, "select", "with");
final String filter = FieldUtils.getString(effectObject.get("filter"), "filter"); final String filter = FieldUtils.getString(effectObject.get("select"), "select");
final String with = FieldUtils.getString(effectObject.get("with"), "with"); final String with = FieldUtils.getString(effectObject.get("with"), "with");
final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment); final FilterableSource filterableSource = environment.getFilterFactory().generateFilter(filter, environment);