init
This commit is contained in:
commit
276d43613d
1687 changed files with 109059 additions and 0 deletions
97
game/RULES.md
Normal file
97
game/RULES.md
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
# Harvest Season — rules of the vacation
|
||||
|
||||
The rule set every other system follows. Decision numbers (D1–D10) refer to
|
||||
`first-game-plan.md`, section 2. Every number is a starting value in
|
||||
`res://game/resources/game_config.tres` (`GameConfig`) and gets tuned during balancing.
|
||||
|
||||
Enforced in code: phases, timers, outcomes, loss records, and the retry snapshot
|
||||
(`CampaignController`, `FarmState`). Theft, combat, and building rules are written here first,
|
||||
and later steps implement them as shown in the last column of each table.
|
||||
|
||||
## The vacation
|
||||
|
||||
- The farmers are away for **five nights**. The scarecrow protects the farm until they return.
|
||||
- Each night is one cycle: **Morning → Day → Dusk → Night → Dawn**. After the fifth dawn the
|
||||
farmers return, which ends the game, and the farm is assessed on what remains.
|
||||
- Losses carry over. Stolen crops don't regrow, lost animals don't come back, and stolen supplies
|
||||
are gone. Damaged structures stay damaged until repaired.
|
||||
|
||||
## Phases
|
||||
|
||||
| Phase | Length | What happens | Enforced |
|
||||
|---|---|---|---|
|
||||
| Morning | Untimed | Review last night's losses and damage. The day starts when the player dismisses the review. | Now |
|
||||
| Day | 180 s | Safe. Gather, build, repair, upgrade. | Now (timer) |
|
||||
| Dusk | 30 s | Still safe. Warning of the coming attack; last chance to prepare. | Now (timer) |
|
||||
| Night | 150 s | Enemies attack to steal farm assets or damage defenses. | Now (timer), enemies in Step 3 |
|
||||
| Dawn | 20 s | Sunrise: no more enemies arrive and all of them retreat (D4). Carriers can still be stopped. Then remaining enemies leave and the night's losses are recorded. | Now (timer and record), retreat in Step 7 |
|
||||
|
||||
**Starting the night early (D1).** The player can skip the rest of the day or dusk straight to
|
||||
the night, but only when `allow_early_night` is on. It is **off by default**.
|
||||
|
||||
**What's allowed when (D8).**
|
||||
|
||||
| Action | Day / Dusk | Night / Dawn | Enforced |
|
||||
|---|---|---|---|
|
||||
| Gather materials | Yes | No | Step 5 |
|
||||
| Build new structures | Yes | No | Step 6 |
|
||||
| Repair, dismantle, patch the scarecrow | Yes | Yes | Steps 4, 6 |
|
||||
|
||||
## Farm assets
|
||||
|
||||
Three kinds of asset can be stolen: **crops**, **animals**, and **supplies** (stored
|
||||
construction materials in the shed). A kind is "in play" once the farm has any of it; until
|
||||
Step 8 only crops are in play.
|
||||
|
||||
### Theft lifecycle
|
||||
|
||||
| State | Meaning | Feedback |
|
||||
|---|---|---|
|
||||
| Targeted | An enemy is heading for the asset | Marker over it; arrow at the screen edge if off screen |
|
||||
| Being stolen | The enemy is taking it, which takes visible time (crops: 2.5 s). Damage resets the timer. | Progress ring |
|
||||
| Carried | The enemy is heading for the nearest escape point, slower than usual | The asset shown on the enemy |
|
||||
| Dropped | The carrier was stopped | The asset lies on the ground, glowing |
|
||||
| Recovered | The scarecrow got it back | It returns home |
|
||||
| Lost | The carrier escaped off the farm | Permanently gone |
|
||||
|
||||
- **Stopping a carrier (D5).** Killing a carrier drops its loot. Fear also makes carriers drop
|
||||
their loot (`fear_drops_loot`).
|
||||
- **Recovering (D6).** Crops and supplies: touch the dropped item and it goes straight home.
|
||||
Animals: touch one and it follows the scarecrow (at most 3 at once) until it's back inside
|
||||
the pen.
|
||||
- Another thief can pick up a dropped item.
|
||||
- Anything still on the ground when the dawn grace ends returns home automatically
|
||||
(`loot_returns_at_dawn`).
|
||||
- Animals can also escape through a breach in the pen. An animal that leaves the farm is lost.
|
||||
|
||||
Implemented in Steps 3 (crops), 4 (fear), and 8 (animals and supplies).
|
||||
|
||||
## The scarecrow
|
||||
|
||||
- Starts with **10 HP**. HP **carries over between nights** (D7).
|
||||
- **Patching** restores HP. It costs straw, takes a 2 s channel, can be done in any phase, and
|
||||
damage interrupts it (Steps 4–5).
|
||||
- **0 HP is an immediate Game Over.**
|
||||
|
||||
## How the vacation ends
|
||||
|
||||
| Outcome | Condition | Result |
|
||||
|---|---|---|
|
||||
| Scarecrow destroyed | Scarecrow HP reaches 0, in any phase | Game Over |
|
||||
| Farm stripped (D2) | **Every** kind of asset in play is gone: crops, animals, and stored supplies all at zero. Losing one kind isn't enough. | Game Over |
|
||||
| Vacation complete | The fifth night's dawn ends | The farmers return; final assessment |
|
||||
|
||||
- **Order of checks.** The outcome is checked every tick, after gameplay and before any phase
|
||||
change. A destroyed scarecrow is checked first, then a stripped farm, then completion. If a
|
||||
failure and the end of the final dawn happen on the same tick, the result is a **loss**.
|
||||
- **Retry (D9).** After a Game Over, Retry restarts the failed night from its morning, with
|
||||
everything as it was then: earlier losses, damage, and scarecrow HP. New Vacation starts the
|
||||
whole campaign over.
|
||||
|
||||
## Night record
|
||||
|
||||
When a night's dawn ends, the losses of that night (night and dawn together) are recorded per
|
||||
asset kind. The morning review (Step 7) and nightly results (Step 11) read from this record.
|
||||
|
||||
Open item for Step 8: supplies spent on building also reduce stored supplies. Decide then
|
||||
whether a farm whose supplies were *spent* rather than stolen counts as stripped.
|
||||
Loading…
Add table
Add a link
Reference in a new issue