From 36211432e3ce3d76b918fd39093b65d5691bb961 Mon Sep 17 00:00:00 2001 From: Erin Schnabel Date: Sun, 15 Oct 2023 21:51:07 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=F0=9F=8E=A8=20padding=20around?= =?UTF-8?q?=20spellcasting=20header/footer=20entries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../convert/tools/dnd5e/qute/QuteMonster.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/dev/ebullient/convert/tools/dnd5e/qute/QuteMonster.java b/src/main/java/dev/ebullient/convert/tools/dnd5e/qute/QuteMonster.java index 4c01c7ccb..0b56d5d27 100644 --- a/src/main/java/dev/ebullient/convert/tools/dnd5e/qute/QuteMonster.java +++ b/src/main/java/dev/ebullient/convert/tools/dnd5e/qute/QuteMonster.java @@ -369,7 +369,11 @@ public String toString() { /** Formatted description: renders all attributes (other than name) */ public String getDesc() { - List text = new ArrayList<>(headerEntries); + List text = new ArrayList<>(); + if (!headerEntries.isEmpty()) { + text.addAll(headerEntries); + text.add(""); + } appendList(text, "At will", will); if (daily != null && !daily.isEmpty()) { @@ -378,8 +382,10 @@ public String getDesc() { if (spells != null && !spells.isEmpty()) { spells.forEach((k, v) -> appendList(text, spellToTitle(k, v), v.spells)); } - - text.addAll(footerEntries); + if (!footerEntries.isEmpty()) { + text.add(""); + text.addAll(footerEntries); + } return String.join("\n", text); }