Sharpee
Chord / Flow & Progression / select with a strategy

select with a strategy

select <strategy> ignores the world and picks an arm by a rule about how often the block has fired. The arms are separated by or, exactly like the variants of a define phrase, because it is the same machinery: the five strategies are the phrase-algebra Choice selectors under author-facing names.

  on ringing it
    select cycling
      phrase chime-bright
        The chime rings a bright, clean note.
    or
      phrase chime-lower
        It answers itself a third lower.
    or
      phrase chime-clatter
        The tubes clatter together, all music gone.
    end select
  end on

The five strategies:

StrategyBehavior
cyclingarms in order, wrapping back to the first forever
stoppingarms in order, then stays on the last
randomlya fresh seeded random arm every firing
stickyone seeded random arm, then that same arm forever
first-timethe first arm once, the second arm ever after

randomly and sticky draw from the same seeded, save-persistent stream as every other random effect in Chord, so a replay or a restored save reproduces the same choices (never Math.random). first-time is the "novelty then routine" shape, a drawer that is a discovery the first time and a shrug thereafter:

  on opening it
    select first-time
      phrase drawer-discovery
        The drawer shrieks open on a jumble of twine, labels, and one
        surprised spider.
    or
      phrase drawer-routine
        The drawer shrieks open. The spider has moved out.
    end select
  end on

The retired adverbs ordered and once are gone: ordered is now stopping, and there is no phrase-strategy once; its old job is covered by first-time and stopping. The clause modifier , once is a different construct at a different position and is untouched.