gpt4 book ai didi

inform7 - 放下所有的东西

转载 作者:行者123 更新时间:2023-12-04 02:49:35 24 4
gpt4 key购买 nike

我希望玩家能够丢弃所有某种东西。例如

piece is  a kind of thing.
Pawn is a kind of piece.
Rook is a kind of piece.

The player carries 8 pawns.
The player carries 2 rooks.

现在如果:

>drop all rooks
Rook: Dropped.
Rook: Dropped.

但是如果:

>drop all pieces
You can't use multiple objects with that verb.

如何使用棋子来表示所有的车和兵?

最佳答案

Kind 默认情况下没有名词或关键字,因此 Inform7 没有意识到玩家有任何称为 piece 的东西.这很容易通过 Understand 解决:

piece is a kind of thing.  
Pawn is a kind of piece.
Rook is a kind of piece.

[note the slightly different syntax for Understanding a kind.]
Understand "piece" and "pieces" as a piece.

The player carries 4 pawns, and 2 rooks.

结果是:

> i
You are carrying:
four Pawns
two Rooks

> drop all pieces
Pawn: Dropped.
Pawn: Dropped.
Pawn: Dropped.
Pawn: Dropped.
Rook: Dropped.
Rook: Dropped.

> i
You are carrying nothing.

关于inform7 - 放下所有的东西,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18036008/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com