aboutsummaryrefslogtreecommitdiff
path: root/worldbuilding_guide
diff options
context:
space:
mode:
authorworkhorse <workhorse@localhost.localdomain>2026-06-19 03:57:06 -0400
committerworkhorse <workhorse@localhost.localdomain>2026-06-19 03:57:06 -0400
commit52a3ce6a4b4a254dc5d3067979a09e93c060fa20 (patch)
tree167c62990013733bc8669c1387078bc86ea48db5 /worldbuilding_guide
parentfbd1c30d7b9777c9df6653f0c393afa7a7dfa519 (diff)
downloadthehouseoficarus-52a3ce6a4b4a254dc5d3067979a09e93c060fa20.tar.gz
feat: shops and rough assassin skill
Diffstat (limited to 'worldbuilding_guide')
-rw-r--r--worldbuilding_guide/behaviors.md67
-rw-r--r--worldbuilding_guide/conditions.md4
-rw-r--r--worldbuilding_guide/mobs.md64
-rw-r--r--worldbuilding_guide/objects.md31
4 files changed, 166 insertions, 0 deletions
diff --git a/worldbuilding_guide/behaviors.md b/worldbuilding_guide/behaviors.md
index 8e47883..aa46073 100644
--- a/worldbuilding_guide/behaviors.md
+++ b/worldbuilding_guide/behaviors.md
@@ -197,6 +197,12 @@ nodes:
| `take_item` | Removes an item from the player's inventory |
| `teleport` | Moves the player to a room ID |
| `heal` | Restores that many hitpoints |
+| `cost` | Credits charged for the action |
+| `shop` | Opens a buy/sell shop interface (see Shop section below) |
+| `assign_task` | Assigns a random assassin task to the player based on their assassin level |
+| `skip_task` | Cancels current assassin task, costs 30 reputation, resets streak |
+| `extend_task` | Adds 50% more kills to current task, costs 30 reputation |
+| `reputation_cost` | Deducts reputation from the player's `assassin_reputation` flag (fails node if insufficient) |
All fields in a single action are processed together — you can give an item, take an item, set flags, and heal all in one node.
@@ -212,6 +218,67 @@ action:
teleport: 1 # return to town
```
+#### Shop (buy/sell interface)
+
+The `shop` node action opens a dedicated buy/sell interface. The player can browse
+items, buy with credits, and sell items back. Define a shop on a talk node:
+
+```yaml
+action:
+ shop:
+ message: "What would you like to buy or sell?"
+ items:
+ - item_id: fishing_rod
+ buy_price: 10
+ sell_price: 2
+ - item_id: fishing_bait
+ buy_price: 2
+ sell_price: 0
+```
+
+| Field | Description |
+|---|---|
+| `shop.message` | Greeting shown when entering the shop |
+| `shop.items` | List of items for sale |
+| `item_id` | Item definition ID |
+| `buy_price` | Credits to buy from shop |
+| `sell_price` | Credits shop pays (0 = won't buy) |
+
+Typical shop flow: a talk node with a "Browse" option leads to a `shop` node.
+When the player leaves the shop, they return to the talk node's options.
+
+Full example — General Store:
+```yaml
+id: general_store
+type: talk
+nodes:
+ start:
+ message: "\"Welcome to the General Store!\""
+ options:
+ - text: "\"I'd like to browse.\""
+ goto: shop
+ - text: "\"Goodbye.\""
+ end: true
+ shop:
+ message: "\"Take your time.\""
+ action:
+ shop:
+ message: "What would you like to buy or sell?"
+ items:
+ - item_id: fishing_rod
+ buy_price: 10
+ sell_price: 2
+ - item_id: hammer
+ buy_price: 20
+ sell_price: 5
+ options:
+ - text: "\"I'm done.\""
+ goto: start
+```
+
+Node options on the shop node are shown when the player leaves the shop.
+Use `goto: start` to loop back to the main greeting.
+
### Toggle (levers, switches, gates)
Simple toggle that sets a world flag:
diff --git a/worldbuilding_guide/conditions.md b/worldbuilding_guide/conditions.md
index ce9f74c..773230b 100644
--- a/worldbuilding_guide/conditions.md
+++ b/worldbuilding_guide/conditions.md
@@ -28,6 +28,10 @@ condition:
condition:
has_item: bronze_key
not: true
+
+# Check if player has enough credits
+condition:
+ min_credits: 50
```
### Compound conditions
diff --git a/worldbuilding_guide/mobs.md b/worldbuilding_guide/mobs.md
index 55c41b0..3826dda 100644
--- a/worldbuilding_guide/mobs.md
+++ b/worldbuilding_guide/mobs.md
@@ -104,5 +104,69 @@ idle_descriptions:
Note: `wander_rooms` and `wander_interval` are NOT set on the mob definition. Wander config
is per-instance in the room YAML (see Rooms > Mobs section above).
+### Stealable Mobs
+
+Mobs can be stealable via the `steal` command. On failure, the mob turns hostile and attacks.
+
+```yaml
+id: farmer
+name: Farmer
+steal_table: farmer_steal # Drop table for steal loot
+steal_level: 10 # Required thieving level
+steal_xp: 15 # XP per successful steal
+steal_speed: 4 # Ticks per steal attempt
+```
+
+| Field | Description |
+|---|---|
+| `steal_table` | Drop table ID for loot when stealing |
+| `steal_level` | Required thieving level |
+| `steal_xp` | XP awarded per successful steal |
+| `steal_speed` | Ticks per steal attempt (base wait) |
+
+### Assassin Mobs
+
+Assassin (Slayer) mobs restrict combat by assassin level and introduce finishing blows and protective equipment:
+
+```yaml
+id: slug
+name: slug
+assassin_level: 1 # required assassin level to attack
+finishing_blow: salt # item required to kill (mob stays at 1 HP otherwise)
+attack: 3
+strength: 3
+defense: 1
+hp: 15
+speed: 6
+drops:
+ remains: slug_mucus
+ loot:
+ - item_id: credits
+ weight: 100
+ quantity: 15
+```
+
+Damage-without mobs deal 1.5x damage unless the player has the specified item equipped:
+```yaml
+id: drone
+name: drone
+assassin_level: 15
+damage_without: insulated_gloves # 1.5x damage without this item equipped
+attack: 15
+strength: 14
+defense: 12
+hp: 45
+speed: 4
+aggressive: true
+```
+
+| Field | Description |
+|---|---|
+| `assassin_level` | Required assassin skill level to attack this mob |
+| `finishing_blow` | Item ID required to kill this mob (mob stays at 1 HP until used via `use <item> on <target>`) |
+| `damage_without` | Item ID for protection — mob deals 1.5x damage if player doesn't have it equipped |
+
+Mobs without these fields work normally (assassin_level defaults to 0, finishing_blow and damage_without default to empty).
+
---
diff --git a/worldbuilding_guide/objects.md b/worldbuilding_guide/objects.md
index 3644a18..1c1aebb 100644
--- a/worldbuilding_guide/objects.md
+++ b/worldbuilding_guide/objects.md
@@ -119,3 +119,34 @@ use_interactions:
---
+## Stealable Objects
+
+Objects can be stealable via the `steal` command. These use the same drop table system as mobs and searches.
+
+```yaml
+id: market_stall
+name: Market Stall
+description: "A wooden stall piled with food and sundries."
+steal_table: market_stall_steal
+steal_level: 5
+steal_xp: 12
+steal_speed: 5
+guard_mob: guard
+```
+
+| Field | Description |
+| ------------- | ------------------------------------------------ |
+| `steal_table` | Drop table ID for loot when stealing |
+| `steal_level` | Required thieving level |
+| `steal_xp` | XP awarded per successful steal |
+| `steal_speed` | Ticks per steal attempt (base wait) |
+| `guard_mob` | Mob def ID that guards this object (watches it) |
+
+When `guard_mob` is set, a mob with that def ID in the same room watches the object
+on a tick-based cycle (8 ticks watching, 4 ticks looking away). While the guard is
+watching, steal success chance is halved and failures trigger a confrontation dialog.
+
+Use the `sneak` command to see guard watch state changes in real time.
+
+---
+