Skip to content

Commit 4a66ce9

Browse files
committed
feat: Adds Lair Actions to Basic 5e Layout (close #38)
1 parent dfa0ec7 commit 4a66ce9

4 files changed

Lines changed: 12 additions & 3 deletions

File tree

@types/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export interface Monster {
5454
bonus_actions?: Trait[];
5555
legendary_actions?: Trait[];
5656
reactions?: Trait[];
57+
lair_actions?: Trait[];
5758
monster?: string;
5859
creature?: string;
5960
source?: string;

src/layouts/basic5e.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,15 @@ return "";`
627627
heading: "Reactions",
628628
conditioned: true,
629629

630+
dice: true
631+
},
632+
{
633+
type: "traits",
634+
id: nanoid(),
635+
properties: ["lair_actions"],
636+
heading: "Lair Actions",
637+
conditioned: true,
638+
630639
dice: true
631640
}
632641
];

src/settings/StatblockCreator.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
ExtraButtonComponent,
55
TextComponent
66
} from "obsidian";
7+
import type { Layout, StatblockItem } from "src/layouts/types";
78
8-
import type { Layout, StatblockItem } from "src/data/constants";
99
import type StatBlockPlugin from "src/main";
1010
import { createEventDispatcher } from "svelte";
1111

src/settings/ui/Block.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<script lang="ts">
2-
import type { StatblockItem } from "src/data/constants";
3-
42
import PropertyBlock from "./PropertyBlock.svelte";
53
import type StatBlockPlugin from "src/main";
64
import { ExtraButtonComponent } from "obsidian";
75
import { createEventDispatcher } from "svelte";
86
import { BlockModal } from "./block";
7+
import type { StatblockItem } from "src/layouts/types";
98
109
export let block: StatblockItem;
1110
export let plugin: StatBlockPlugin;

0 commit comments

Comments
 (0)