Successful Knock Spell Pointed Down Incorrectly Assumes Bear Trap
还没有人认领这个 Issue。
评估
调研方向
从 src/zap.c 中 zapupdown 的 SPE_KNOCK 分支开始,并将其对 bear trap 的处理与 libnethack/zap.c 进行比较。重现向下敲开箱子的操作,然后验证当玩家没有被困住时,消息不再声称打开了 bear trap,同时真正的 bear trap 行为仍保持不变。
由索引模型根据 Issue 内容生成。
描述
Knocking open a chest downward produces the message "The bear trap opens. Klick!".
This is not at all indicative, as one might think, of a hitherto undiscovered beartrap that you happen to be standing on, but it is instead a bug, as zapupdown in src/zap.c indicates:
case SPE_KNOCK:
/* up or down, but at closed portcullis only */
if (is_db_wall(x,y) && find_drawbridge(&xx, &yy)) {
open_drawbridge(xx, yy);
disclose = TRUE;
} else if (u.dz > 0 && (x == xdnstair && y == ydnstair) &&
/* can't use the stairs down to quest level 2 until
leader "unlocks" them; give feedback if you try */
on_level(&u.uz, &qstart_level) && !ok_to_quest()) {
pline_The("stairs seem to ripple momentarily.");
disclose = TRUE;
} else if (u.utraptype == TT_BEARTRAP) {
pline_The("bear trap opens.");
u.utrap = 0;
}
However, TT_BEARTRAP happens to be 0, which apparently what u.utraptype is set to /even if you're not in a trap/.
... this does not appear to be a problem in NetHack 4, where libnethack/zap.c's zapupdown covers this case as:
case SPE_KNOCK:
/* up or down, but at closed portcullis only */
if (is_db_wall(x, y) && find_drawbridge(&xx, &yy)) {
open_drawbridge(xx, yy);
disclose = TRUE;
} else if (dz > 0 && (x == level->dnstair.sx && y == level->dnstair.sy)
&&
/* can't use the stairs down to quest level 2 until leader
"unlocks" them; give feedback if you try */
on_level(&u.uz, &qstart_level) && !ok_to_quest()) {
pline("The stairs seem to ripple momentarily.");
disclose = TRUE;
}
- 主要语言
- C
- 星标
- 24
- 派生
- 4
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ComputerScienceHouse/bingehack 的其他 Issue
-
bug
难度 3/5 1-2 天 新手友好度 38/100
-
bug
难度 3/5 1-2 天 新手友好度 35/100
ComputerScienceHouse/bingehack#127 · 4 条评论 ·
-
bug
难度 3/5 1-2 天 新手友好度 35/100
ComputerScienceHouse/bingehack#126 · 2 条评论 ·
-
难度 4/5 3-5 天 新手友好度 25/100
ComputerScienceHouse/bingehack#125 · 2 条评论 ·
-
feature nethack-west
难度 5/5 一周以上 新手友好度 20/100
查看 ComputerScienceHouse/bingehack 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
ARM-software/sysarch-acs#600 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
EchoTools/nevr-runtime#117 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
darktable-org/darktable#22523 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
DarkFlippers/qUnleashed#240 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复