Moved quote to separate field
This commit is contained in:
@@ -10,9 +10,9 @@
|
|||||||
],
|
],
|
||||||
"text": [
|
"text": [
|
||||||
"[uKeyword]Tale.[/uKeyword] When you play this condition, stack the top card of your draw deck here.",
|
"[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.",
|
"[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]"
|
|
||||||
],
|
],
|
||||||
|
"quote": "\"Here lies Balin, son of Fundin, Lord of Moria.\"",
|
||||||
"effects": [
|
"effects": [
|
||||||
{
|
{
|
||||||
"type": "trigger",
|
"type": "trigger",
|
||||||
@@ -50,9 +50,9 @@
|
|||||||
"type": "event",
|
"type": "event",
|
||||||
"keyword": "skirmish",
|
"keyword": "skirmish",
|
||||||
"text": [
|
"text": [
|
||||||
"Exert a Dwarf to wound up to 2 Goblins.",
|
"Exert a Dwarf to wound up to 2 Goblins."
|
||||||
"[quote]\"There is one Dwarf yet in Moria who still draws breath!\"[/quote]"
|
|
||||||
],
|
],
|
||||||
|
"quote": "\"There is one Dwarf yet in Moria who still draws breath!\"",
|
||||||
"effects": {
|
"effects": {
|
||||||
"type": "event",
|
"type": "event",
|
||||||
"cost": {
|
"cost": {
|
||||||
@@ -73,9 +73,9 @@
|
|||||||
"type": "event",
|
"type": "event",
|
||||||
"keyword": "skirmish",
|
"keyword": "skirmish",
|
||||||
"text": [
|
"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.",
|
"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]"
|
|
||||||
],
|
],
|
||||||
|
"quote": "Gimli's despair over Balin's death was quickly replaced by fury.",
|
||||||
"effects": {
|
"effects": {
|
||||||
"type": "event",
|
"type": "event",
|
||||||
"cost": [
|
"cost": [
|
||||||
@@ -116,9 +116,9 @@
|
|||||||
"type": "event",
|
"type": "event",
|
||||||
"keyword": "skirmish",
|
"keyword": "skirmish",
|
||||||
"text": [
|
"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.",
|
"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]"
|
|
||||||
],
|
],
|
||||||
|
"quote": "The Dwarves of the Mountain Races cut their teeth in battle at an early age.",
|
||||||
"effects": {
|
"effects": {
|
||||||
"type": "event",
|
"type": "event",
|
||||||
"cost": {
|
"cost": {
|
||||||
@@ -142,9 +142,9 @@
|
|||||||
"keyword": "skirmish",
|
"keyword": "skirmish",
|
||||||
"text": [
|
"text": [
|
||||||
"To play, exert 2 Dwarves and discard 2 cards stacked on a {dwarven} condition.",
|
"To play, exert 2 Dwarves and discard 2 cards stacked on a {dwarven} condition.",
|
||||||
"Each exerted Dwarf is strength +2 until the regroup phase.",
|
"Each exerted Dwarf is strength +2 until the regroup phase."
|
||||||
"[quote]Dwarves are renowned for their fierce loyalty to one another.[/quote]"
|
|
||||||
],
|
],
|
||||||
|
"quote": "Dwarves are renowned for their fierce loyalty to one another.",
|
||||||
"effects": {
|
"effects": {
|
||||||
"type": "event",
|
"type": "event",
|
||||||
"cost": [
|
"cost": [
|
||||||
@@ -175,9 +175,9 @@
|
|||||||
"type": "event",
|
"type": "event",
|
||||||
"keyword": "skirmish",
|
"keyword": "skirmish",
|
||||||
"text": [
|
"text": [
|
||||||
"Make a Dwarf strength +2 (or +3 if there is a card stacked on a {dwarven} condition.)",
|
"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]"
|
|
||||||
],
|
],
|
||||||
|
"quote": "Gimli's axe struck true in the skulls of many Orcs and Uruk-hai.",
|
||||||
"effects": {
|
"effects": {
|
||||||
"type": "event",
|
"type": "event",
|
||||||
"effect": {
|
"effect": {
|
||||||
@@ -431,9 +431,9 @@
|
|||||||
"text": [
|
"text": [
|
||||||
"[keyword]Damage +1.[/keyword]",
|
"[keyword]Damage +1.[/keyword]",
|
||||||
"While in your starting fellowship, Gimli's twilight cost is -1.",
|
"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.",
|
"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]"
|
|
||||||
],
|
],
|
||||||
|
"quote": "What are we waiting for?!",
|
||||||
"effects": [
|
"effects": [
|
||||||
{
|
{
|
||||||
"type": "modifyOwnCost",
|
"type": "modifyOwnCost",
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class ImageGenerator {
|
|||||||
|
|
||||||
JPEGImageWriteParam jpegParams = new JPEGImageWriteParam(null);
|
JPEGImageWriteParam jpegParams = new JPEGImageWriteParam(null);
|
||||||
jpegParams.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
jpegParams.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
||||||
jpegParams.setCompressionQuality(0.9f);
|
jpegParams.setCompressionQuality(1f);
|
||||||
|
|
||||||
final ImageWriter writer = ImageIO.getImageWritersByFormatName("jpg").next();
|
final ImageWriter writer = ImageIO.getImageWritersByFormatName("jpg").next();
|
||||||
final File resultFile = new File(output, cardEntry.getKey() + ".jpg");
|
final File resultFile = new File(output, cardEntry.getKey() + ".jpg");
|
||||||
|
|||||||
@@ -124,12 +124,31 @@ public class JSONImageRecipe implements ImageRecipe {
|
|||||||
if (value instanceof JSONObject) {
|
if (value instanceof JSONObject) {
|
||||||
JSONObject valueObj = (JSONObject) value;
|
JSONObject valueObj = (JSONObject) value;
|
||||||
final String type = (String) valueObj.get("type");
|
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 Function<RenderContext, String> name = createStringProvider(valueObj.get("name"));
|
||||||
|
final String prefix = (String) valueObj.get("prefix");
|
||||||
|
final String postfix = (String) valueObj.get("postfix");
|
||||||
return renderContext -> {
|
return renderContext -> {
|
||||||
final String propertyName = name.apply(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",
|
"comment": "Card text",
|
||||||
"type": "textBox",
|
"type": "textBox",
|
||||||
"text": {
|
"text": {
|
||||||
"type": "cardProperty",
|
"type": "append",
|
||||||
"name": "text"
|
"values": [
|
||||||
|
{
|
||||||
|
"type": "cardProperty",
|
||||||
|
"name": "text"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "cardProperty",
|
||||||
|
"name": "quote",
|
||||||
|
"prefix": "[quote]",
|
||||||
|
"postfix": "[/quote]"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"font": {
|
"font": {
|
||||||
"default": {
|
"default": {
|
||||||
|
|||||||
Reference in New Issue
Block a user