From 1bd9dee29dfd108033e0cc80b7afb8bbbb5680ff Mon Sep 17 00:00:00 2001 From: evilchili Date: Fri, 15 Dec 2023 20:20:24 -0800 Subject: [PATCH] adding sand strider, fixing statblock css --- deadsands/content/bestiary/rolling-cactus.md | 2 +- deadsands/content/bestiary/sand-bear.md | 16 --- deadsands/content/bestiary/sand-strider.md | 57 +++++++++ .../static/deadsands/css/style.css | 33 ++++-- .../deadsands-theme/templates/monster.html | 112 +----------------- .../deadsands-theme/templates/statblock.html | 63 ++++++++++ deadsands/site_tools/content_manager.py | 3 +- deadsands/sources/psychadelic_effects.yaml | 2 +- 8 files changed, 146 insertions(+), 142 deletions(-) create mode 100644 deadsands/content/bestiary/sand-strider.md create mode 100644 deadsands/deadsands-theme/templates/statblock.html diff --git a/deadsands/content/bestiary/rolling-cactus.md b/deadsands/content/bestiary/rolling-cactus.md index 9d30c7d..67e9781 100644 --- a/deadsands/content/bestiary/rolling-cactus.md +++ b/deadsands/content/bestiary/rolling-cactus.md @@ -7,7 +7,7 @@ tags: monster date: 2023-05-27 14:43:16.001825 template: monster show_dm_content: True -status: published +status: draft monster: name: "Rolling Cactus" size: medium diff --git a/deadsands/content/bestiary/sand-bear.md b/deadsands/content/bestiary/sand-bear.md index 1efc0f9..4b1fd3c 100644 --- a/deadsands/content/bestiary/sand-bear.md +++ b/deadsands/content/bestiary/sand-bear.md @@ -45,22 +45,6 @@ monster: attributes: options: "Opportunity Attack": The Sand Bear makes one attack with its claws. - Legendary Actions: - attributes: - "count": 3 - options: - "name1": description - "name2": description - Legendary Reactions: - options: - "name1": description - "name2": description - Lair and Actions: - attributes: - "name1": description - options: - "name1": description - "name2": description --- Flavour text goes here. diff --git a/deadsands/content/bestiary/sand-strider.md b/deadsands/content/bestiary/sand-strider.md new file mode 100644 index 0000000..26cb1bb --- /dev/null +++ b/deadsands/content/bestiary/sand-strider.md @@ -0,0 +1,57 @@ +--- +# bestiary/sand-strider.md + +title: Sand Strider +author: evilchili +tags: monster +date: 2023-12-15 17:05:35.445106 +template: monster +show_dm_content: True +status: published +monster: + name: "Sand Strider" + size: medium + type: beast + alignment: unaligned + AC: 14 + HP: 25 (4d10 + 3) + speed: 40ft, climbing 20ft + STR: 15, +2 + DEX: 13, +1 + CON: 12, +1 + INT: 5, -3 + WIS: 10, 0 + CHA: 3, -4 + skills: Athletics +5, Stealth +7 + saving_throws: + resistances: Resistant to magical spell effects and damage. + damage_immunities: + condition_immunities: + senses: Passive Perception 10 + languages: Lizardfolk + cr: + attributes: + "Lithe": Sand Striders ignore movement penalties due to difficult terrain while in the desert. + "Hardy": Sand Striders can survive for up to two weeks without water. + "Ornery": Unless given a command by its rider, a Sand Strider will use its movement to approach the nearest target and make a bite attack. + "Bonded": A bonded Sand Strider acts on its rider's initiative. As a bonus action, the rider can command the strider to use its Bite or Spit attacks. + traits: + Actions: + attributes: + options: + "Bite": "+5 to hit, reach 5 ft., one target. Hit: 8 (1d8+3) Piercing damage." + "Spit": "Recharge 5-6. The Sand Strider spits a jet of magical fluid in a straight line 5ft wide and 30ft long. Each creature in the line must make a DC13 Dexterity saving throw. A creature that fails the save takes 2d6 damage, or half that if it succeeds. The damage type depends on the Sand Strider's sub-species variant." +--- + +Sand Striders are 6-legged giant lizards evolved to survive in the harsh magical climates of the Sahwat Desert. Despite their large size, standing nearly 5 feet at the shoulder and up to 10ft long from snout to tail, striders are quick, silent predators that move with ease on difficult terrain. While experienced hoppers quickly learn to stay well clear of the beasts, Lizardfolk tribes have been known to ride Sand Striders. Just how they are able to tame the great lizards is unknown. + +There are numerous sub-species, each with its own distinct coloration and elemental affinity, which determines the type of damage done by their spit: + +| Sub-Species | Damage Type | +| ----------- | ----------- | +| Blue | Lightning | +| White | Frost | +| Red | Fire | +| Green | Poison | +| Black | Acid | + diff --git a/deadsands/deadsands-theme/static/deadsands/css/style.css b/deadsands/deadsands-theme/static/deadsands/css/style.css index 0e42ee9..8d9d32c 100644 --- a/deadsands/deadsands-theme/static/deadsands/css/style.css +++ b/deadsands/deadsands-theme/static/deadsands/css/style.css @@ -706,13 +706,19 @@ a.disabled:hover { text-transform: capitalize; text-align: left; margin: 0; + margin-bottom: 1em; } .statblock table { - margin: 0; + margin: 2em 0; +} + +.statblock table.stats { + border: 1px solid #000; } .statblock table tr, .statblock table tr td { + text-align: center; background: inherit; } .statblock table tr th, @@ -720,17 +726,22 @@ a.disabled:hover { vertical-align: top; padding-right: 2em; } -.statblock table tr td:first-of-type { - font-weight: bold; - white-space: nowrap; -} -.statblock table tr td:first-of-type:last-of-type { - font-weight: normal; - white-space: wrap; + +.statblock table.properties td { + text-align: left } -.statblock table tr:last-child, -.statblock table tr:last-child { +.statblock table.properties tr td:first-of-type { + font-weight: bold; + width: 10%; + white-space: nowrap; +} +.statblock table.properties tr td:first-of-type:last-of-type { + font-weight: normal; +} + +.statblock table.properties tr:last-child, +.statblock table.properties tr:last-child { padding-right: 1em; } .statblock table tr:nth-child(even) { @@ -740,8 +751,6 @@ a.disabled:hover { background: rgba(255,255,255, 0.3); } - - .statblock dl { display: flex; flex-flow: row; diff --git a/deadsands/deadsands-theme/templates/monster.html b/deadsands/deadsands-theme/templates/monster.html index 29936e0..5a5957b 100644 --- a/deadsands/deadsands-theme/templates/monster.html +++ b/deadsands/deadsands-theme/templates/monster.html @@ -22,117 +22,7 @@ {% set target = article.title.replace(' ', '_') %} {% if self.is_dm() or article.show_dm_content %}
-

{{ article.title }}

-
- - {{m.size}} {{m.type}}{% if m.alignment %}, {{m.alignment}}{%endif%} - -
-
-
- Armor Class {{ m.AC }} -
-
- Hit Points {{ m.HP }} -
-
- Speed {{ m.speed }} -
-
- - - - - - - - - - - - -
STRDEXCONINTWISCHA
{{ m.STR }}{{ m.DEX }}{{ m.CON }}{{ m.INT }}{{ m.WIS }}{{ m.CHA }}
- -
- - {% if m.saving_throws %} -
- Saving Throws {{ m.saving_throws }} -
- {% endif %} - - {% if m.skills %} -
- Skills {{ m.skills }} -
- {% endif %} - - {% if m.resistances %} -
- Damage Resistances {{ m.resistances }} -
- {% endif %} - - {% if m.vulnerabilities %} -
- Damage Vulnerabilities {{ m.vulnerabilities }} -
- {% endif %} - - {% if m.damage_immunities %} -
- Damage Immunities {{ m.damage_immunities }} -
- {% endif %} - - {% if m.condition_immunities %} -
- Condition Immunities {{ m.condition_immunities }} -
- {% endif %} - - {% if m.saving_throws %} -
- Senses {{ m.senses }} -
- {% endif %} - - {% if m.languages %} -
- Languages {{ m.languages }} -
- {% endif %} - - {% if m.cr %} -
- Challenge {{ m.cr }} -
- {% endif %} - -
- - {% for (attr_name, attr_desc) in m.attributes.items() %} -
{{ attr_name }}. {{attr_desc}}
- {% endfor %} - - {% for section in ('Actions', 'Reactions', 'Legendary Actions', 'Legendary Reactions', 'Lair and Actions') %} - {% if section in m.traits %} - {% set trait = m.traits[section] %} - {% if 'attributes' in trait or 'options' in trait %} -

{{ section }}

- {% if trait.attributes %} - {% for (attr_name, attr_desc) in trait.attributes.items() %} -
{{ attr_name }}. {{attr_desc}}
- {% endfor %} - {% endif %} - {% if trait.options %} - {% for (attr_name, attr_desc) in trait.options.items() %} -
{{ attr_name }}. {{attr_desc}}
- {% endfor %} - {% endif %} - {% endif %} - {% endif %} - {% endfor %} + {% include "statblock.html" %}
{% endif %} diff --git a/deadsands/deadsands-theme/templates/statblock.html b/deadsands/deadsands-theme/templates/statblock.html new file mode 100644 index 0000000..45605b0 --- /dev/null +++ b/deadsands/deadsands-theme/templates/statblock.html @@ -0,0 +1,63 @@ +{% set stats = ['STR', 'DEX', 'CON', 'INT', 'WIS', 'CHA'] %} +

{{ article.title }}

+
+ + {{m.size}} {{m.type}}{% if m.alignment %}, {{m.alignment}}{%endif%} + +
+
+ + + + {% for stat in stats %} + + {% endfor %} + + + {% for stat in ['STR', 'DEX', 'CON', 'INT', 'WIS', 'CHA'] %} + {% set score, bonus = m[stat].split(',') %} + + {% endfor %} + +
{{ stat }}
{{score}}
{{bonus}}
+ + + + + + {% if m.skills %}{% endif %} + {% if m.saving_throws %}{% endif %} + {% if m.resistances %}{% endif %} + {% if m.vulnerabilities %}{% endif %} + {% if m.damage_immunities %}{% endif %} + {% if m.condition_immunities %}{% endif %} + {% if m.senses %}{% endif %} + {% if m.languages %}{% endif %} + {% if m.cr %}{% endif %} +
Armor Class{{ m.AC }}
Hit Points{{ m.HP }}
Speed{{ m.speed }}
Skills{{ m.skills }}
Saving Throws{{ m.saving_throws }}
Resistances{{ m.resistances }}
Vulnerabilities{{ m.vulnerabilities }}
Damage Immunities{{ m.damage_immunities }}
Condition Immunities{{ m.condition_immunities }}
Senses{{ m.senses }}
Languages{{ m.languages }}
Challenge Rating{{ m.cr }}
+ +
+ +{% for (attr_name, attr_desc) in m.attributes.items() %} +
{{ attr_name }}. {{attr_desc}}
+{% endfor %} + + {% for section in ('Actions', 'Reactions', 'Legendary Actions', 'Legendary Reactions', 'Lair and Actions') %} + {% if section in m.traits %} + {% set trait = m.traits[section] %} + {% if 'attributes' in trait or 'options' in trait %} +

{{ section }}

+ {% if trait.attributes %} + {% for (attr_name, attr_desc) in trait.attributes.items() %} +
{{ attr_name }}. {{attr_desc}}
+ {% endfor %} + {% endif %} + {% if trait.options %} + {% for (attr_name, attr_desc) in trait.options.items() %} +
{{ attr_name }}. {{attr_desc}}
+ {% endfor %} + {% endif %} + {% endif %} + {% endif %} +{% endfor %} + diff --git a/deadsands/site_tools/content_manager.py b/deadsands/site_tools/content_manager.py index 0788922..a80823e 100644 --- a/deadsands/site_tools/content_manager.py +++ b/deadsands/site_tools/content_manager.py @@ -4,6 +4,7 @@ from pathlib import Path from jinja2 import Environment, FileSystemLoader from pelican.utils import sanitised_join, slugify from pelican.writers import Writer +from pprint import pprint as print from site_tools import SETTINGS @@ -43,7 +44,7 @@ def create( target_path = base_path / SETTINGS["PATH"] / relpath dest = sanitised_join(str(target_path / target_filename)) - SETTINGS["WRITE_SELECTED"].append(dest) + #SETTINGS["WRITE_SELECTED"].append(dest) writer = Writer(target_path, settings=SETTINGS) writer.write_file( name=target_filename, diff --git a/deadsands/sources/psychadelic_effects.yaml b/deadsands/sources/psychadelic_effects.yaml index 4913b2c..285e7a3 100644 --- a/deadsands/sources/psychadelic_effects.yaml +++ b/deadsands/sources/psychadelic_effects.yaml @@ -23,7 +23,7 @@ Effect: - Why do we have to keep doing things? Doing things is hard. - Your movement speed is reduced by 10ft and you cannot use reactions. Advantage on saves against psychic effects. - Horror: - - You have stared into the abyss of your soul and only blackness awaits you. + - You have stared into the abyss of your soul and found only blackness. - Frightened by all creatures. Disadvantage on all saves against psychic effects. - Mania: - You are possessed by feverish mania; ideas and words tumble out of as quickly as possible. You cannot stop them.