restock now restocks all stores in a location
This commit is contained in:
parent
d0f4282220
commit
4cdf3a79af
|
@ -4,22 +4,21 @@
|
||||||
title: Angry Andok's Apothecary
|
title: Angry Andok's Apothecary
|
||||||
author: evilchili
|
author: evilchili
|
||||||
show_dm_content: False
|
show_dm_content: False
|
||||||
location: Tano's Edge
|
tags: post
|
||||||
tags: store
|
date: 2024-01-19 15:52:02.250514
|
||||||
date: 2023-05-13 13:18:26.226450
|
|
||||||
description: Was that a short joke?! I'll gut you! See if I don't!<br>--Andok
|
description: Was that a short joke?! I'll gut you! See if I don't!<br>--Andok
|
||||||
status: published
|
status: published
|
||||||
---
|
---
|
||||||
|
|
||||||
Andok's is a cantankerous dwarf who specializes in nonmagical salves, potions,
|
Andok is a cantankerous dwarf who specializes in nonmagical salves, potions, and reagants. He makes a killing
|
||||||
and reagents. He makes a killing supplying hoppers who wisely avoid magical
|
supplying hoppers who wisely avoid magical healing when in the desert, but is notorious for his quick, violent
|
||||||
healing when in the desert, but is notorious for his quick, violent temper and
|
temper and contempt for, well, pretty much everything and everyone. He remains stubbornly unaligned, but his wares
|
||||||
contempt for, well, pretty much everything and everyone. He remains stubbornly
|
are so useful the Liberty Sisters don't dare chase him out of town.
|
||||||
unaligned, but his wares are so useful the Liberty Sisters don't dare chase him
|
|
||||||
out of town.
|
|
||||||
|
|
||||||
"Andok's Elixirs" are reliable, if vile, substitutes for potions of healing, if you can afford them.
|
"Andok's Elixirs" are reliable, if vile, substitutes for potions of healing, if you can afford them.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Location: **Tano's Edge**
|
Location: **Tano's Edge**
|
||||||
|
|
||||||
Faction: **Unaligned**
|
Faction: **Unaligned**
|
||||||
|
@ -27,12 +26,20 @@ Faction: **Unaligned**
|
||||||
|
|
||||||
### Current Stock
|
### Current Stock
|
||||||
|
|
||||||
| Rarity | Item | Description | Value | Weight |
|
| Rarity | Item | Description | Value | Weight |
|
||||||
| --------- | ------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------- | ------ |
|
| -------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------ |
|
||||||
| Common | Andok's Elixir of Healing | Heals 2d4 +2 | 200 GP | 0.5 Lb |
|
| Rare | | | | |
|
||||||
| Rare | Andok's Elixir of the Oasis (Special Order) | You do not suffer exhaustion due to dehydration for up to 3 days. After 3 days, you gain one point of exhaustion for each day you went without water. | 1000 GP | 0.5 Lb |
|
| Rare | Andok's Amazing Cure-All Elixir of Survival (Special Order) | Grants 2d4+4 temporary hit points, cures the poision condition, removes curses (Lvl 3 or lower) | 2000 GP | 0.5 Lb |
|
||||||
| Rare | Andok's Superior Elixir of Healing (Special Order) | Heals 8d4+8 | 2000 GP | 0.5 Lb |
|
| Common | Andok's Elixir of Healing | Heals 2d4 +2 | 200 GP | 0.5 Lb |
|
||||||
| Uncommon | Andok's Elixir of Fire Resistence | Grants resistence to fire damage for a half-day. | 500 GP | 0.5 Lb |
|
| Common | Andok's Elixir of Healing | Heals 2d4 +2 | 200 GP | 0.5 Lb |
|
||||||
| Uncommon | Andok's Elixir of Poison Resistence | Grants resistence to poison damage and advantage on saves against the Poisoned condition for a half-day. | 500 GP | 0.5 Lb |
|
| Rare | Andok's Elixir of the Oasis (Special Order) | You do not suffer exhaustion due to dehydration for up to 3 days. After 3 days, you gain one point of exhaustion for each day you went without water. | 1000 GP | 0.5 Lb |
|
||||||
| Uncommon | Andok's Elixir of the Berserker | Grants the Rage ability for 1 hour. | 800 GP | 0.5 Lb |
|
| Common | Andok's Elixir of Healing | Heals 2d4 +2 | 200 GP | 0.5 Lb |
|
||||||
| Very Rare | Andok's Fuckin' Great Elixir of Healing (Special Order) | Heals 10d4+20 | 200000 GP | 0.5 Lb |
|
| Common | Andok's Elixir of Healing | Heals 2d4 +2 | 200 GP | 0.5 Lb |
|
||||||
|
| Rare | Andok's Amazing Cure-All Elixir of Survival (Special Order) | Grants 2d4+4 temporary hit points, cures the poision condition, removes curses (Lvl 3 or lower) | 2000 GP | 0.5 Lb |
|
||||||
|
| Common | Andok's Elixir of Healing | Heals 2d4 +2 | 200 GP | 0.5 Lb |
|
||||||
|
| Uncommon | Andok's Elixir of Fire Resistence | Grants resistence to fire damage for a half-day. | 500 GP | 0.5 Lb |
|
||||||
|
| Uncommon | Andok's Elixir of Poison Resistence | Grants resistence to poison damage and advantage on saves against the Poisoned condition for a half-day. | 500 GP | 0.5 Lb |
|
||||||
|
| Uncommon | Andok's Elixir of Fire Resistence | Grants resistence to fire damage for a half-day. | 500 GP | 0.5 Lb |
|
||||||
|
| Rare | Andok's Superior Elixir of Healing (Special Order) | Heals 8d4+8 | 2000 GP | 0.5 Lb |
|
||||||
|
| Uncommon | Andok's Greater Elixir of Healing | Heals 4d4+4 | 400 GP | 0.5 Lb |
|
||||||
|
| Uncommon | Andok's Elixir of Poison Resistence | Grants resistence to poison damage and advantage on saves against the Poisoned condition for a half-day. | 500 GP | 0.5 Lb |
|
||||||
|
|
|
@ -4,10 +4,8 @@
|
||||||
title: General's Store
|
title: General's Store
|
||||||
author: evilchili
|
author: evilchili
|
||||||
show_dm_content: False
|
show_dm_content: False
|
||||||
location: Tano's Edge
|
tags: post
|
||||||
faction: Liberty Sisters
|
date: 2024-01-19 15:52:18.731958
|
||||||
tags: store
|
|
||||||
date: 2023-04-12 17:52:34.363950
|
|
||||||
description: Inventory subject to availability, prices subject to change, haggle at your own risk. -- The General
|
description: Inventory subject to availability, prices subject to change, haggle at your own risk. -- The General
|
||||||
status: published
|
status: published
|
||||||
---
|
---
|
||||||
|
@ -20,6 +18,8 @@ The general supply is well-stocked with basic adventuring gear and a healthy cli
|
||||||
items high. The General has a reputation for being able to move just about anything, from random metal scraps to
|
items high. The General has a reputation for being able to move just about anything, from random metal scraps to
|
||||||
gardening supplies to artifacts of historical interest.
|
gardening supplies to artifacts of historical interest.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Location: **Tano's Edge**
|
Location: **Tano's Edge**
|
||||||
|
|
||||||
Faction: **Liberty Sisters**
|
Faction: **Liberty Sisters**
|
||||||
|
@ -27,18 +27,22 @@ Faction: **Liberty Sisters**
|
||||||
|
|
||||||
### Current Stock
|
### Current Stock
|
||||||
|
|
||||||
| Rarity | Item | Description | Value | Weight |
|
| Rarity | Item | Description | Value | Weight |
|
||||||
| -------- | -------------------- | ------------------------------------------------------- | ------ | ------ |
|
| -------- | ----------------- | ------------------------------------------------------- | ------ | ------ |
|
||||||
| Common | Alchemist's Supplies | | 100 GP | 8 Lb |
|
| Supplies | Pistol Ammunition | 5 count (nonaligned pricing) | 3 GP | 0.1 lb |
|
||||||
| Common | Carpenter's Tools | | 16 GP | 6 Lb |
|
| Supplies | Arrows | 20 count (imported) | 5 GP | 1 Lb |
|
||||||
| Common | Lantern, Bullseye | | 20 GP | 2 Lb |
|
| Supplies | Water | 1 Gallon of water, enough for 1 medium creature per day | 1 GP | 4 Lbs |
|
||||||
| Common | Lantern, Hooded | | 10 GP | 2 Lb |
|
| Common | Jeweler's Tools | | 50 GP | 2 Lb |
|
||||||
| Common | Smith's Tools | | 40 GP | 8 Lb |
|
| Common | Ball Bearings | (bag of 1000) | 2 GP | 2 Lb |
|
||||||
| Supplies | 10ft Pole | | 1 GP | 7 Lb |
|
| Supplies | Crossbow Bolts | 20 count (imported) | 5 GP | 1 Lb |
|
||||||
| Supplies | Arrows | 20 count (imported) | 5 GP | 1 Lb |
|
| Supplies | Rope | Hemp, 50ft | 2 GP | 10 Lb |
|
||||||
| Supplies | Crossbow Bolts | 20 count (imported) | 5 GP | 1 Lb |
|
| Supplies | Torch | | 1 SP | 0.5 Lb |
|
||||||
| Supplies | Dungeoneer's Pack | PHB, page 151 | 24 GP | 61 Lb |
|
| Supplies | Explorer's Pack | PHB, page 151 | 20 GP | 59 Lb |
|
||||||
| Supplies | Pistol Ammunition | 5 count (nonaligned pricing) | 3 GP | 0.1 lb |
|
| Supplies | Oil (flask) | 0.5 Lb | 2 SP | |
|
||||||
| Supplies | Rations | Enough food for one person per day, desert travel | 1 GP | 0.5 Lb |
|
| Supplies | Rations | Enough food for one person per day, desert travel | 1 GP | 0.5 Lb |
|
||||||
| Supplies | Rope | Hemp, 50ft | 2 GP | 10 Lb |
|
| Supplies | Pistol Ammunition | 5 count (nonaligned pricing) | 3 GP | 0.1 lb |
|
||||||
| Supplies | Water | 1 Gallon of water, enough for 1 medium creature per day | 1 GP | 4 Lbs |
|
| Common | Tinker's Tools | | 100 GP | 10 Lb |
|
||||||
|
| Supplies | Pistol Ammunition | 5 count (nonaligned pricing) | 3 GP | 0.1 lb |
|
||||||
|
| Supplies | Torch | | 1 SP | 0.5 Lb |
|
||||||
|
| Supplies | Water | 1 Gallon of water, enough for 1 medium creature per day | 1 GP | 4 Lbs |
|
||||||
|
| Supplies | 10ft Pole | | 1 GP | 7 Lb |
|
||||||
|
|
|
@ -5,7 +5,6 @@ from pathlib import Path
|
||||||
import click
|
import click
|
||||||
import typer
|
import typer
|
||||||
from rolltable.types import RollTable
|
from rolltable.types import RollTable
|
||||||
from typing_extensions import Annotated
|
|
||||||
|
|
||||||
from site_tools.content_manager import create
|
from site_tools.content_manager import create
|
||||||
from site_tools import build_system
|
from site_tools import build_system
|
||||||
|
@ -29,6 +28,11 @@ class Die(str, Enum):
|
||||||
d4 = "4"
|
d4 = "4"
|
||||||
|
|
||||||
|
|
||||||
|
source_path = Path(build_system.CONFIG['data_path']).expanduser() / build_system.CONFIG['campaign_name'] / 'sources'
|
||||||
|
locations = dict((loc.name, loc) for loc in (source_path / 'stores').iterdir() if loc.is_dir())
|
||||||
|
Location = Enum("Location", ((name, name) for name in locations.keys()))
|
||||||
|
|
||||||
|
|
||||||
# 'site' ENTRY POINT
|
# 'site' ENTRY POINT
|
||||||
site_app = typer.Typer()
|
site_app = typer.Typer()
|
||||||
|
|
||||||
|
@ -64,30 +68,27 @@ def publish() -> None:
|
||||||
|
|
||||||
@site_app.command()
|
@site_app.command()
|
||||||
def restock(
|
def restock(
|
||||||
source: str = typer.Argument(..., help="The source file for the store."),
|
location: Location = typer.Argument(..., help="Where to restock."),
|
||||||
frequency: str = Annotated[str, typer.Option("default", help="use the specified frequency from the source file")],
|
frequency: str = typer.Option("default", help="use the specified frequency from the source file"),
|
||||||
die: Die = typer.Option(20, help="The size of the die for which to create a table"),
|
die: Die = typer.Option('20', help="The size of the die for which to create a table"),
|
||||||
template_dir: str = Annotated[
|
template_dir: str = typer.Argument(
|
||||||
str,
|
build_system.CONFIG["templates_path"],
|
||||||
typer.Argument(
|
help="Override the default location for markdown templates.",
|
||||||
build_system.CONFIG["templates_path"],
|
),
|
||||||
help="Override the default location for markdown templates.",
|
|
||||||
),
|
|
||||||
],
|
|
||||||
) -> None:
|
) -> None:
|
||||||
rt = RollTable([Path(source).read_text()], frequency=frequency, die=die, hide_rolls=True)
|
for store in locations[location.name].iterdir():
|
||||||
store = rt.datasources[0].metadata["store"]
|
rt = RollTable([store.read_text()], frequency=frequency, die=int(die), hide_rolls=True)
|
||||||
|
store_attributes = rt.datasources[0].metadata["store"]
|
||||||
click.edit(
|
click.edit(
|
||||||
filename=create(
|
filename=create(
|
||||||
content_type="post",
|
content_type="post",
|
||||||
title=store["title"],
|
title=store_attributes["title"],
|
||||||
template_dir=template_dir,
|
template_dir=template_dir,
|
||||||
category="stores",
|
category="stores",
|
||||||
template="store",
|
template="store",
|
||||||
extra_context=dict(inventory=rt.as_markdown, **store),
|
extra_context=dict(inventory=rt.as_markdown(), **store_attributes),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
@site_app.command()
|
@site_app.command()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user