Changeset 450
- Timestamp:
- 08/05/07 20:39:00 (1 year ago)
- Files:
-
- trunk/src/defines.h (modified) (1 diff)
- trunk/src/dungeon.c (modified) (2 diffs)
- trunk/src/externs.h (modified) (2 diffs)
- trunk/src/generate.c (modified) (13 diffs)
- trunk/src/monster2.c (modified) (3 diffs)
- trunk/src/variable.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/defines.h
r449 r450 270 270 271 271 /* 272 * There is a 1/50 (2%) chance of inflating the requested monster _level272 * There is a 1/50 (2%) chance of inflating the requested monster level 273 273 * during the creation of a monsters (see "get_mon_num()" in "monster.c"). 274 274 * Lower values yield harder monsters more often. trunk/src/dungeon.c
r449 r450 736 736 { 737 737 /* Make a new monster */ 738 (void)alloc_monster(MAX_SIGHT + 5, FALSE );738 (void)alloc_monster(MAX_SIGHT + 5, FALSE, p_ptr->depth); 739 739 } 740 740 … … 1631 1631 1632 1632 /*** Process this dungeon level ***/ 1633 1634 /* Reset the monster generation level */1635 monster_level = p_ptr->depth;1636 1633 1637 1634 /* Main loop */ trunk/src/externs.h
r449 r450 108 108 extern u32b seed_town; 109 109 extern s16b num_repro; 110 extern s16b monster_level;111 110 extern char summon_kin_type; 112 111 extern s32b turn; … … 380 379 extern s16b monster_place(int y, int x, monster_type *n_ptr); 381 380 extern bool place_monster_aux(int y, int x, int r_idx, bool slp, bool grp); 382 extern bool place_monster(int y, int x, bool slp, bool grp);383 extern bool alloc_monster(int dis, bool slp );381 extern bool place_monster(int y, int x, int depth, bool slp, bool grp); 382 extern bool alloc_monster(int dis, bool slp, int depth); 384 383 extern bool summon_specific(int y1, int x1, int lev, int type); 385 384 extern bool multiply_monster(int m_idx); trunk/src/generate.c
r449 r450 1707 1707 (void)mon_restrict(symbol, (byte)depth, &dummy, TRUE); 1708 1708 1709 /* Set generation level */1710 monster_level = depth;1711 1712 1709 /* Build the monster probability table. */ 1713 1710 if (!get_mon_num(depth)) return; … … 1742 1739 1743 1740 /* Place the monster (sleeping, allow groups) */ 1744 (void)place_monster(y, x, TRUE, TRUE);1741 (void)place_monster(y, x, depth, TRUE, TRUE); 1745 1742 1746 1743 /* Rein in monster groups and escorts a little. */ … … 1754 1751 /* Remove monster restrictions. */ 1755 1752 (void)mon_restrict('\0', (byte)depth, &dummy, TRUE); 1756 1757 /* Reset monster generation level. */1758 monster_level = p_ptr->depth;1759 1753 } 1760 1754 … … 2437 2431 2438 2432 /* Let's guard the treasure well */ 2439 monster_level = p_ptr->depth + 4; 2440 (void)place_monster(y0, x0, TRUE, TRUE); 2441 monster_level = p_ptr->depth; 2433 (void)place_monster(y0, x0, p_ptr->depth + 4, TRUE, TRUE); 2442 2434 2443 2435 /* Traps, naturally. */ … … 3065 3057 case '&': 3066 3058 { 3067 monster_level = p_ptr->depth + 5; 3068 place_monster(y, x, TRUE, TRUE); 3069 monster_level = p_ptr->depth; 3059 place_monster(y, x, p_ptr->depth + 5, TRUE, TRUE); 3070 3060 break; 3071 3061 } … … 3074 3064 case '@': 3075 3065 { 3076 monster_level = p_ptr->depth + 11; 3077 place_monster(y, x, TRUE, TRUE); 3078 monster_level = p_ptr->depth; 3066 place_monster(y, x, p_ptr->depth + 11, TRUE, TRUE); 3079 3067 break; 3080 3068 } … … 3083 3071 case '9': 3084 3072 { 3085 monster_level = p_ptr->depth + 9; 3086 place_monster(y, x, TRUE, TRUE); 3087 monster_level = p_ptr->depth; 3073 place_monster(y, x, p_ptr->depth + 9, TRUE, TRUE); 3088 3074 place_object(y, x, p_ptr->depth + 7, TRUE, FALSE); 3089 3075 break; … … 3093 3079 case '8': 3094 3080 { 3095 monster_level = p_ptr->depth + 40; 3096 place_monster(y, x, TRUE, TRUE); 3097 monster_level = p_ptr->depth; 3081 place_monster(y, x, p_ptr->depth + 40, TRUE, TRUE); 3098 3082 place_object(y, x, p_ptr->depth + 20, TRUE, TRUE); 3099 3083 break; … … 3105 3089 if (rand_int(100) < 50) 3106 3090 { 3107 monster_level = p_ptr->depth + 3; 3108 place_monster(y, x, TRUE, TRUE); 3109 monster_level = p_ptr->depth; 3091 place_monster(y, x, p_ptr->depth + 3, TRUE, TRUE); 3110 3092 } 3111 3093 if (rand_int(100) < 50) … … 4750 4732 mon_restrict('\0', (byte)p_ptr->depth, &dummy, TRUE); 4751 4733 4752 /* Paranoia -- Reset the monster generation depth. */4753 monster_level = p_ptr->depth;4754 4755 4734 4756 4735 /* Pick a base number of monsters */ … … 4761 4740 { 4762 4741 /* Place a random monster */ 4763 (void)alloc_monster(0, TRUE );4742 (void)alloc_monster(0, TRUE, p_ptr->depth); 4764 4743 } 4765 4744 … … 5050 5029 { 5051 5030 /* Make a resident */ 5052 (void)alloc_monster(3, TRUE );5031 (void)alloc_monster(3, TRUE, p_ptr->depth); 5053 5032 } 5054 5033 } … … 5112 5091 Term->offset_x = DUNGEON_WID; 5113 5092 5114 5115 /* Reset the monster generation level */5116 monster_level = p_ptr->depth;5117 5093 5118 5094 /* Nothing special here yet */ trunk/src/monster2.c
r448 r450 1886 1886 * Hack -- attempt to place a monster at the given location 1887 1887 * 1888 * Attempt to find a monster appropriate to the "monster_level"1889 */ 1890 bool place_monster(int y, int x, bool slp, bool grp)1888 * Attempt to find a monster appropriate to the given depth 1889 */ 1890 bool place_monster(int y, int x, int depth, bool slp, bool grp) 1891 1891 { 1892 1892 int r_idx; 1893 1893 1894 1894 /* Pick a monster */ 1895 r_idx = get_mon_num( monster_level);1895 r_idx = get_mon_num(depth); 1896 1896 1897 1897 /* Handle failure */ … … 1971 1971 * Use "slp" to choose the initial "sleep" status 1972 1972 * 1973 * Use " monster_level" for the monster level1974 */ 1975 bool alloc_monster(int dis, bool slp )1973 * Use "depth" for the monster level 1974 */ 1975 bool alloc_monster(int dis, bool slp, int depth) 1976 1976 { 1977 1977 int py = p_ptr->py; … … 2006 2006 2007 2007 /* Attempt to place the monster, allow groups */ 2008 if (place_monster(y, x, slp, TRUE)) return (TRUE);2008 if (place_monster(y, x, depth, slp, TRUE)) return (TRUE); 2009 2009 2010 2010 /* Nope */ trunk/src/variable.c
r449 r450 73 73 74 74 s16b num_repro; /* Current reproducer count */ 75 s16b monster_level; /* Current monster creation level */76 75 77 76 char summon_kin_type; /* Hack -- See summon_specific() */
