Zones can now define spawn rules in TOML: - [[spawns]] sections specify mob type, max count, and respawn timer - SpawnRule dataclass stores configuration - load_zone() parses spawn rules from TOML - Added example spawn rules to treehouse zone (squirrel, crow) This is configuration infrastructure only - actual spawning logic will be handled by the game loop in a future phase.
51 lines
1,001 B
TOML
51 lines
1,001 B
TOML
name = "treehouse"
|
|
description = "a sprawling treehouse platform high in an ancient oak, branches creaking in the wind"
|
|
width = 20
|
|
height = 15
|
|
toroidal = false
|
|
spawn_x = 10
|
|
spawn_y = 7
|
|
|
|
[terrain]
|
|
rows = [
|
|
"~TTTTTTTTTTTTTTTTTT~",
|
|
"~TToooooooooooooTTT~",
|
|
"~TToo..........ooTT~",
|
|
"~TTo............oT~~",
|
|
"~TTo............oT~~",
|
|
"~TTo............oT~~",
|
|
"~TTo............oT~~",
|
|
"...o............oT~~",
|
|
"~TTo............oT~~",
|
|
"~TTo............oT~~",
|
|
"~TTo............oT~~",
|
|
"~TTo............oT~~",
|
|
"~TToo..........ooT~~",
|
|
"~TTToooooooooooTTT~~",
|
|
"~TTT...oooo...TTTT~~",
|
|
]
|
|
|
|
[terrain.impassable]
|
|
tiles = ["o", "~"]
|
|
|
|
[[portals]]
|
|
x = 10
|
|
y = 14
|
|
target = "overworld:500,500"
|
|
label = "a rope ladder dangles into the mist below"
|
|
|
|
[[portals]]
|
|
x = 0
|
|
y = 7
|
|
target = "hub:7,14"
|
|
label = "a narrow branch leads to a distant platform"
|
|
|
|
[[spawns]]
|
|
mob = "squirrel"
|
|
max_count = 2
|
|
respawn_seconds = 180
|
|
|
|
[[spawns]]
|
|
mob = "crow"
|
|
max_count = 1
|
|
respawn_seconds = 300
|