--- a/main.c 2026-07-24 03:02:38 +++ b/main.c 2026-07-24 02:48:31 @@ -63,6 +63,34 @@ #endif dnum = lowtime + md_getpid(); seed = dnum; + + /* SEEDCOMPAT: dump the per-game item appearance tables for a fixed + * seed and exit, without initscr. The init sequence and everything + * it consumes from rnd() mirror the normal startup (main.c), so the + * tables are exactly what a real game with SEED would show. */ + if (getenv("DUMP") != NULL) + { + int di; + char *sv = getenv("SEED"); + if (sv != NULL) + seed = atoi(sv); + printf("SEED %d\n", seed); + init_probs(); + init_player(); + init_names(); + init_colors(); + init_stones(); + init_materials(); + printf("POTIONS\n"); + for (di = 0; di < MAXPOTIONS; di++) printf("%s\n", p_colors[di]); + printf("SCROLLS\n"); + for (di = 0; di < MAXSCROLLS; di++) printf("%s\n", s_names[di]); + printf("RINGS\n"); + for (di = 0; di < MAXRINGS; di++) printf("%s\n", r_stones[di]); + printf("STICKS\n"); + for (di = 0; di < MAXSTICKS; di++) printf("%s %s\n", ws_type[di], ws_made[di]); + exit(0); + } open_score();