- campaign_nights 5 -> 30. The old night 5 ("The last night") is now night 30, keeping its
uid, title, hint, and 180 s. It grew to 73 base / 511 played in its three waves, with UFO
groups added, at speed x1.25 and HP x1.625.
- New hand-authored night 5, "Lights in the sky": night 4's shape plus the first UFOs (two
single-UFO groups, 14 as played), 24 base.
- New game/tools/make_nights.gd writes nights 6-29 by the plan's recipe (seed 30, sieges on
10/15/20/25, mix, waves, scales, draft titles and hints) as .tres text with fresh uids. It
skips existing files unless --force (which keeps their uids), refuses ranges outside 6..29,
and checks every plan with NightPlan.problems() at the played scales (non-zero exit on any
problem). Generated nights 6-29 are committed.
- test_nights: the arc (30 plans, breakers from night 3 and UFOs from night 5, no non-siege drop
over 15% from night 3 on, sieges, last night longest), the per-night scales, the new night 5
and night 30 designs. The back-to-back run plays nights 1-5, 10, and 30, skipping the rest
with CampaignDebug.jump_morning.
- test_campaign, test_cycle, test_flow read campaign_nights instead of a hard-coded 5.
- RULES (the vacation, the Night row, the thirty nights and their table, the vacation's end),
README, and a dated PLAYTEST section.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Workbench stat upgrades get 3 levels: level L costs costs[id] x
upgrade_cost_growth (1.8) ^ (L - 1), each material rounded up, and opens on
day upgrade_level_days[L - 1] ([1, 8, 16]). Each owned level's "mult"/"add"
entry stacks. Level 1 keeps the user's values and costs (rapid fire 3.0x).
Shed items arrive on set days ("from_day"): corn shooter 1, shurikens 2,
pumpkin bombs 3, potato cannon 6, radar 8, propane torch 10, alien ray 14.
- Upgrades: level(), max_level(), maxed(), cost(cfg, id, level),
next_cost(), per_level(), text_at(), name_at() (roman numerals),
from_day(), level_day(), arrived(). owned() stays "level >= 1". blocker()
adds "Arrives on day N" and "Level N opens on day D"; buy() takes the next
level and applies that level's side effect; upgrades_bought counts every
level. FarmState.upgrades keeps id -> level, so saves don't change shape.
- UpgradePanel: "Rapid fire II" with the next level's text and cost, the
blocker reason, "Max" at the last level; a shed item before its day shows
its name greyed with "Arrives on day N" ("?" plus the day if hidden). The
title counts items at their last level. Every level bought jingles.
- Co-op: the host sends "bought" for any level (no wire change; PROTOCOL
stays 5).
- soak_night.gd buys the lowest next level first across UPGRADE_ORDER.
- Tests: level costs, day gates, stacking, from_day, save/morning/retry/co-op,
an old {"rapid_fire": 1} save as level 1. Existing tests set the day where
they buy stock that now arrives later.
- RULES.md Upgrades: per-level effects and costs, stock schedule.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The client now shows the "[E / X] Shop" prompt (ShedCounter resolved in
_focus_node); the host holds a partner's interact press up to 0.3 s for
its lagging copy to reach a counter instead of silently dropping it;
interact closes the partner's menu; a partner's purchase equips on its
own slot ("bought" event). PROTOCOL 5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cause: the open path itself worked. A real two-process run with an E key event opened the
shed's menu when P2 stood at the counter. What failed in play was reach:
- The partner's game never showed the counter's "[E / X] Shop" prompt.
CoopSession._gather_node resolved only the workbench and gather points, so P2's
replicated focus was null at the counter. P2 couldn't tell where the 2.2 m reach around
the counter's invisible point was.
- The host took P2's press on the first tick after the input record arrived, before its
copy of P2 had eased to the position in that same record. It dropped the press silently
if the lagging copy was out of reach. Walking in at 5 or 9 m/s and pressing E at 2.1 m
(inside the reach on P2's screen) failed 3/3. The host's copy was 2.31-2.66 m out.
Fixes:
- The snapshot's focus now resolves the ShedCounter (_focus_node), so the prompt shows.
- The host keeps a partner's interact press pending for 0.3 s (Interactions.PRESS_WINDOW)
until a counter in reach takes it.
- Interact while the partner's shop menu is open closes it on the partner's machine, and
that press is taken back (RemoteControls.Sender.take_back), so the host never reopens it.
- When the host completes P2's "buy", it sends a "bought" event. Once P2's farm state has
the upgrade, the partner's panel emits bought (UpgradePanel.confirm_bought). As in solo,
the new weapon goes into P2's hand and the jingle plays. Still paid from P2's pouch,
then the shed.
- CoopSession.PROTOCOL 4 -> 5.
Tests: test_coop _shops covers both shops opening on the client only, the prompt, interact
closing, a press taken while the host's copy is 3.8 m out still opening, an early press not
opening later, and a client weapon buy paid from P2's pouch and the shed and equipped on
both farms. coop_smoke now opens and closes the shed by day with E key events, both
standing and on arrival at a run.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Alien Ray is now a held beam instead of a copy of the potato shot.
While fire is held it ticks every alien_ray_tick_interval (0.15 s). Each
tick traces a path from the scarecrow's center through the muzzle and on
alien_ray_range (20 m) past it, cut short at the first wall
(AlienBeam.trace on the world layer). It damages every enemy within
alien_ray_width / 2 (0.25 m) plus its hit radius of that path, flyers
included as with shots, nearest first, up to alien_ray_pierce (4), for
alien_ray_damage (1). That is about 6.7 damage a second per enemy on the
beam. Hits stay inside combat.step, so enemies.attacker credits kills.
- EnemySystem.path_hits: every enemy along a polyline, ordered along it,
with flat ends (nothing behind the scarecrow or past the wall).
sweep_hit is unchanged.
- AlienBeam: a WeaponModels held effect (hold 1.5 ticks, no fade). It is
an unshaded HDR green core and glow, a muzzle light, and a flare where a
wall stops it. Each frame it lays itself out from the muzzle along the
model's -Z, with the same trace, so the partner's machine recomputes the
wall clip locally. No protocol change.
- Counters: a beam_ticks counter joins attacks(), and ray ticks no
longer count as shots_fired.
- Config: alien_ray_speed, alien_ray_lifetime and alien_ray_cooldown are
removed. alien_ray_range, _width, _tick_interval and _pierce are added.
The shop text says what it does now. Cost and hidden/reveal are
unchanged.
- Sound: a zapped signal and a "zap" cue (synth alien_beam.wav, its own
seed). The other synth files regenerate byte-identical.
Tests (test_weapons) replace the projectile-travel ray check and keep
buy/equip:
- a far target is hit on the same step;
- nothing beside, behind or past the end is hit;
- two in line and a crow are all hit;
- a line is capped at pierce;
- a wall stops it, including a barrel poking through one;
- held ticks repeat and stop on release;
- the beam is lit only while held, ends at the wall clip, follows the
model's yaw, and the replica and attack-event paths work.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shed stays shared; pouches are per avatar slot with one shared
capacity. Gather/deposit/pay paths take the acting slot, goop goes to
the killer, a leaving partner's pouch goes into the shed. FarmState v7
(partner_pouch), CoopSession PROTOCOL 4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Each scarecrow carries its own pouch (ResourceStore.pouches by avatar
slot; slot 0 is the solo player / host, `pouch` stays slot 0's), with one
shared pouch_capacity so a Bigger pouch grows both. The shed stays shared.
- Gathering, the shed drop-off, repair, upgrade-in-place, patching,
building and buying all act on the acting avatar's slot. The host pays
the partner's "place" and "buy" requests from P2's pouch and the shed.
- The partner's build mode, build hotbar, shop menus and materials HUD
check affordability against P2's pouch (FarmSim.set_local).
- Alien Goop goes to the killer's pouch: FarmSim sets
EnemySystem.attacker around each avatar's combat step and shots carry
their shooter's slot; bomb/turret kills go to the nearest scarecrow.
The replica no longer rolls goop locally.
- When the partner leaves, their pouch goes into the shed (and is named
in the toast); a co-op save continued alone banks P2's pouch at morning.
- FarmState.VERSION 7 (resources.partner_pouch) with a v6 migration;
CoopSession.PROTOCOL 4.
- Tests: per-slot store rules, v6 save migration, and test_coop cases for
separate gathering, no cross-banking in the shed, own-pouch paying,
shared capacity, goop credit and leaving. test_coop's crowd case now
resets the loopback's drop counter so earlier traffic can't change
which messages it loses.
- Docs: COOP.md and RULES.md no longer say the pouch is shared.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Hit test: _band_hit replaces the torch's cone. It hits the enemies in a
torch_width (1.6 m) wide band along the gun's line, from the scarecrow's
center out to torch_range (4.5 m) past the muzzle, each enemy's hit radius
added. The nearest torch_targets with a clear line are hit; _cone_hit and
_band_hit share _hit_nearest. torch_arc is gone, and the torch joins
MUZZLE_WEAPONS so scripted aim matches the mouse.
Flame: TorchFlame (CPUParticles3D jet plus a flickering light) is sized to
the band. WeaponModels gains a reusable held-effect pattern for #18:
- add_held_effect / lit / douse / advance.
- attack() lights the effect for HOLD_TICKS (1.5) tick intervals instead
of replaying the kick.
- douse() puts it out the moment fire is let go; it then fades for the
particle lifetime.
- Timers run on the sim clock (ScarecrowCombat.tick), or on physics frames
when nothing advances them. That covers the other scarecrow on the
partner's machine, which the existing "attack" events light, so there is
no protocol change.
Sound: a new burned signal and a "burn" cue (synth torch_roar.wav,
generated by synth_audio.gd with its own seed) replace the pitchfork's
stab sound.
Tests (test_weapons): band in, beside, behind and beyond; a melee hugger
is burned; held fire over 5 intervals ticks 5 times and stops on release;
the flame is lit at every step while held and hidden after release; the
replica and attack-event paths; the flame follows the model's yaw.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Snapshot of in-progress work before the alien overhaul so worker
worktrees branch from current code.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>