Moved quote to separate field
This commit is contained in:
@@ -10,9 +10,9 @@
|
||||
],
|
||||
"text": [
|
||||
"[uKeyword]Tale.[/uKeyword] When you play this condition, stack the top card of your draw deck here.",
|
||||
"[keyword]Response:[/keyword] If a Shadow card is about to discard any number of your {dwarven} conditions, discard this condition to prevent that.",
|
||||
"[quote]\"Here lies Balin, son of Fundin, Lord of Moria.\"[/quote]"
|
||||
"[keyword]Response:[/keyword] If a Shadow card is about to discard any number of your {dwarven} conditions, discard this condition to prevent that."
|
||||
],
|
||||
"quote": "\"Here lies Balin, son of Fundin, Lord of Moria.\"",
|
||||
"effects": [
|
||||
{
|
||||
"type": "trigger",
|
||||
@@ -50,9 +50,9 @@
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"text": [
|
||||
"Exert a Dwarf to wound up to 2 Goblins.",
|
||||
"[quote]\"There is one Dwarf yet in Moria who still draws breath!\"[/quote]"
|
||||
"Exert a Dwarf to wound up to 2 Goblins."
|
||||
],
|
||||
"quote": "\"There is one Dwarf yet in Moria who still draws breath!\"",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"cost": {
|
||||
@@ -73,9 +73,9 @@
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"text": [
|
||||
"If Gimli is not assigned to skirmish, exert him and discard 2 cards stacked on a {dwarven} condition to have him replace another Dwarf in skirmish. Gimli is strength +2 and [keyword]damage +1[/keyword] while in that skirmish.",
|
||||
"[quote]Gimli's despair over Balin's death was quickly replaced by fury.[/quote]"
|
||||
"If Gimli is not assigned to skirmish, exert him and discard 2 cards stacked on a {dwarven} condition to have him replace another Dwarf in skirmish. Gimli is strength +2 and [keyword]damage +1[/keyword] while in that skirmish."
|
||||
],
|
||||
"quote": "Gimli's despair over Balin's death was quickly replaced by fury.",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"cost": [
|
||||
@@ -116,9 +116,9 @@
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"text": [
|
||||
"Stack the top 3 cards of your draw deck on a {dwarven} support area condition to make a Dwarf take no more than one wound in a skirmish.",
|
||||
"[quote]The Dwarves of the Mountain Races cut their teeth in battle at an early age.[/quote]"
|
||||
"Stack the top 3 cards of your draw deck on a {dwarven} support area condition to make a Dwarf take no more than one wound in a skirmish."
|
||||
],
|
||||
"quote": "The Dwarves of the Mountain Races cut their teeth in battle at an early age.",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"cost": {
|
||||
@@ -142,9 +142,9 @@
|
||||
"keyword": "skirmish",
|
||||
"text": [
|
||||
"To play, exert 2 Dwarves and discard 2 cards stacked on a {dwarven} condition.",
|
||||
"Each exerted Dwarf is strength +2 until the regroup phase.",
|
||||
"[quote]Dwarves are renowned for their fierce loyalty to one another.[/quote]"
|
||||
"Each exerted Dwarf is strength +2 until the regroup phase."
|
||||
],
|
||||
"quote": "Dwarves are renowned for their fierce loyalty to one another.",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"cost": [
|
||||
@@ -175,9 +175,9 @@
|
||||
"type": "event",
|
||||
"keyword": "skirmish",
|
||||
"text": [
|
||||
"Make a Dwarf strength +2 (or +3 if there is a card stacked on a {dwarven} condition.)",
|
||||
"[quote]Gimli's axe struck true in the skulls of many Orcs and Uruk-hai.[/quote]"
|
||||
"Make a Dwarf strength +2 (or +3 if there is a card stacked on a {dwarven} condition.)"
|
||||
],
|
||||
"quote": "Gimli's axe struck true in the skulls of many Orcs and Uruk-hai.",
|
||||
"effects": {
|
||||
"type": "event",
|
||||
"effect": {
|
||||
@@ -431,9 +431,9 @@
|
||||
"text": [
|
||||
"[keyword]Damage +1.[/keyword]",
|
||||
"While in your starting fellowship, Gimli's twilight cost is -1.",
|
||||
"At the beginning of the fellowship phase, you may stack a Free Peoples card from hand on a {dwarven} support area condition to take a {dwarven} event from your discard pile into hand.",
|
||||
"[quote]What are we waiting for?![/quote]"
|
||||
"At the beginning of the fellowship phase, you may stack a Free Peoples card from hand on a {dwarven} support area condition to take a {dwarven} event from your discard pile into hand."
|
||||
],
|
||||
"quote": "What are we waiting for?!",
|
||||
"effects": [
|
||||
{
|
||||
"type": "modifyOwnCost",
|
||||
|
||||
@@ -42,7 +42,7 @@ public class ImageGenerator {
|
||||
|
||||
JPEGImageWriteParam jpegParams = new JPEGImageWriteParam(null);
|
||||
jpegParams.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
||||
jpegParams.setCompressionQuality(0.9f);
|
||||
jpegParams.setCompressionQuality(1f);
|
||||
|
||||
final ImageWriter writer = ImageIO.getImageWritersByFormatName("jpg").next();
|
||||
final File resultFile = new File(output, cardEntry.getKey() + ".jpg");
|
||||
|
||||
@@ -124,12 +124,31 @@ public class JSONImageRecipe implements ImageRecipe {
|
||||
if (value instanceof JSONObject) {
|
||||
JSONObject valueObj = (JSONObject) value;
|
||||
final String type = (String) valueObj.get("type");
|
||||
if (type.equalsIgnoreCase("cardProperty")) {
|
||||
if (type.equalsIgnoreCase("append")) {
|
||||
final JSONArray values = (JSONArray) valueObj.get("values");
|
||||
|
||||
List<Function<RenderContext, String[]>> providers = (List<Function<RenderContext, String[]>>) values.stream().map(appendValue -> createStringArrayProvider(appendValue)).collect(Collectors.toList());
|
||||
|
||||
return (renderContext -> {
|
||||
List<String> result = new LinkedList<>();
|
||||
for (Function<RenderContext, String[]> provider : providers) {
|
||||
final String[] texts = provider.apply(renderContext);
|
||||
if (texts != null)
|
||||
result.addAll(Arrays.asList(texts));
|
||||
}
|
||||
return result.toArray(new String[0]);
|
||||
});
|
||||
} else if (type.equalsIgnoreCase("cardProperty")) {
|
||||
final Function<RenderContext, String> name = createStringProvider(valueObj.get("name"));
|
||||
final String prefix = (String) valueObj.get("prefix");
|
||||
final String postfix = (String) valueObj.get("postfix");
|
||||
return renderContext -> {
|
||||
final String propertyName = name.apply(renderContext);
|
||||
|
||||
return getStringArray(renderContext.getCardInfo().get(propertyName));
|
||||
final String[] stringArray = getStringArray(renderContext.getCardInfo().get(propertyName));
|
||||
for (int i = 0; i < stringArray.length; i++)
|
||||
stringArray[i] = ((prefix != null) ? prefix : "") + stringArray[i] + ((postfix != null) ? postfix : "");
|
||||
return stringArray;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -867,8 +867,19 @@
|
||||
"comment": "Card text",
|
||||
"type": "textBox",
|
||||
"text": {
|
||||
"type": "cardProperty",
|
||||
"name": "text"
|
||||
"type": "append",
|
||||
"values": [
|
||||
{
|
||||
"type": "cardProperty",
|
||||
"name": "text"
|
||||
},
|
||||
{
|
||||
"type": "cardProperty",
|
||||
"name": "quote",
|
||||
"prefix": "[quote]",
|
||||
"postfix": "[/quote]"
|
||||
}
|
||||
]
|
||||
},
|
||||
"font": {
|
||||
"default": {
|
||||
|
||||
Reference in New Issue
Block a user