我处于这样的情况:
"Cream Corner" by Lynn
An ice cream cone is a kind of edible thing.
An ice cream cone has a number called scoop count.
Rule for printing the name of an ice cream cone:
say "[the scoop count in words]-scoop ice cream cone".
The Cream Corner is a room.
The player holds an ice cream cone with scoop count 3.
现在我想> eat three-scoop
工作。我可以做这个:
Understand "one-scoop" as an ice cream cone
when the scoop count of the item described is 1.
Understand "two-scoop" as an ice cream cone
when the scoop count of the item described is 2.
Understand "three-scoop" as an ice cream cone
when the scoop count of the item described is 3.
[ ... ]
但当然,理想情况下,我想写一个这样的规则:
Understand "[number]-scoop" as an ice cream cone
when the scoop count of the item described is the number understood.
但是,Inform 文档指出这是不可能的:
因此,例如,我们不能安全地说“当名词是松果”,或者指代诸如“理解的数字”之类的东西。(我们还没有完全理解。)如果我们想要更复杂地处理这种情况,我们需要按照通常的方式编写检查规则等。
All the same, it isn’t clear to me how to replace such a rule with a checking rule “in the usual way”. How do I use checking rules to make [number]-scoop
in the player’s command be interpreted as “an ice cream cone with that many scoops”?