OpeningIntro (game/scripts/opening_intro.gd) plays on every New vacation
(not Continue, not when hosting co-op): the farmers leave in their loaded
station wagon, "Later that night....", a bickering UFO crew drops a part
whose blue flash brings the scarecrow (hung on a post in its T-pose) to life,
the UFO zooms off, then the loading screen and the first morning's sign.
Hold Space / Enter / A (or E, or the mouse button) 1 s to skip from any
stage; Escape pauses it; Restart the night skips it; Save & quit clears it.
It ends with the farm exactly as new_campaign() leaves it.
Hooks: ReviewPanel keeps the sign down while the intro has the farm (and
only focuses Start when the sign is up); DialogueDirector holds its
conversations and the sign, then intro_over() plays night 1's morning
conversations before the sign; Tutorial hides; FarmAudio gets set_scene /
end_scene (ambience and music held by a cutscene) and stop_cue (the morning
stinger plays with the sign instead); Main wires new_vacation(intro),
blocked, resume's freeze, restart and to_menu.
Tests: test_intro (45 checks); test_flow skips the new intro. Tool:
game/tools/capture_intro.gd saves a frame per stage for the timing review.
Docs: README, RULES, LAYOUT (staging points), PLAYTEST.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- DayNight.forced ("" / "morning" / "night") overrides target(); snap()
still works. DayNight.morning() is the MORNING phase's look.
lanterns_dark keeps every lantern at 0.
- synth_audio.gd: ufo_hum (4 s loop), ufo_whine, part_fall, life_flash,
ufo_zoom, car_door, each on its own seed (existing wavs unchanged).
FarmAudio cues for those plus door_creak (kenney creak1/2), all in
LOCAL_CUES.
- PlayerCharacter: a blue core glow on the chest bone (BoneAttachment3D):
an unshaded gem, an additive halo pulled toward the camera, and a weak
pulsing OmniLight3D. On for every scarecrow; set_core_glow(on) hides
it. set_tint skips it; the hit flash overlay and ToonLook leave it alone.
- test_look: forced/lanterns_dark, the intro cues, the glow on both
scarecrows, hit flash intact, set_core_glow.
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>
Band hit test from the scarecrow along the aim (torch_width, longer
torch_range), a particle flame held lit while firing (and on the
partner's screen via attack events), reusable held-effect pattern in
WeaponModels, torch roar cue. Resolved farm_audio.gd header with #19.
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>
UFOs no longer reuse the crow's bird mesh. EnemySystem.build_ufo_mesh()
merges the mesh arrays of two CylinderMesh hull halves, a TorusMesh rim, a
hemisphere SphereMesh dome and eight small sphere lights into one ArrayMesh
(about 1.65 m across, -0.13..0.45 m about its origin), with per-part vertex
colors and (glow, metalness) in UV.
A second HordeRenderer (ufo_renderer) draws it with the new
game/resources/ufo.gdshader: albedo from COLOR, no flap, a slow spin and bob
with a per-enemy phase, chasing rim lights, and the bird shader's hit flash
(INSTANCE_CUSTOM.g) and night_glow. Both batches mirror the dense slots
(write_new, move_slot, clear), and commit_render scales each slot to nothing
in the batch that doesn't draw its type. DayNight now takes a list of enemy
materials and sets night_glow on both.
UFOs get their own arrival cue (kenney/digital/powerUp2.ogg, previously
unused) instead of the crow's caw. HordeRenderer.is_drawn() backs the new
test_roster checks: a UFO is drawn by the UFO batch only, a crow by the
bird batch only, a thief by neither, also after a swap-removal; and the
saucer's size and centering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a second UpgradePanel instance (shop "shed") at the Supply Shed's new
ShedCounter node, opened by interact like the Workbench. corn_shooter and
pumpkin_bomb move there ("shop": "shed" in GameConfig.upgrades); the
Workbench's panel (shop "workbench", the default) keeps rapid_fire,
heavy_seeds, and the rest, with "requires" still crossing shops. Co-op buys
go through the same ["buy", id] host gate; a shed_requested signal mirrors
workbench_requested so the partner's own shed panel opens. The shed's
walk-in pouch deposit is unaffected (no interact, not gated by the
counter's reach).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Adds a 4th enemy type (TYPE_UFO=3) that reuses the generic flying-nav
infrastructure (ignores fences, gates, and traps) and gets a new
FIGHT-capable behavior in ThiefBehavior: it skips SEEK/loot entirely and
goes straight to FIGHT, strafing the scarecrow in dive-and-pull-up passes
(diving to land_altitude while its attack is off cooldown, climbing to
cruise_altitude right after landing a hit) until it's hit for every pass.
All stats (speed 7.0, hp 2, damage 1, hit_interval 1.5s, aggro_range 10.0,
etc.) live in GameConfig.enemy_types["ufo"]. It renders through the same
shared flyer MultiMesh crows use (no new art) and is wired into
NightPlan/WaveDirector composition, the HUD/assessment roster lines, kill
log keys, and the arrival sound/toast, with a generic audio fallback since
it has no cue of its own.
Per a scope addition mid-task, night 5 now also sends in a wave of 4 UFOs
late in the night (game/resources/nights/night_5.tres), which shifts
test_nights' known-flaky "arrived" baseline line by one new {3: N} entry
(the UFO counts agree between plan and arrival) and required updating its
hardcoded "all three types" check to four. A debug-only "UFOs only"
scenario is added (game/resources/scenarios/ufos.tres) but deliberately
left out of CampaignDebug.SCENARIOS, since wiring it in would change
test_roster's hardcoded scenario count and that file's existing checks
were required to stay untouched.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>