Please tell me I've neglected something simple and obvious. I'm terrible with math, just tell me where I went wrong. I'm beyond caring how embarrassing the answer is.
Problem: greater than one things comes out as any number of things (including one thing), fewer than two things does not recognize one thing.
Full test source in spoiler below.
The top of the shaft is a room. The bottom of the shaft is a room. The bottom of the shaft is down from the top of the shaft.
The description of the top of the shaft is "There is a bright red button here, cordoned off by yellow caution tape and frantically scrawled warnings in red paint and what could either be black marker ink or something more sinister and dire. You ache to know the forbidden pleasures of the button."
An orange is in the top of the shaft. An apple is in the top of the shaft. A durian is in the top of the shaft.
A red herring is in the top of the shaft. The red herring is fixed in place. The description of the red herring is "It's glued to the wall. Also it seems more blue than red to you."
TrapdoorState is a truth state that varies. TrapdoorState is false.
The button is scenery in the top of the shaft. The description of the button is "You can't see any such thing. Oh, wait, there it is." The button can be pushed or unpushed. The button is unpushed.
Yourself is not portable.
Instead of pushing the button:
if the button is pushed:
say "As you unpush the button, a voice booms through a loudspeaker:[paragraph break]'CHANGE PLACES!'[paragraph break]The [list of things in the bottom of the shaft] [if there are fewer than two things in the bottom of the shaft]is[end if][if there are greater than one things in the bottom of the shaft]are[end if] tossed into the air, and the shaft partition is yanked out of its reclusion, catching the produce and giving palpable floorness to the room again.";
now the button is unpushed;
now all things in the bottom of the shaft are in the top of the shaft instead;
if the button is unpushed:
now the button is pushed;
say "You dig into the steel hull plating above with your toes, clinging firmly to the ceiling, and push the button. The trapdoor -- which gave the room its downward end-plane -- slams sideways into its recessed housing with a loud bang, effectively removing the entire floor's floorness.[paragraph break]";
if there are fewer than 2 portable things in the top of the shaft:
say "The [list of portable things in the top of the shaft] falls to the bottom of the shaft.";
if there are greater than 1 portable things in the top of the shaft:
say "The [list of portable things in the top of the shaft] fall to the bottom of the shaft.";
now all portable things in the top of the shaft are in the bottom of the shaft.
Test me with "push button / push button / take apple / take durian / l / push button / l / push button"
Wait, I've finally found the "exactly 1 thing" diction. Too exasperated to try it and move on at the moment, so I'm posting anyway.
Also, does Inform acknowledge "more than"/"less than" or doesn't it (or is it somewhere in the middle)?