OSDN Git Service

[Refactor] #38993 object_level を floor_type に取り込む。 / Move object_level to floor_type...
[hengband/hengband.git] / src / rooms-vault.c
index 3c45a8f..26b1ed4 100644 (file)
@@ -461,9 +461,9 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
 
                        case 'A':
                                /* Reward for Pattern walk */
-                               object_level = current_floor_ptr->base_level + 12;
+                               current_floor_ptr->object_level = current_floor_ptr->base_level + 12;
                                place_object(y, x, AM_GOOD | AM_GREAT);
-                               object_level = current_floor_ptr->base_level;
+                               current_floor_ptr->object_level = current_floor_ptr->base_level;
                                break;
 
                        case '~':
@@ -575,9 +575,9 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
                                monster_level = current_floor_ptr->base_level + 9;
                                place_monster(y, x, PM_ALLOW_SLEEP);
                                monster_level = current_floor_ptr->base_level;
-                               object_level = current_floor_ptr->base_level + 7;
+                               current_floor_ptr->object_level = current_floor_ptr->base_level + 7;
                                place_object(y, x, AM_GOOD);
-                               object_level = current_floor_ptr->base_level;
+                               current_floor_ptr->object_level = current_floor_ptr->base_level;
                                break;
                        }
 
@@ -587,9 +587,9 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
                                monster_level = current_floor_ptr->base_level + 40;
                                place_monster(y, x, PM_ALLOW_SLEEP);
                                monster_level = current_floor_ptr->base_level;
-                               object_level = current_floor_ptr->base_level + 20;
+                               current_floor_ptr->object_level = current_floor_ptr->base_level + 20;
                                place_object(y, x, AM_GOOD | AM_GREAT);
-                               object_level = current_floor_ptr->base_level;
+                               current_floor_ptr->object_level = current_floor_ptr->base_level;
                                break;
                        }
 
@@ -604,9 +604,9 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
                                }
                                if (randint0(100) < 50)
                                {
-                                       object_level = current_floor_ptr->base_level + 7;
+                                       current_floor_ptr->object_level = current_floor_ptr->base_level + 7;
                                        place_object(y, x, 0L);
-                                       object_level = current_floor_ptr->base_level;
+                                       current_floor_ptr->object_level = current_floor_ptr->base_level;
                                }
                                break;
                        }
@@ -656,7 +656,7 @@ bool build_type7(void)
        y = v_ptr->hgt;
 
        /* Some huge vault cannot be ratated to fit in the dungeon */
-       if (x + 2 > cur_hgt - 2)
+       if (x + 2 > current_floor_ptr->height - 2)
        {
                /* Forbid 90 or 270 degree ratation */
                transno &= ~1;
@@ -736,7 +736,7 @@ bool build_type8(void)
        y = v_ptr->hgt;
 
        /* Some huge vault cannot be ratated to fit in the dungeon */
-       if (x + 2 > cur_hgt - 2)
+       if (x + 2 > current_floor_ptr->height - 2)
        {
                /* Forbid 90 or 270 degree ratation */
                transno &= ~1;
@@ -931,17 +931,17 @@ static void build_elemental_vault(POSITION x0, POSITION y0, POSITION xsiz, POSIT
        xsize = xhsize * 2;
        ysize = yhsize * 2;
 
-       if (dun_level < 25)
+       if (current_floor_ptr->dun_level < 25)
        {
                /* Earth vault  (Rubble) */
                type = LAKE_T_EARTH_VAULT;
        }
-       else if (dun_level < 50)
+       else if (current_floor_ptr->dun_level < 50)
        {
                /* Air vault (Trees) */
                type = LAKE_T_AIR_VAULT;
        }
-       else if (dun_level < 75)
+       else if (current_floor_ptr->dun_level < 75)
        {
                /* Water vault (shallow water) */
                type = LAKE_T_WATER_VAULT;
@@ -1258,7 +1258,7 @@ bool build_type17(void)
        y = v_ptr->hgt;
 
        /* Some huge vault cannot be ratated to fit in the dungeon */
-       if (x + 2 > cur_hgt - 2)
+       if (x + 2 > current_floor_ptr->height - 2)
        {
                /* Forbid 90 or 270 degree ratation */
                transno &= ~1;