Skip to content

Commit 2730cd7

Browse files
committed
🚸 Add YAML statblock template for afflictions
1 parent b8e2dde commit 2730cd7

File tree

2 files changed

+34
-23
lines changed

2 files changed

+34
-23
lines changed

examples/templates/pf2etools/creature2md-yamlStatblock.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,7 @@ items: {items.join(", ").quoted}
121121
{#if abilitySet.value}
122122
abilities_{abilitySet.key}:
123123
{#each abilitySet.value}
124-
{#if it.isAbility}
125124
{it.renderAsYamlStatblock indent " "}
126-
{/if}
127125
{/each}
128126
{/if}
129127
{/for}
Lines changed: 34 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,47 @@
1+
{#with resource}
2+
{#if asYamlStatblock}
3+
- name: {name.quoted}
4+
desc: >
5+
({#each traits}{it.withoutTitle}{#if it_hasNext}, {/if}{/each}){#if notes} {notes.join(", ")};{/if}{#if savingThrow}
6+
**Saving Throw** {savingThrow};{/if}{#if onset}
7+
**Onset** {onset};{/if}{#if maxDuration}
8+
**Maximum Duration** {maxDuration};{/if}{#if effect}
9+
**Effect** {effect};{/if}
10+
{#each stages}**{it.key}** {it.value.text}{#if it.value.duration} ({it.value.duration}){/if}{#if it_hasNext}; {/if}{/each}
11+
{#else}
112
````ad-inline-affliction
2-
{#if resource.name}
3-
title: {resource.name}{#if resource.formattedLevel} _{resource.formattedLevel}_{/if}
13+
{#if name}
14+
title: {name}{#if formattedLevel} _{formattedLevel}_{/if}
415
{/if}
516

6-
{#if resource.traits}
7-
{#each resource.traits}{it} {/each}
8-
{/if}{#if resource.text}
9-
{resource.text}
17+
{#if traits}
18+
{#each traits}{it} {/each}
19+
{/if}{#if text}
20+
{text}
1021

11-
{/if}{#if resource.notes}
12-
{#each resource.notes}{it}{#if it_hasNext}, {/if}{/each}
22+
{/if}{#if notes}
23+
{#each notes}{it}{#if it_hasNext}, {/if}{/each}
1324

14-
{/if}{#if resource.savingThrow}
15-
- **Saving Throws**: {resource.savingThrow}
16-
{/if}{#if resource.onset}
17-
- **Onset**: {resource.onset}
18-
{/if}{#if resource.maxDuration}
19-
- **Maximum Duration**: {resource.maxDuration}
20-
{/if}{#if resource.effect}
25+
{/if}{#if savingThrow}
26+
- **Saving Throws**: {savingThrow}
27+
{/if}{#if onset}
28+
- **Onset**: {onset}
29+
{/if}{#if maxDuration}
30+
- **Maximum Duration**: {maxDuration}
31+
{/if}{#if effect}
2132

22-
**Effect** {resource.effect}
23-
{/if}{#if resource.stages}
33+
**Effect** {effect}
34+
{/if}{#if stages}
2435

2536
## Stages
2637

27-
{#each resource.stages}
38+
{#each stages}
2839
**{it.key}** {it.value.text}{#if it.value.duration } ({it.value.duration}){/if}
2940
{/each}
30-
{/if}{#if resource.source}
31-
*Source: {resource.source}*
41+
{/if}{#if source}
42+
*Source: {source}*
3243
{/if}
33-
{#if resource.tags}%% {#each resource.tags}#{it} {/each}%%{/if}
44+
{#if tags}%% {#each tags}#{it} {/each}%%{/if}
3445
````
46+
{/if}
47+
{/with}

0 commit comments

Comments
 (0)