OSDN Git Service

Replaced "spelling" with "spell casting" in English name for high mage innate ability.
[hengbandforosx/hengbandosx.git] / src / rooms-vault.c
index 3c45a8f..8243b68 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 '~':
@@ -551,65 +551,64 @@ static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xm
                        /* Analyze the symbol */
                        switch (*t)
                        {
-                               /* Monster */
-                       case '&':
-                       {
-                               monster_level = current_floor_ptr->base_level + 5;
-                               place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
-                               monster_level = current_floor_ptr->base_level;
-                               break;
-                       }
-
-                       /* Meaner monster */
-                       case '@':
-                       {
-                               monster_level = current_floor_ptr->base_level + 11;
-                               place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
-                               monster_level = current_floor_ptr->base_level;
-                               break;
-                       }
+                               case '&':
+                               {
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level + 5;
+                                       place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level;
+                                       break;
+                               }
 
-                       /* Meaner monster, plus treasure */
-                       case '9':
-                       {
-                               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;
-                               place_object(y, x, AM_GOOD);
-                               object_level = current_floor_ptr->base_level;
-                               break;
-                       }
+                               /* Meaner monster */
+                               case '@':
+                               {
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level + 11;
+                                       place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level;
+                                       break;
+                               }
 
-                       /* Nasty monster and treasure */
-                       case '8':
-                       {
-                               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;
-                               place_object(y, x, AM_GOOD | AM_GREAT);
-                               object_level = current_floor_ptr->base_level;
-                               break;
-                       }
+                               /* Meaner monster, plus treasure */
+                               case '9':
+                               {
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level + 9;
+                                       place_monster(y, x, PM_ALLOW_SLEEP);
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level;
+                                       current_floor_ptr->object_level = current_floor_ptr->base_level + 7;
+                                       place_object(y, x, AM_GOOD);
+                                       current_floor_ptr->object_level = current_floor_ptr->base_level;
+                                       break;
+                               }
 
-                       /* Monster and/or object */
-                       case ',':
-                       {
-                               if (randint0(100) < 50)
+                               /* Nasty monster and treasure */
+                               case '8':
                                {
-                                       monster_level = current_floor_ptr->base_level + 3;
-                                       place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
-                                       monster_level = current_floor_ptr->base_level;
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level + 40;
+                                       place_monster(y, x, PM_ALLOW_SLEEP);
+                                       current_floor_ptr->monster_level = current_floor_ptr->base_level;
+                                       current_floor_ptr->object_level = current_floor_ptr->base_level + 20;
+                                       place_object(y, x, AM_GOOD | AM_GREAT);
+                                       current_floor_ptr->object_level = current_floor_ptr->base_level;
+                                       break;
                                }
-                               if (randint0(100) < 50)
+
+                               /* Monster and/or object */
+                               case ',':
                                {
-                                       object_level = current_floor_ptr->base_level + 7;
-                                       place_object(y, x, 0L);
-                                       object_level = current_floor_ptr->base_level;
+                                       if (randint0(100) < 50)
+                                       {
+                                               current_floor_ptr->monster_level = current_floor_ptr->base_level + 3;
+                                               place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
+                                               current_floor_ptr->monster_level = current_floor_ptr->base_level;
+                                       }
+                                       if (randint0(100) < 50)
+                                       {
+                                               current_floor_ptr->object_level = current_floor_ptr->base_level + 7;
+                                               place_object(y, x, 0L);
+                                               current_floor_ptr->object_level = current_floor_ptr->base_level;
+                                       }
+                                       break;
                                }
-                               break;
-                       }
 
                        }
                }
@@ -656,7 +655,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 +735,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 +930,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;
@@ -1211,8 +1210,6 @@ bool build_type10(void)
        case 8: build_elemental_vault(x0, y0, xsize, ysize); break;
 #endif /* ALLOW_CAVERNS_AND_LAKES */
                /* I know how to add a few more... give me some time. */
-
-               /* Paranoia */
        default: return FALSE;
        }
 
@@ -1258,7 +1255,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;