P10.10: play one ascending combo cue per cascade round
For combos, play a sound for each match ascending (Candy-Crush cascade run): as a chain resolves, EACH successive round plays the next higher cue (combo1, combo2, … clamped at combo5) instead of a single combo cue keyed to the final cascade depth at commit. - board_anim.sx: add `BoardAnim.cascade_fired` (edge-trigger high-water mark, reset on init/begin) and the pure `cascade_rounds_started(elapsed, n)` helper — how many rounds have begun clearing on the swap→(clear,fall)* timeline. - main.sx: in the frame loop, diff `cascade_rounds_started` against `cascade_fired` and play one ascending cue per newly-cleared round, once each, gated on a real multi-round chain (rounds >= 2). Additive; never touches board/score/move state. - board_view.sx: drop the single `sfx_cascade(final depth)` at commit; keep `sfx_swap` / `sfx_match` (and win/lose) exactly as before. - tests/cascade_rounds.sx: headless snapshot of the per-round timing + the ascending combo1..combo5 run with the combo5 clamp. Sim (M3TE_FX=11, depth-5): log show shows combo1→combo2→combo3→combo4→combo5 at successive timestamps ~0.36s apart (= CLEAR+FALL per-round spacing).
This commit is contained in:
@@ -730,17 +730,17 @@ impl View for BoardView {
|
||||
mv := plan_and_commit(self.board, intent.a, intent.b);
|
||||
if self.anim != null { self.anim.begin(mv); }
|
||||
if self.fx != null { self.fx.begin(@mv); }
|
||||
// SFX (P10.3): additive cues for the committed gesture —
|
||||
// never reads or writes board/score/move state. The swap
|
||||
// slide cue plays for any committed gesture (legal or the
|
||||
// reverted ping-back); a legal move adds the match pop on its
|
||||
// first clearing round; a multi-round chain adds the escalating
|
||||
// cascade cue keyed to recorded depth (mv.rounds.len), distinct
|
||||
// from the match pop so a single clear is never doubled.
|
||||
// SFX: additive cues for the committed gesture — never reads
|
||||
// or writes board/score/move state. The swap slide cue plays
|
||||
// for any committed gesture (legal or the reverted ping-back);
|
||||
// a legal move adds the match pop on its first clearing round.
|
||||
// A multi-round chain's ascending combo cues are NOT fired here:
|
||||
// the frame loop plays one per round, edge-triggered as each
|
||||
// round visually clears (combo1, combo2, …), so the cascade
|
||||
// reads as an audible ascending run instead of one cue at commit.
|
||||
sfx_swap();
|
||||
if mv.legal {
|
||||
sfx_match();
|
||||
if mv.rounds.len >= 2 { sfx_cascade(mv.rounds.len); }
|
||||
}
|
||||
self.sel.clear();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user