void setup() { set_light(100); set_short("Small Gods Street outside Temple"); set_long( "You are on Small Gods Street outside the Temple of Small Gods. "+ "A large gateway to the west leads into the Temple. The "+ "street continues north and south.\n"); add_exit("north", ROOM+"smallgod1", "road"); add_exit("south", ROOM+"smallgod3", "road"); add_exit("west", TEMPLE, "gate"); add_item("temple", "It is the Temple of Small Gods. It is covered in small statues.\n"); add_alias("temple of small gods", "temple"); add_item("gateway", "This is a large wrought-iron set of gates which have been open for so many years "+ "that they appear to have rusted permanently open. Various and sundry "+ "religious symbols are situated over the top of the gateway.\n"); add_alias("gate", "gateway"); add_alias("gates", "gateway"); add_item("symbols", "From the look of it the many different symbols are all "+ "collected from the myriad of small obscure gods that are worshipped "+ "in Ankh-Morpork.\n"); add_alias("symbol", "symbols"); set_zone("ankh morpork"); set_monster(NUM, "city"); }
int add_monster(int ac, char **avi) { FILE* fd; struct QueenMonster monster; int i; if (ac < 1) return -1; if ((fd = fopen(avi[0], "r+")) == NULL) { fprintf(stderr, "Unable to open file '%s': %m\n", avi[0]); return 1; } i = 0; while (fread(&monster, sizeof(struct QueenMonster), 1, fd) > 0) ++i; if (i >= NB_MAX_MONSTER_PER_LEVEL) { fprintf(stderr, "Too much monster in this level. Canno't add\n"); return 1; } memset(&monster, 0, sizeof(struct QueenMonster)); set_monster(&monster, ac - 1, avi + 1); fwrite(&monster, sizeof(struct QueenMonster), 1, fd); fclose(fd); return 0; }
void setup() { set_short("Fruitbat Avenue"); set_long("This is Fruitbat Avenue at the junction with Crumpet Circle.\n"); set_light( 80 ); add_exit("east", FRUITBAT + "fruitbat2", "road"); add_exit("north", CRUMPT + "crumpt8", "road"); set_monster(1, "city"); }
void setup() { set_light(100); set_short("Corner of Filgree and Mulligan"); set_long( "You are at the eastern end of Filgree Street. You can see the "+ "Unseen University entrance to the south. Filgree Street "+ "leads west from here, and a guard post can be seen to the east.\n"); add_exit("south", ROOM+"outsideuu", "road"); add_exit("west", ROOM+"filgree11", "road"); add_exit("east", ROOM+"filgree13", "road"); add_item("university", "You can't see very well from here. You could see "+ "better if you went further south.\n"); add_alias("uni", "university"); set_zone("ankh morpork"); set_monster(NUM, "city"); }