Skip to content

Commit 1fb4be8

Browse files
committed
Fix 9 programming bugs found in xo's deep functional test
Round-two deep functional test (AGENTS.md §10.7), registration, sect join, a real fight-to-death and reincarnation, shop purchase, quit/save/reconnect cycles. 1. d/menpai/wuliang/npc/zuo.lpc: unterminated string in the sect leader's own dialogue mapping -- a hard compile error that made the whole sect-join mechanism inert. Fixed the missing closing quote. 2. system/skill/misc/{yuanyang-dao,taizu-quan}.lpc: same unterminated- string typo, two more combat-skill files. 3. system/skill/basic/kongshou.lpc: a comment swallowed a function signature (`int is_native_skill()` merged into the preceding comment line), breaking the base unarmed-combat skill -- spammed a compile error to players on every combat round. Fixed. 4. d/city/yangzhou/{waifang,woshi}.lpc: inherit DOOR_ROOM (an undefined macro -- confirmed via grep, no other room in this archive uses it) -> inherit ROOM, matching every one of the 65 sibling rooms in the same directory (§6.1 shape). 5. d/city/yangzhou/npc/cloth/cloth.lpc + d/menpai/wuliang/npc/obj/ choushan.lpc: missing #include <armor.h> (§6.1), plus cloth.lpc's set("value",); arg-count error fixed to set("value", 0). 6. cmds/verb/drop.lpc: obj->move() can legitimately self-destruct obj as a side effect (a bound weapon shattering when dropped) -- added an objectp() guard before further use, reproduced live as *Bad argument 1 to EFUN call_other() without the guard. 7. d/place/death/npc/chacha.lpc: 2 of 3 reincarnation destinations (d/map/zhongyuan/nanmen, d/city/lanzhou/guangchang) pointed at directories that don't exist anywhere in this trimmed archive (confirmed) -- silently stranded reincarnated players in the death realm forever. Repointed both to the one confirmed-live destination already used elsewhere in the same function (§7.18-shaped fix). 8. cmds/skill/study.lpc: an operator-precedence bug plus an "improvve_jibie" typo, fixed proactively though not currently reachable with live data. Independently hit a third occurrence of AGENTS.md §10.8's driver-fatal crash class during this session -- this time a raw SIGSEGV rather than the prior FATAL ref-count-0 assertion, during the driver's periodic reset() sweep. Not fixed (driver-level). Left two content/design observations untouched per the scope filter: the sect's "mirror spar" isn't damage-capped (killed a fresh disciple in one hit), and the whole sect zone has no in-game walking path from the city in this archive.
1 parent 82a2f59 commit 1fb4be8

16 files changed

Lines changed: 511 additions & 12 deletions

File tree

libs/xo/NOTES.md

Lines changed: 472 additions & 0 deletions
Large diffs are not rendered by default.

libs/xo/work/cmds/skill/study.lpc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ int get_gain(object me, object ob, mapping book) {
124124
write("这本书的一切都都已尽被你须知,你已经无法从中学到新东西了。\n");
125125
return 1;
126126
}
127-
if (bonus = book["bonus_jibie"] > 0)
128-
me->improvve_jibie(book["name"], bonus);
127+
if ((bonus = book["bonus_jibie"]) > 0)
128+
me->improve_jibie(book["name"], bonus);
129129
else if (bonus <= 0) {
130130
if (me->query("age") < 15) // to avoid selecting gifts
131131
me->improve_jibie(book["name"], random(15));

libs/xo/work/cmds/verb/drop.lpc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ int do_drop(object me, object obj) {
5555
return notify_fail(stringp(no_drop) ? no_drop : "这样东西不能随意丢弃。\n");
5656

5757
if (obj->move(environment(me))) {
58+
// obj->move() can legitimately destruct obj as a side effect (e.g.
59+
// a bound/soulbound weapon shattering when dropped outside its
60+
// valid owner context -- see d/menpai/wuliang/npc/obj/sword.lpc's
61+
// own move() override) -- guard before touching it further.
62+
if (!objectp(obj)) return 1;
5863
if (obj->is_character())
5964
message_vision("$N将$n从背上放了下来,躺在地上。\n", me, obj);
6065
else {

libs/xo/work/d/city/yangzhou/npc/cloth/cloth.lpc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//
22
//by trill 04/06/97
33

4+
#include <armor.h>
45
inherit CLOTH;
56

67
void create() {
@@ -11,7 +12,7 @@ void create() {
1112
else {
1213
set("long", "");
1314
set("unit", "套");
14-
set("value",);
15+
set("value", 0);
1516
set("material", "cloth");
1617
set("armor_prop/armor", 2);
1718
}

libs/xo/work/d/city/yangzhou/waifang.lpc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//waifang.c
22

33
#include <room.h>
4-
inherit DOOR_ROOM;
4+
inherit ROOM;
55

66

77
void create() {

libs/xo/work/d/city/yangzhou/woshi.lpc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//woshi.c
22

33
#include <room.h>
4-
inherit DOOR_ROOM;
4+
inherit ROOM;
55

66

77
void create() {

libs/xo/work/d/menpai/wuliang/npc/obj/choushan.lpc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// fighting_suit.c
22

3+
#include <armor.h>
34
inherit CLOTH;
45

56
void create() {

libs/xo/work/d/menpai/wuliang/npc/zuo.lpc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void create()
6666
set("inquiry", ([
6767
// "悟剑居" : "嗯,那是本门的武功所在,如今你可以进悟剑居参修了。",
6868
"此地" : "这里便是无量剑派。",
69-
"姓名" : "嗯,你既知我姓左,怎会不知在下便是无量东宗掌门人左子穆?,
69+
"姓名" : "嗯,你既知我姓左,怎会不知在下便是无量东宗掌门人左子穆?",
7070
// "武功": str,
7171
"玉壁": (: about_yubi :),
7272
"指点武功" : (: change_master :),

libs/xo/work/d/place/death/npc/chacha.lpc

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,19 @@ void death_stage(object ob, int stage) {
8888
ob->move("/d/city/yangzhou/kuixing_ge");
8989
break;
9090
case 1:
91-
ob->move("/d/map/zhongyuan/nanmen");
91+
// was "/d/map/zhongyuan/nanmen" -- that path doesn't exist in
92+
// this trimmed "mini" archive, so move() silently failed
93+
// (F_MOVE: destination doesn't exist) and permanently stranded
94+
// the reincarnated player in the death realm (no live map
95+
// connection back). Repointed to the one confirmed-live
96+
// destination already used elsewhere in this same function,
97+
// matching AGENTS.md #7.18's fix pattern.
98+
ob->move("/d/city/yangzhou/kuixing_ge");
9299
break;
93100
case 2:
94-
ob->move("/d/city/lanzhou/guangchang");
101+
// was "/d/city/lanzhou/guangchang" -- same stranding bug as
102+
// case 1 above ("lanzhou" doesn't exist in this archive either).
103+
ob->move("/d/city/yangzhou/kuixing_ge");
95104
break;
96105
}
97106
}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#/clone/user/login.lpc
2+
dbase (["email":"qinfengding@example.com","password":"$6$Of/bkkeoQSZaAyXA$PYm1MhJ2oufZmKXM1ExJ72Jrzx4QugPJQ9TIdCxB2Wj5y1bTh0dU3VC4MAgDm4hRAzoEuAnKbGFOHGT0mTfZr.","id":"qinfengding","body":"/clone/user/user","name":"秦风丁",])

0 commit comments

Comments
 (0)