Skip to content

Commit

Permalink
Testing more games
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcCote committed Nov 11, 2021
1 parent a96a473 commit 7032ea4
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 19 deletions.
10 changes: 8 additions & 2 deletions frotz/src/games/lurking.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

// The Lurking Horror: http://ifdb.tads.org/viewgame?id=jhbd0kja1t57uop

const zword lurking_special_ram_addrs[6] = {
const zword lurking_special_ram_addrs[11] = {
883, // Cut line with axe
756, // knock on door
859, // Read page, click on more
813, // Throw axe at cord
1047, // Lower ladder (alt. 1163, 1333)
11251, // Microwave timer
11235, // press up/down button
961, // Microwave setting
1145, // Cleaning up junk
4889, // Drinking coke
Expand All @@ -40,7 +46,7 @@ const char *lurking_intro[] = { "sit on chair\n",
"password uhlersoth\n" };

zword* lurking_ram_addrs(int *n) {
*n = 6;
*n = 11;
return lurking_special_ram_addrs;
}

Expand Down
16 changes: 8 additions & 8 deletions frotz/src/games/moonlit.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright (C) 2018 Microsoft Corporation
This program is free software; you can redistribute it and/or
Expand Down Expand Up @@ -103,11 +103,11 @@ int moonlit_ignore_attr_clr(zword obj_num, zword attr_idx) {
}

void moonlit_clean_world_objs(zobject* objs) {
int i;
char mask;
mask = ~(1 << 7) & ~1;
// Clear attr 24 & 31
for (i=1; i<=moonlit_get_num_world_objs(); ++i) {
objs[i].attr[3] &= mask;
}
// int i;
// char mask;
// mask = ~(1 << 7) & ~1;
// // Clear attr 24 & 31
// for (i=1; i<=moonlit_get_num_world_objs(); ++i) {
// objs[i].attr[3] &= mask;
// }
}
7 changes: 4 additions & 3 deletions frotz/src/games/murdac.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright (C) 2018 Microsoft Corporation
This program is free software; you can redistribute it and/or
Expand All @@ -24,7 +24,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

// Monsters of Murdac: http://ifdb.tads.org/viewgame?id=q36lh5np0q9nak28

const zword murdac_special_ram_addrs[9] = {
const zword murdac_special_ram_addrs[10] = {
3909, // Blow shawm; Also 525
3587, // Tracks state of door. Also 3626
4659, // Tracks throwing plank, rod.
Expand All @@ -34,10 +34,11 @@ const zword murdac_special_ram_addrs[9] = {
3042, // Tracks lion health
2548, // Fill bowl, look
3365, // Prick dummy, exodus
6387, // Running away from the poltergeist.
};

zword* murdac_ram_addrs(int *n) {
*n = 9;
*n = 10;
return murdac_special_ram_addrs;
}

Expand Down
8 changes: 6 additions & 2 deletions frotz/src/games/night.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

// Night at the Computer Center: http://ifdb.tads.org/viewgame?id=ydhwa11st460g9u3

const zword night_special_ram_addrs[1] = {
6837, // listen
};

zword* night_ram_addrs(int *n) {
*n = 0;
return NULL;
*n = 1;
return night_special_ram_addrs;
}

char** night_intro_actions(int *n) {
Expand Down
2 changes: 1 addition & 1 deletion jericho/game_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
"name": "night",
"rom": "night.z5",
"seed" : 0,
"walkthrough" : "ne/s/e/open box/pull hose/take light/w/n/w/d/d/e/s/e/open door/s/listen/n/w/n/w/u/e/s/push fountain/open panel/turn on light/go panel/go panel/e/z/z/follow mouse/follow mouse/follow mouse/follow mouse/follow mouse/get printer/ask gnome about prinout/w/x sign/w/w/w/e/e/w/u/n/w/u/e/sw/click ftp/click if-archive/click designers_manual/click lpr/take manual/ne/w/d/e/s/d/z/z/z/z/z/follow mouse/follow mouse/follow mouse/follow mouse/follow mouse/follow mouse/give manual/take printer/w/w/w/e/e/w/u/n/w/u/e/sw/put printer on table",
"walkthrough" : "ne/s/e/open box/pull hose/take light/w/n/w/d/d/e/s/e/open door/s/listen/n/w/n/w/u/e/s/push fountain/open panel/turn on light/go panel/go panel/e/z/z/follow mouse/follow mouse/follow mouse/follow mouse/follow mouse/get printer/ask gnome about printer/w/x sign/w/w/w/e/e/w/u/n/w/u/e/sw/click ftp/click if-archive/click designers_manual/click lpr/take manual/ne/w/d/e/s/d/z/z/z/z/z/follow mouse/follow mouse/follow mouse/follow mouse/follow mouse/follow mouse/give manual/take printer/w/w/w/e/e/w/u/n/w/u/e/sw/put printer on table",
"grammar" : "allhints;allpuzzle/puzzles;awake/awaken/wake;awake/awaken/wake up;bother/curses/darn/drat;brief/normal;carry/get/hold/take inventory;carry/get/hold/take off;carry/get/hold/take out;close/cover/shut up;damn/fuck/shit/sod;die/q/quit;dive/swim;exit/out/outside/stand;full/fullscore;full/fullscore score;go/leave/run/walk;hear/listen;help;hint/hints;hints off;hints on;hop/jump/skip;i/inv/inventory;i/inv/inventory tall;i/inv/inventory wide;in/inside/cross/enter;l/look;long/verbose;nap/sleep;no;noscript/unscript;notify off;notify on;nouns/pronouns;objects;off;on;places;pray;restart;restore;review;save;score;script;script off;script on;short/superbrie;sing;smell/sniff;sorry;stand/carry/get/hold/take up;think;verify;version;wait/z;wave;xyzzy;y/yes;adjust/set OBJ;attach/fasten/fix/tie OBJ;attack/break/crack/destroy/fight/hit/kill/murder/punch/smash/thump/torture/wreck OBJ;awake/awaken/wake OBJ;awake/awaken/wake OBJ up;awake/awaken/wake up OBJ;blow OBJ;bother/curses/darn/drat OBJ;burn/light OBJ;buy/purchase OBJ;carry/get/hold/take OBJ;carry/get/hold/take off OBJ;chase/follow/pursue/trail OBJ;chase/follow/pursue/trail after OBJ;check/describe/examine/watch/x OBJ;chop/cut/prune/slice OBJ;clean/dust/polish/rub/scrub/shine/sweep/wipe OBJ;clear/move/press/push/shift OBJ;click OBJ;click on OBJ;climb/scale OBJ;climb/scale over OBJ;climb/scale up OBJ;close/cover/shut OBJ;cross/enter/go/leave/run/walk OBJ;damn/fuck/shit/sod OBJ;dig OBJ;discard/drop/throw OBJ;disrobe/doff/shed/remove OBJ;don/wear OBJ;drag/pull OBJ;drink/sip/swallow OBJ;drink/sip/swallow at OBJ;drink/sip/swallow from OBJ;eat OBJ;embrace/hug/kiss OBJ;empty OBJ;empty OBJ out;empty out OBJ;feel/fondle/grope/touch OBJ;fill OBJ;go/leave/run/walk through OBJ;go/leave/run/walk/carry/get/hold/take into OBJ;hear/listen OBJ;hear/listen to OBJ;hop/jump/skip over OBJ;l/look at OBJ;l/look behind OBJ;l/look in OBJ;l/look inside OBJ;l/look into OBJ;l/look through OBJ;l/look under OBJ;lie/sit/go/leave/run/walk inside OBJ;lie/sit/go/leave/run/walk/carry/get/hold/take in OBJ;lie/sit/stand/carry/get/hold/take on OBJ;open/uncover/undo/unwrap OBJ;peel OBJ;peel off OBJ;pick OBJ up;pick up OBJ;put OBJ down;put down OBJ;put on OBJ;read OBJ;rotate/screw/turn/twist/unscrew OBJ;search OBJ;smell/sniff OBJ;squash/squeeze OBJ;swing OBJ;swing on OBJ;switch OBJ;switch/rotate/screw/turn/twist/unscrew OBJ off;switch/rotate/screw/turn/twist/unscrew OBJ on;switch/rotate/screw/turn/twist/unscrew on OBJ;switch/rotate/screw/turn/twist/unscrew/close/cover/shut off OBJ;taste OBJ;unfold OBJ;wave OBJ;adjust/set OBJ to OBJ;ask OBJ for OBJ;attach/fasten/fix/tie OBJ to OBJ;burn/light OBJ with OBJ;carry/get/hold/take OBJ off OBJ;clear/move/press/push/shift OBJ OBJ;clear/move/press/push/shift/transfer OBJ to OBJ;click OBJ on OBJ;dig OBJ with OBJ;discard/drop/throw OBJ against OBJ;discard/drop/throw OBJ at OBJ;discard/drop/throw OBJ down OBJ;discard/drop/throw/insert/put OBJ in OBJ;discard/drop/throw/insert/put OBJ into OBJ;discard/drop/throw/put OBJ on OBJ;discard/drop/throw/put OBJ onto OBJ;display/present/show OBJ OBJ;display/present/show OBJ to OBJ;empty OBJ into OBJ;empty OBJ on OBJ;empty OBJ onto OBJ;empty OBJ to OBJ;feed/give/offer/pay OBJ OBJ;feed/give/offer/pay OBJ to OBJ;feed/give/offer/pay over OBJ to OBJ;lock OBJ with OBJ;put OBJ inside OBJ;remove/carry/get/hold/take OBJ from OBJ;unlock/open/uncover/undo/unwrap OBJ with OBJ;",
"max_word_length" : 9
}
Expand Down
22 changes: 19 additions & 3 deletions tools/test_games.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,24 @@
109: "take paper", # Not needed to complete the game.
110: "take paper with pole", # Not needed to complete the game.
},


"ludicorp.z5": {
7: "smell car", # Not needed to complete the game.
50: "open door", # (it is locked) Not needed to complete the game.
140: "shoot window", # (glass is bulletproof) Not needed to complete the game.
239: "play arcade", # (you died) Not needed to complete the game.
241: "play pool", # (no ball nor cues) Not needed to complete the game.
255: "w", # (outer airlock door blocks your way) Not needed to complete the game.
},
"lurking.z3": {
"noop": ["z"]
},
"moonlit.z5": {},
"murdac.z5": {},
"night.z5": {
37: "get printer", # Not needed to complete the game.
38: "ask gnome about printer", # Not needed to complete the game.
"noop": ["z"]
},
}


Expand Down Expand Up @@ -533,7 +549,7 @@ def parse_args():

if not env._world_changed():
# if last_hash == env.get_world_state_hash():
if cmd.split(" ")[0] not in {"look", "x", "search", "examine", "i", "inventory"}:
if cmd.split(" ")[0] not in {"look", "l", "x", "search", "examine", "i", "inventory"}:

print(colored(f'{i}. [{cmd}]: world hash hasn\'t changed.\n"""\n{obs}\n"""', 'red'))

Expand Down

0 comments on commit 7032ea4

Please sign in to comment.