aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-06-21 22:19:17 -0400
committerhistoria <[not public]>2026-06-21 22:19:17 -0400
commita3ae1e6aad696f584d138d9363c05dedff136a65 (patch)
tree81e615f7227bc9d1ec79ceefc7311ecde917b074 /data
parent84072ffe6365ad57c4976e9272762aa6db41de7e (diff)
downloadthehouseoficarus-a3ae1e6aad696f584d138d9363c05dedff136a65.tar.gz
feat: safespot system implemented
Diffstat (limited to 'data')
-rw-r--r--data/help/automap.yaml4
-rw-r--r--data/help/hide.yaml15
-rw-r--r--data/help/map.yaml6
-rw-r--r--data/help/map_height.yaml (renamed from data/help/mapheight.yaml)2
-rw-r--r--data/help/map_padding.yaml (renamed from data/help/mappadding.yaml)2
-rw-r--r--data/help/map_width.yaml (renamed from data/help/mapwidth.yaml)2
-rw-r--r--data/help/option.yaml2
-rw-r--r--data/help/safespot.yaml38
-rw-r--r--data/items/ammo/adamant_arrow.yaml1
-rw-r--r--data/items/ammo/bronze_arrow.yaml1
-rw-r--r--data/items/ammo/iron_arrow.yaml1
-rw-r--r--data/items/ammo/mithril_arrow.yaml1
-rw-r--r--data/items/ammo/rune_arrow.yaml1
-rw-r--r--data/items/ammo/steel_arrow.yaml1
-rw-r--r--data/objects/fence_post.yaml18
-rw-r--r--data/objects/rock_outcrop.yaml22
-rw-r--r--data/objects/simple_rock.yaml18
-rw-r--r--data/objects/tutorial_lever.yaml22
-rw-r--r--data/rooms/town/4.yaml10
19 files changed, 157 insertions, 10 deletions
diff --git a/data/help/automap.yaml b/data/help/automap.yaml
index 32b84cb..3cd1a2f 100644
--- a/data/help/automap.yaml
+++ b/data/help/automap.yaml
@@ -9,5 +9,5 @@ description: |
When enabled, the map command output is printed after each
room movement, so you always know where you are.
- Map size and padding are controlled by the mapwidth,
- mapheight, and mappadding options.
+ Map size and padding are controlled by the map_width,
+ map_height, and map_padding options.
diff --git a/data/help/hide.yaml b/data/help/hide.yaml
new file mode 100644
index 0000000..eb2d27a
--- /dev/null
+++ b/data/help/hide.yaml
@@ -0,0 +1,15 @@
+name: "hide"
+category: "Skills"
+description: |
+ Hide behind a safespot object to block melee attacks.
+
+ Usage: hide <object>
+ hide behind <object>
+ safespot <object>
+
+ Hiding takes 1 tick out of combat or 4 ticks while fighting. If a mob
+ hits you during repositioning in combat, the hide attempt fails.
+
+ Leave cover with: unhide (or unsafespot)
+
+ See also: help safespot, help combat
diff --git a/data/help/map.yaml b/data/help/map.yaml
index 3b4917a..7ca03a2 100644
--- a/data/help/map.yaml
+++ b/data/help/map.yaml
@@ -9,11 +9,11 @@ description: |
centered on your current location. You are shown as @.
Map size is controlled by:
- option mapwidth <num> (default 30)
- option mapheight <num> (default 20)
+ option map_width <num> (default 30)
+ option map_height <num> (default 20)
Padding/trimming is controlled by:
- option mappadding <mode>
+ option map_padding <mode>
none - strip blank lines + left-trim (default)
x - strip blank lines only
y - left-trim only
diff --git a/data/help/mapheight.yaml b/data/help/map_height.yaml
index ee3920b..32daf0a 100644
--- a/data/help/mapheight.yaml
+++ b/data/help/map_height.yaml
@@ -1,4 +1,4 @@
-name: "mapheight"
+name: "map_height"
category: "Options"
description: |
Height of the full map display in characters.
diff --git a/data/help/mappadding.yaml b/data/help/map_padding.yaml
index 201ef53..7772226 100644
--- a/data/help/mappadding.yaml
+++ b/data/help/map_padding.yaml
@@ -1,4 +1,4 @@
-name: "mappadding"
+name: "map_padding"
category: "Options"
description: |
Controls how the map command trims its output.
diff --git a/data/help/mapwidth.yaml b/data/help/map_width.yaml
index 7e372ef..3957bed 100644
--- a/data/help/mapwidth.yaml
+++ b/data/help/map_width.yaml
@@ -1,4 +1,4 @@
-name: "mapwidth"
+name: "map_width"
category: "Options"
description: |
Width of the full map display in characters.
diff --git a/data/help/option.yaml b/data/help/option.yaml
index 9fdcf7f..75b1794 100644
--- a/data/help/option.yaml
+++ b/data/help/option.yaml
@@ -15,7 +15,7 @@ description: |
Examples:
option tinymap off
option color ansi
- option mapwidth 50
+ option map_width 50
Use help <option> for details on a specific option.
Use 'prompt' to set a custom per-character prompt.
diff --git a/data/help/safespot.yaml b/data/help/safespot.yaml
new file mode 100644
index 0000000..76e1768
--- /dev/null
+++ b/data/help/safespot.yaml
@@ -0,0 +1,38 @@
+name: "safespot"
+category: "Skills"
+description: |
+ Use environmental cover to block melee attacks from mobs while
+ attacking with ranged or science weapons.
+
+ Usage: hide <object>
+ safespot <object>
+
+ Find a safespot: look <object>
+ Leave a safespot: unhide (or unsafespot)
+
+ While in a safespot, melee mobs cannot reach you. Ranged and science
+ mobs can still attack. Attacking with melee while in a safespot forces
+ you out of cover.
+
+ Safespots degrade over time while in use. Each degrade level shows a
+ different message. When fully degraded, the safespot is destroyed.
+ Some safespots respawn after a delay; others require you to re-hide
+ to reset them.
+
+ There is a small per-tick chance of being forced out of cover
+ (unsafe_chance). You can re-hide immediately if the safespot is
+ still intact.
+
+ Hiding out of combat takes 1 tick. Hiding while fighting takes 4
+ ticks — taking a hit during the repositioning aborts the attempt.
+
+ Your effective safespot tier is unlocked by completing quests and
+ combat achievements. Higher-tier safespots require quest flags like
+ "quest_animal_magnetism" or achievement flags like
+ "achieve_medium_combat".
+
+ You can customize the alert shown when you are forced out of a
+ safespot with: option safespot_alert <message>
+ Set to "none" to disable. Uses inline color tags.
+
+ See also: help hide, help combat, help option
diff --git a/data/items/ammo/adamant_arrow.yaml b/data/items/ammo/adamant_arrow.yaml
index cbed73f..72f9470 100644
--- a/data/items/ammo/adamant_arrow.yaml
+++ b/data/items/ammo/adamant_arrow.yaml
@@ -18,6 +18,7 @@ equip_slot: ammo
id: adamant_arrow
name: adamant arrow
stackable: true
+recoverable: true
stats:
ranged_strength: 31
value: 20
diff --git a/data/items/ammo/bronze_arrow.yaml b/data/items/ammo/bronze_arrow.yaml
index bc26583..a61823b 100644
--- a/data/items/ammo/bronze_arrow.yaml
+++ b/data/items/ammo/bronze_arrow.yaml
@@ -18,6 +18,7 @@ equip_slot: ammo
id: bronze_arrow
name: bronze arrow
stackable: true
+recoverable: true
stats:
ranged_strength: 7
value: 1
diff --git a/data/items/ammo/iron_arrow.yaml b/data/items/ammo/iron_arrow.yaml
index 4cd5bea..9e15967 100644
--- a/data/items/ammo/iron_arrow.yaml
+++ b/data/items/ammo/iron_arrow.yaml
@@ -18,6 +18,7 @@ equip_slot: ammo
id: iron_arrow
name: iron arrow
stackable: true
+recoverable: true
stats:
ranged_strength: 10
value: 2
diff --git a/data/items/ammo/mithril_arrow.yaml b/data/items/ammo/mithril_arrow.yaml
index 3f07c09..3eef148 100644
--- a/data/items/ammo/mithril_arrow.yaml
+++ b/data/items/ammo/mithril_arrow.yaml
@@ -18,6 +18,7 @@ equip_slot: ammo
id: mithril_arrow
name: mithril arrow
stackable: true
+recoverable: true
stats:
ranged_strength: 22
value: 10
diff --git a/data/items/ammo/rune_arrow.yaml b/data/items/ammo/rune_arrow.yaml
index 0b497ff..4876472 100644
--- a/data/items/ammo/rune_arrow.yaml
+++ b/data/items/ammo/rune_arrow.yaml
@@ -18,6 +18,7 @@ equip_slot: ammo
id: rune_arrow
name: rune arrow
stackable: true
+recoverable: true
stats:
ranged_strength: 49
value: 40
diff --git a/data/items/ammo/steel_arrow.yaml b/data/items/ammo/steel_arrow.yaml
index fb85c0d..916a2f3 100644
--- a/data/items/ammo/steel_arrow.yaml
+++ b/data/items/ammo/steel_arrow.yaml
@@ -18,6 +18,7 @@ equip_slot: ammo
id: steel_arrow
name: steel arrow
stackable: true
+recoverable: true
stats:
ranged_strength: 16
value: 5
diff --git a/data/objects/fence_post.yaml b/data/objects/fence_post.yaml
new file mode 100644
index 0000000..11f6160
--- /dev/null
+++ b/data/objects/fence_post.yaml
@@ -0,0 +1,18 @@
+id: fence_post
+name: fence post
+color: "137"
+hidden: true
+inroom_description: "A sturdy fence post juts from the ground."
+description: "A weathered wooden fence post, solid enough to crouch behind."
+safespot:
+ tier: 1
+ max_block_size: small
+ max_occupants: 1
+ unsafe_chance: 0.005
+ decay_ticks: 0
+ decay_chance: 0
+ respawn_on_hide: true
+ respawn_ticks: 0
+ levels:
+ - message: "You crouch behind the fence post, using it as cover."
+ degrade_message: ""
diff --git a/data/objects/rock_outcrop.yaml b/data/objects/rock_outcrop.yaml
new file mode 100644
index 0000000..57b71d8
--- /dev/null
+++ b/data/objects/rock_outcrop.yaml
@@ -0,0 +1,22 @@
+id: rock_outcrop
+name: rock outcrop
+color: "248"
+hidden: true
+inroom_description: "A jagged rock outcrop juts from the floor."
+description: "A large, jagged rock formation providing natural cover."
+safespot:
+ tier: 1
+ max_block_size: large
+ max_occupants: 3
+ unsafe_chance: 0.008
+ decay_ticks: 500
+ decay_chance: 0.01
+ respawn_on_hide: false
+ respawn_ticks: 300
+ levels:
+ - message: "The rock formation stands solid."
+ degrade_message: "The rock structure begins crumbling!"
+ - message: "The rock outcrop is cracked and worn."
+ degrade_message: "A few jagged bits are all that's left of the rock outcrop!"
+ - message: "Only a few jagged rocks remain."
+ degrade_message: "The rock outcrop crumbles to nothing!"
diff --git a/data/objects/simple_rock.yaml b/data/objects/simple_rock.yaml
new file mode 100644
index 0000000..4c03308
--- /dev/null
+++ b/data/objects/simple_rock.yaml
@@ -0,0 +1,18 @@
+id: simple_rock
+name: rock formation
+color: "248"
+hidden: true
+inroom_description: "A sturdy rock formation juts from the ground."
+description: "A solid rock formation, weathered but large enough to crouch behind."
+safespot:
+ tier: 1
+ max_block_size: small
+ max_occupants: 2
+ unsafe_chance: 0.002
+ decay_ticks: 0
+ decay_chance: 0
+ respawn_on_hide: true
+ respawn_ticks: 0
+ levels:
+ - message: "You crouch behind the rock formation, using it as cover."
+ degrade_message: ""
diff --git a/data/objects/tutorial_lever.yaml b/data/objects/tutorial_lever.yaml
new file mode 100644
index 0000000..894dd07
--- /dev/null
+++ b/data/objects/tutorial_lever.yaml
@@ -0,0 +1,22 @@
+id: tutorial_lever
+name: stone lever
+color: "250"
+hidden: true
+inroom_description: "A stone lever protrudes from the base of the rock formation."
+description: "A weathered stone lever set into a metal bracket. It looks like it can be pulled."
+use_interactions:
+ - condition:
+ player_flag: unlocked_rock_cover
+ value: 1
+ not: true
+ message: "You pull the stone lever down. A mechanism clicks into place somewhere in the glade."
+ action:
+ set_player_flags:
+ unlocked_rock_cover: 1
+ - condition:
+ player_flag: unlocked_rock_cover
+ value: 1
+ message: "You push the stone lever back up. The mechanism disengages with a soft clunk."
+ action:
+ set_player_flags:
+ unlocked_rock_cover: 0
diff --git a/data/rooms/town/4.yaml b/data/rooms/town/4.yaml
index 2c9f27f..5a8b036 100644
--- a/data/rooms/town/4.yaml
+++ b/data/rooms/town/4.yaml
@@ -1,6 +1,6 @@
id: 4
name: "Woodcutting Glade"
-description: "A sunny glade at the edge of the forest. A sturdy tree stands here, perfect for practicing woodcutting."
+description: "A sunny glade at the edge of the forest. A sturdy tree stands here, perfect for practicing woodcutting. A solid rock formation near the edge of the glade looks like it could provide cover."
map_symbol: "W"
exits:
east: 6
@@ -11,6 +11,8 @@ objects:
- id: tree
- id: tree
- id: tree
+ - id: simple_rock
+ - id: tutorial_lever
mobs:
- id: rat
- id: rat
@@ -27,3 +29,9 @@ item_spawns:
- id: lighter
quantity: 1
respawn_ticks: 120
+ - id: shortbow
+ quantity: 1
+ respawn_ticks: 60
+ - id: bronze_arrow
+ quantity: 100
+ respawn_ticks: 60