typedef struct {{
const string_group_t words;
- const long message;
+ const char* message;
}} action_t;
typedef struct {{
#define NTRAVEL {}
#define NKEYS {}
+#define BIRD_ENDSTATE {}
+
enum arbitrary_messages_refs {{
{}
}};
immovable = attr.get("immovable", False)
try:
if type(locs) == str:
- locs = [locnames.index(locs), -1 if immovable else 0]
- else:
- locs = [locnames.index(x) for x in locs]
+ locs = [locs, -1 if immovable else 0]
except IndexError:
sys.stderr.write("dungeon: unknown object location in %s\n" % locs)
sys.exit(1)
get_hints(db["hints"], db["arbitrary_messages"]),
get_condbits(db["locations"]),
get_motions(db["motions"]),
- get_actions(db["actions"]),
+ get_specials(db["actions"]),
get_specials(db["specials"]),
bigdump(tkey),
get_travel(travel),
ignore,
)
+ # 0-origin index of birds's last song. Bird should
+ # die after player hears this.
+ deathbird = len(dict(db["objects"])["BIRD"]["sounds"]) - 1
+
h = h_template.format(
len(db["locations"])-1,
len(db["objects"])-1,
len(db["specials"]),
len(travel),
len(tkey),
+ deathbird,
get_refs(db["arbitrary_messages"]),
get_refs(db["locations"]),
get_refs(db["objects"]),