如何以不同于 "throw log" 的方式回应 "chuck wood"?

How to respond to "chuck wood" differently to "throw log"?

我有一个动作,throwing,使用"throw/chuck/lob/etc."

来理解

我有一个名词,the log,用"log/trunk/wood/etc."

来理解

您可以抛出东西,抛出日志的行为应该与任何其他抛出动作相同...除了 当用户键入特定短语时 "chuck wood",响应应为 "How much wood could a woodchuck chuck?".

搞笑,我相信你会同意的!

同样,我想以特殊的方式回应"throw party";但是,在这种情况下 party 不是游戏中的名词,因此在任何其他上下文中都不应该识别它,我真的不想为它创建一个虚拟对象。

How do I implement the responses above?

After reading a command:
    if the player's command matches "throw party":
        say "I'll bring the appetizers!";
        reject the player's command;
    if the player's command matches "chuck wood":
        say "How much wood could a woodchuck chuck?";
        reject the player's command.

有关详细信息,请参阅 §18.33. Reading a command

Do I need to use a different technique for the first and second case?

显然不是。事实上动词甚至不需要是一个真正的动作(if the player's command matches "xyzzy" …)