I have a small stub I use for the THINK command that works as follows.
to say once-now of (ts - a truth state): say "[if ts is true]now[else]once[end if]";
carry out thinking:
if (tour guide puzzle is not solved), say "The tour guide will be more helpful [once-now of whether or not all rooms in intro regions are visited] you've visited all the rooms.";
But it also works for rules.
this is the puzzle x prepared rule:
unless player has item 1, the rule fails;
unless player has item 2, the rule fails;
unless player has item 3, the rule fails;
the rule succeeds;
to say once-now of (ru - a rule):
process ru;
say "[if the rule succeeded]now[else if the rule failed]once[else](BUG, rule must fail or succeed)[end if]";
carry out thinking:
if (player figured the command for puzzle x without having the right equipment and puzzle x is not solved), say "You can solve puzzle x [once-now of the puzzle x prepared rule] you have the right items.";
So now I’m wondering, can it work for “to decide” statements as well? Logically, something like the below would work, but I can’t get the syntax right. I have other ways, but this would seem most efficient.
to decide whether you-can-pass:
unless player has ID card and player has protective gear, no;
yes;
carry out thinking: [sample wrong tries]
if room-beyond-checkpoint is unvisited and checkpoint-pass-tried is true, say "You can pass the checkpoint [once-now of whether you-can-pass] you have ID and protective gear.";
if room-beyond-checkpoint is unvisited and checkpoint-pass-tried is true, say "You can pass the checkpoint [once-now of you-can-pass] you have ID and protective gear.";
Thanks!