diff --git a/docs/architecture.md b/docs/architecture.md index 1d1fb48..62b9679 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -179,9 +179,9 @@ A village may fail through war or bad play, but it must never get stuck. Every l The seeded worlds are in `config/worlds.php`. `WorldSeeder` makes a world from there when it doesn't exist yet; a world that exists keeps its config. -- **World 1** runs at Die Stämme's classic pace: `{world: {speed: 4}, movement: {unit_speed: 0.5}}`. Building, production, recruiting and everything else at world speed run 4 times as fast, marches twice as fast (a spearman takes 9 minutes a field). Beginner protection, inactivity and raids stay in real time. A season's crowns come 7.5 real days after the start, and holding them takes 42 hours. +- **World 1** runs at Die Stämme's classic pace: `{world: {speed: 4}, movement: {unit_speed: 0.5}}`. Building, production, recruiting and everything else at world speed run 4 times as fast, marches twice as fast (a spearman takes 9 minutes a field). Beginner protection, inactivity, raids and the season stay in real time. - The **dev world** runs at speed 100. -- The live World 1 ran at speed 1 until the migration `world_one_at_speed_four` set those two keys. It first settled every World 1 village at speed 1 (stock and loyalty), then set each food timer for the new rates, and moved `started_at` up so the world days already played stay played. Timers already set kept their times; only new ones run at speed 4. +- The live World 1 ran at speed 1 until the migration `world_one_at_speed_four` set those two keys. It first settled every World 1 village at speed 1 (stock and loyalty), then set each food timer for the new rates. `started_at` stayed, since a season counts real days. Timers already set kept their times; only new ones run at speed 4. - Feature tests seed World 1 at speed 1 (`tests/Pest.php`). A building entry looks like this (numbers start TW-like): @@ -356,7 +356,7 @@ Players band together in tribes (`Tribes` action, `tribe.*` over WS, rules in `D - `account.show|password|delete` over WS. Deleting needs the password: on every world the player's villages turn barbarian (`Abandon`), a tribe they lead goes to the strongest council member (else the strongest member) or ends with them, then the players and the account go, and with them their reports, quests and chat messages. - **Losing a village** ("geadelt"): the conquest hands it over (`Nobility::handOver`, which shares `release()` with abandoning: queues end, the owner's groups from and to it are lost, its support elsewhere too), the old owner gets the defence report and a `village:lost {world_id, village_id, name, x, y, by}` whisper, so an open client leaves the village's screens. With no village left, `world.index` marks the world `fallen` and `world.join` starts the player over on the frontier, with fresh beginner protection (`players.protected_since`; protection lasts `combat.beginner_protection` from then, in real time). - **Abandoned accounts**: every village action records `players.last_active_at` (at most every 5 minutes). Once a minute the worker turns the villages of players not seen for `world.inactive_days` (14, real days: it measures people, not world time) barbarian (`Abandon::inactive`); the player can come back and start again. A barbarian made this way keeps its buildings and stock, sends other players' support home, loses the owner's troops and queues, grows, and holds a garrison like any other. -- `world.index` gives each world its players, villages, tribes, start, season state and the player's own state; `world.settings` the rules in plain units (durations in seconds at the world's speed; protection, inactivity and raids in real seconds) for the world overview. +- `world.index` gives each world its players, villages, tribes, start, season state and the player's own state; `world.settings` the rules in plain units (durations in seconds at the world's speed; protection, inactivity, raids and the season in real seconds) for the world overview. ## Chat @@ -369,8 +369,8 @@ Players talk on their world (`Chat` action, `chat.*` over WS). The client names A world is a season with a winner (`world.season`, rules in `Season`, rows in `Seasons`). -- `crowns_after_days` (30, at world speed) after `started_at`, `crowns` (5) crown forts appear evenly round a ring of `radius` (10) fields about 0|0, each on the free field nearest its spot (`villages.crown`). They are barbarian villages with the `season.buildings` levels (wall 20, farm 30) and the fixed `season.garrison`, which regroups like any garrison (`Barbarians::full`). They never grow and never raid. -- A crown is taken like any village, by noblemen. Each handover of a crown recounts: the player who holds more than half (3 of 5) becomes the world's `holder_player_id`, and `ends_at` is set `hold_days` (7, at world speed) out. Losing the majority clears both; winning it back starts the clock over. +- `crowns_after_days` (30 real days, on every world speed, like protection and raids) after `started_at`, `crowns` (5) crown forts appear evenly round a ring of `radius` (10) fields about 0|0, each on the free field nearest its spot (`villages.crown`). They are barbarian villages with the `season.buildings` levels (wall 20, farm 30) and the fixed `season.garrison`, which regroups like any garrison (`Barbarians::full`). They never grow and never raid. +- A crown is taken like any village, by noblemen. Each handover of a crown recounts: the player who holds more than half (3 of 5) becomes the world's `holder_player_id`, and `ends_at` is set `hold_days` (7 real days) out. Losing the majority clears both; winning it back starts the clock over. - The `game:events` worker ticks `Seasons::tick` before every loop: it places due crowns and ends a world whose holder reached `ends_at` (`ended_at` is that moment, `winner_player_id` the holder). The next world opens at once with the same config, its slug and name counted up (`w1` → `w2`). An ended world stays readable, but every change, join and raid there is refused (`world_ended`). - The village payload carries `season` (`SeasonPresenter`): when the crowns come, the crowns with their owners, the holder, `ends_at`, and the winner. `world.index` carries `ended_at` and `winner`, `map.view` a `crown` flag.