8 * @brief タイプ14の部屋…特殊トラップ部屋の生成 / Type 14 -- trapped rooms
11 * A special trap is placed at center of the room
13 bool build_type14(void)
15 POSITION y, x, y2, x2, yval, xval;
16 POSITION y1, x1, xsize, ysize;
23 /* Pick a room size */
32 /* Find and reserve some space in the dungeon. Get center of room. */
33 if (!find_space(&yval, &xval, ysize + 2, xsize + 2)) return FALSE;
35 /* Choose lite or dark */
36 light = ((dun_level <= randint1(25)) && !(d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS));
39 /* Get corner values */
40 y1 = yval - ysize / 2;
41 x1 = xval - xsize / 2;
42 y2 = yval + (ysize - 1) / 2;
43 x2 = xval + (xsize - 1) / 2;
46 /* Place a full floor under the room */
47 for (y = y1 - 1; y <= y2 + 1; y++)
49 for (x = x1 - 1; x <= x2 + 1; x++)
52 place_floor_grid(c_ptr);
53 c_ptr->info |= (CAVE_ROOM);
54 if (light) c_ptr->info |= (CAVE_GLOW);
58 /* Walls around the room */
59 for (y = y1 - 1; y <= y2 + 1; y++)
61 c_ptr = &cave[y][x1 - 1];
62 place_outer_grid(c_ptr);
63 c_ptr = &cave[y][x2 + 1];
64 place_outer_grid(c_ptr);
66 for (x = x1 - 1; x <= x2 + 1; x++)
68 c_ptr = &cave[y1 - 1][x];
69 place_outer_grid(c_ptr);
70 c_ptr = &cave[y2 + 1][x];
71 place_outer_grid(c_ptr);
74 if (dun_level < 30 + randint1(30))
75 trap = feat_trap_piranha;
77 trap = feat_trap_armageddon;
79 /* Place a special trap */
80 c_ptr = &cave[rand_spread(yval, ysize / 4)][rand_spread(xval, xsize / 4)];
81 c_ptr->mimic = c_ptr->feat;
84 msg_format_wizard(CHEAT_DUNGEON, _("%sの部屋が生成されました。", "Room of %s was generated."), f_name + f_info[trap].name);