首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Inform7:如果没有提供名词,可以进行默认到播放器的操作吗?

Inform7:如果没有提供名词,可以进行默认到播放器的操作吗?
EN

Stack Overflow用户
提问于 2020-06-13 16:08:50
回答 2查看 53关注 0票数 2

我有一个heal [someone]操作,可以恢复我在故事中给所有人的hp值。当我输入自己的命令heal时,它默认在治疗玩家之前先治疗同一房间里的任何其他人。

如果没有指定名词,有没有办法让这个动作默认给玩家?

EN

回答 2

Stack Overflow用户

发布于 2020-06-15 23:09:32

您可以创建另一个操作(在本例中为“修复自己”),将短语"heal“理解为该操作,并将该操作转换为检查规则中应用于玩家的修复操作:

代码语言:javascript
复制
A person has a number called current hit points.
A person has a number called maximum hit points.

Healing is an action applying to one thing.
Healing oneself is an action applying to nothing.

Understand "heal [someone]" as healing.
Understand "heal" as healing oneself.
To appear is a verb.
To feel is a verb.

Check healing oneself:
    convert to the healing action on the player.

Carry out healing:
    now the current hit points of the noun is the maximum hit points of the noun.

Report healing:
    if the noun is the player:
        say "[We] [feel] completely healed!";
    otherwise:
        say "[The noun] [appear] completely healed!".
票数 1
EN

Stack Overflow用户

发布于 2020-07-05 23:03:38

代码语言:javascript
复制
Does the player mean healing the player: it is likely.

§17.19. Does the player mean...

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62357126

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档