diff --git a/docs/Abilities.md b/docs/Abilities.md new file mode 100644 index 0000000..482ee74 --- /dev/null +++ b/docs/Abilities.md @@ -0,0 +1,77 @@ +# Abilities + +## Field Definition + +| Property | Description | Example | +|-------------------------------|----------------------------------------------------------|-------------------------------------------| +| `name` | The "Title" or "Description" of the Power Roll. | `name: Might Resistance Roll` | +| `flavor` | The flavor text of the Power Roll. | `flavor: Be strong` | +| `cost` | The cost to use the ability | `cost: 3 Piety` | +| `keywords` | Keywords of the ability | `keywords: Area, Magic` | +| `type` | Type of the ability | `type: Action` | +| `distance` | Distance of the ability | `distance: 2 burst` | +| `target` | Target of the ability | `target: All enemies` | +| `trigger` | The Trigger for a Triggered Action | `trigger: You are damaged` | +| `roll` | Power Roll | `roll: Power Roll + Might or Presence` | +| `tier 1`, `t1`, `11 or lower` | The tier-1 (11 or lower) result of the Power Roll | `t1: 2 damage` | +| `tier 2`, `t2`, `12-16` | The tier-2 (12-16) result of the Power Roll | `t2: 3 damage` | +| `tier 3`, `t3`, `17+` | The tier-3 (17+) result of the Power Roll | `t3: 4 damage` | +| `crit`, `nat 19-20` | The critical result of the Power Roll | `crit: 4 damage, Extra Action` | +| `effect` | Effect of the ability | `effect: Gain an Edge if you didn't move` | +| `custom_fields`, `fields` | Custom fields and values. Displays after Effects | See below | +| `spend` | Additional effects from spending (Heroic) Resources | See below | +| `persistent` | Persistent effects from spending Elementalist Essence | See below | +| `note`, `notes` | Notes and reminders about the Power Roll | `note: Grant Edge if creature is bracing` | +| `indent` | Left-margin indentation for the block (for nested lists) | `indent: 2` | + +### `custom_fields` and `fields` + +These are for arbitrary fields under the power roll and effects: + +``` +fields: + - name: "Spend 1 Piety" + value: "The attack has a double edge and deals holy damage equal to twice your Intuition score." + - name: "Eat a Sandwich" + value: "Immune to everything" +``` + +Yaml is incredibly sensitive, be sure to format exactly. + +### `spend` + +For specifying additional effects that activate when (Heroic) Resources are spent. + +``` +spend: + cost: 1 Rage + value: If you are not dying, you can spend a Recovery. +``` + +Can additionally handle multi-line strings: + +``` +spend: + cost: Piety + value: | + For each piety spent, you can choose one of the following enhancements + • You can target one additional ally within distance. + • You can end one effect on a target that has a duration of EoT or is ended by a resistance roll. + • A prone target can stand up. + • A target can spend 1 additional Recovery. +``` + +Yaml is incredibly sensitive, be sure to format exactly. + +### `persistent` + +For specifying additional effects that activate when (Heroic) Resources are spent. + +``` +spend: + cost: 1 + value: This effect lasts until the start of your next turn. +``` + +Yaml is incredibly sensitive, be sure to format exactly. + diff --git a/docs/power-roll.md b/docs/power-roll.md index 6f6789d..8d22b6c 100644 --- a/docs/power-roll.md +++ b/docs/power-roll.md @@ -26,78 +26,6 @@ with `ds-power-roll` or `ds-pr` - The values should support standard markdown rendering for bold, italics, links, etc. - The generated html should be highly customizable with css -### Fields - -| Property | Description | Example | -|-------------------------------|----------------------------------------------------------|-------------------------------------------| -| `name` | The "Title" or "Description" of the Power Roll. | `name: Might Resistance Roll` | -| `flavor` | The flavor text of the Power Roll. | `flavor: Be strong` | -| `cost` | The cost to use the ability | `cost: 3 Piety` | -| `keywords` | Keywords of the ability | `keywords: Area, Magic` | -| `type` | Type of the ability | `type: Action` | -| `distance` | Distance of the ability | `distance: 2 burst` | -| `target` | Target of the ability | `target: All enemies` | -| `trigger` | The Trigger for a Triggered Action | `trigger: You are damaged` | -| `roll` | Power Roll | `roll: Power Roll + Might or Presence` | -| `tier 1`, `t1`, `11 or lower` | The tier-1 (11 or lower) result of the Power Roll | `t1: 2 damage` | -| `tier 2`, `t2`, `12-16` | The tier-2 (12-16) result of the Power Roll | `t2: 3 damage` | -| `tier 3`, `t3`, `17+` | The tier-3 (17+) result of the Power Roll | `t3: 4 damage` | -| `crit`, `nat 19-20` | The critical result of the Power Roll | `crit: 4 damage, Extra Action` | -| `effect` | Effect of the ability | `effect: Gain an Edge if you didn't move` | -| `custom_fields`, `fields` | Custom fields and values. Displays after Effects | See below | -| `spend` | Additional effects from spending (Heroic) Resources | See below | -| `persistent` | Persistent effects from spending Elementalist Essence | See below | -| `note`, `notes` | Notes and reminders about the Power Roll | `note: Grant Edge if creature is bracing` | -| `indent` | Left-margin indentation for the block (for nested lists) | `indent: 2` | - -### `custom_fields` and `fields` - -These are for arbitrary fields under the power roll and effects: - -``` -fields: - - name: "Spend 1 Piety" - value: "The attack has a double edge and deals holy damage equal to twice your Intuition score." - - name: "Eat a Sandwich" - value: "Immune to everything" -``` - -Yaml is incredibly sensitive, be sure to format exactly. - -### `spend` - -For specifying additional effects that activate when (Heroic) Resources are spent. - -``` -spend: - cost: 1 Rage - value: If you are not dying, you can spend a Recovery. -``` - -Can additionally handle multi-line strings: - -``` -spend: - cost: Piety - value: | - For each piety spent, you can choose one of the following enhancements - • You can target one additional ally within distance. - • You can end one effect on a target that has a duration of EoT or is ended by a resistance roll. - • A prone target can stand up. - • A target can spend 1 additional Recovery. -``` - -Yaml is incredibly sensitive, be sure to format exactly. - -### `persistent` - -For specifying additional effects that activate when (Heroic) Resources are spent. - -``` -spend: - cost: 1 - value: This effect lasts until the start of your next turn. -``` - -Yaml is incredibly sensitive, be sure to format exactly. +## Fields +See the [abilities](./Abilities.md) documentation for field definitions diff --git a/docs/statblock-side-by-side.png b/docs/statblock-side-by-side.png new file mode 100644 index 0000000..7a5a5aa Binary files /dev/null and b/docs/statblock-side-by-side.png differ diff --git a/docs/statblock.md b/docs/statblock.md new file mode 100644 index 0000000..952fb76 --- /dev/null +++ b/docs/statblock.md @@ -0,0 +1,154 @@ + +# Statblock Element + +The Statblock codeblock is a tool designed to parse and display statblocks within Obsidian. +It allows you to define creatures or characters with various attributes, abilities, traits, and more using YAML syntax, +and then renders this information in an organized layout for easy reference during gameplay or writing. + +![statblock-side-by-side.png](statblock-side-by-side.png) + +## Usage + +To use the Statblock Processor, insert a code block with the language identifier `ds-statblock` in your Obsidian note, +and then define your statblock using YAML syntax inside the code block. + +Example statblock + +``` +~~~ds-statblock +name: Human Bandit Chief +level: 3 +roles: + - Boss +ancestry: + - Human + - Humanoid +ev: 54 +stamina: 120 +immunities: + - Magic 2 + - Psionic 2 +speed: 5 +size: 1M +stability: 2 +free_strike: 5 +might: +2 +agility: +2 +reason: -1 +intuition: +2 +presence: +2 +traits: +- name: End Effect + effect: At the end of their turn, the bandit chief can take 5 damage to end one EoE effect affecting them. This damage can’t be reduced in any way. +abilities: +- name: Whip & Magic Longsword + cost: Signature + type: Action + roll: 2d10 + 2 + keywords: + - Attack + - Magic + - Melee + - Weapon + distance: Reach 1 + target: Two enemies or objects + tier 1: 5 damage; [[Director Reference#Pull X|pull]] 1 + tier 2: 9 damage; pull 2 + tier 3: 12 damage; pull 3 + crit: 12 damage; pull 3; another action + effect: A target who is adjacent to the bandit chief after the attack is resolved takes 9 corruption damage. + additional_effects: + - cost: 2 VP + effect: This ability targets three enemies or objects. +- name: Kneel, Peasant! + type: Maneuver + keywords: + - Attack + - Melee + - Weapon + distance: Reach 1 + target: One enemy or object + t1: Push 1 + t2: Push 2; prone + t3: Push 3; prone + additional_effects: + - cost: 2 VP + effect: This ability targets each enemy adjacent to the bandit chief. +- name: Bloodstones + type: Triggered Action + keywords: + - Magic + distance: Self + target: Self + trigger: The bandit chief makes a power roll for an attack. + effect: The bandit chief takes 4 corruption damage and increases the result of the power roll by one tier. +- name: Shoot! + type: Villain Action + cost: 1 VP + keywords: Area + distance: 10 burst + target: Each ally + effect: Each target can make a ranged free strike. +- name: Form Up! + type: Villain Action + cost: 2 VP + effect: Each target shifts up to their speed. Until the end of the encounter, any enemy takes a bane on attacks against the bandit chief or any of the bandit chief’s allies if they are adjacent to that target. + keywords: Area + distance: 10 burst + target: Each ally +- name: Lead From the Front + type: Villain Action + cost: 3 VP + keywords: + - Attack + - Weapon + distance: Self + target: Self + effect: The bandit chief shifts twice their speed. During or after this movement, they can attack up to four targets with Whip & Magic Longsword. Any ally of the bandit chief adjacent to a target can make a free strike against that target. +~~~ +``` + +## Field Definitions + +Below is a detailed description of each field used in the statblock, including their types, default values, and whether they are required. + +### Header Fields + +| Field | Type | Description | Required | Default Value | +| ------------- | -------------------- | ---------------------------------------------------------------------------------- | -------- | ------------- | +| `name` | `string` | The name of the creature. | **Yes** | N/A | +| `level` | `integer` | The creature's level. | No | `0` | +| `roles` | `array` of `string` | A list of roles assigned to the creature (e.g., "Boss", "Minion"). | No | `[]` | +| `ancestry` | `array` of `string` | A list of ancestries or types the creature belongs to (e.g., "Human", "Humanoid"). | No | `[]` | +| `ev` | `integer` | Encounter Value (EV) of the creature. | No | `0` | +| `stamina` | `integer` | The creature's max stamina. | No | `0` | +| `immunities` | `array` of `string` | A list of immunities the creature has (e.g., "Magic 2", "Psionic 2"). | No | `[]` | +| `speed` | `integer` | Movement speed of the creature. | No | `0` | +| `size` | `string` | The size category of the creature (e.g., "1M" for medium size). | No | "" | +| `stability` | `integer` | Stability value of the creature. | No | `0` | +| `free_strike` | `integer` | The free strike value of the creature. | No | `0` | +| `might` | `integer` | The creature's might value. | No | `0` | +| `agility` | `integer` | The creature's agility value. | No | `0` | +| `reason` | `integer` | The creature's reason value. | No | `0` | +| `intuition` | `integer` | The creature's intuition value. | No | `0` | +| `presence` | `integer` | The creature's presence value. | No | `0` | +| `traits` | `array` of `Trait` | Traits of the creature. See Traits below | No | `[]` | +| `abilities` | `array` of `Ability` | Abilities of the creature. See [abilities](./Abilities.md) | No | `[]` | + +**Notes:** + +- Attribute values can be positive or negative integers. You can include a `+` sign for positive values (e.g., `+2`), but it's optional. + +### Traits + +Each trait in the `traits` array consists of the following fields: + +| Field | Type | Description | Required | Default Value | +| -------- | -------- | ------------------------------------------------------------------------- | -------- | ------------- | +| `name` | `string` | The name of the trait. | **Yes** | N/A | +| `type` | `string` | The action-type of the trait (e.g., "Maneuver", "Free Triggered Action"). | No | `` | +| `effect` | `string` | A description of the trait's effect. | **Yes** | N/A | + +### Abilities + +See the [abilities](./Abilities.md) documentation for field definitions diff --git a/styles.css b/styles.css index b1979a6..c21f288 100644 --- a/styles.css +++ b/styles.css @@ -1716,8 +1716,8 @@ button.action-button { .ds-ability-container:hover, .ds-sb-traits:hover, .ds-sb-characteristics-line:hover, - .ds-sb-stats-left:hover, - .ds-sb-stats-right:hover { + .ds-sb-info-line:hover, + .ds-sb-stats-line:hover { background-color: var(--color-base-25); }