Task #17: Propane Torch sprays a band of fire

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>
This commit is contained in:
Forrest 2026-10-06 13:04:54 -04:00
parent 26b735d3e6
commit ca8601029e
12 changed files with 483 additions and 37 deletions

View file

@ -31,5 +31,5 @@ for before release.
`synth/` is generated by `game/tools/synth_audio.gd` (deterministic, fixed seeds): the day and
night ambience loops, the crow caws and squawk, the farmers' car (engine loop and horn), the
pitchfork's whoosh, and the pumpkin bomb's burst. Kenney's packs have no farm ambience, birds,
vehicles, or explosions. Re-run the tool to regenerate them.
pitchfork's whoosh, the pumpkin bomb's burst, and the propane torch's roar. Kenney's packs have
no farm ambience, birds, vehicles, explosions, or fire. Re-run the tool to regenerate them.

Binary file not shown.

View file

@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://o60070g6ynry"
path="res://.godot/imported/torch_roar.wav-4814a1263a25e5d2eed601e70c01712f.sample"
[deps]
source_file="res://assets/audio/synth/torch_roar.wav"
dest_files=["res://.godot/imported/torch_roar.wav-4814a1263a25e5d2eed601e70c01712f.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=2