diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-06 21:21:30 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-06 21:21:30 +0000 |
commit | 7d423aef8123a887cb2d3188206aeea9b628bd84 (patch) | |
tree | 9c856fc3d14000851951b7920c20011f72c6e5d2 /crawl-ref/source/abyss.cc | |
parent | 44d7fbb36c55859117824fe25a298afbe437221b (diff) | |
download | crawl-ref-7d423aef8123a887cb2d3188206aeea9b628bd84.tar.gz crawl-ref-7d423aef8123a887cb2d3188206aeea9b628bd84.zip |
Fix 2011722: Reallow targetting beams such that you may be hit. (There's
a new prompt now, but don't prompt a second time if you already
confirmed another one before.)
Fix some issues when creating items in the Abyss during GDT_GAME_START.
This may or may not have played a role in 2008976.
Lower spawning rate in the Abyss during GDT_GAME_START (10% spawning
chance instead of guaranteed spawning per 5 turns).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6434 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abyss.cc')
-rw-r--r-- | crawl-ref/source/abyss.cc | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc index 7d9a427909..2ef221a30a 100644 --- a/crawl-ref/source/abyss.cc +++ b/crawl-ref/source/abyss.cc @@ -219,6 +219,15 @@ static void _generate_area(int gx1, int gy1, int gx2, int gy2, } } + // During game start, number and level of items mustn't be higher than + // that on level 1. + int num_items = 150, items_level = 51; + if (you.char_direction == GDT_GAME_START) + { + num_items = 3 + roll_dice( 3, 11 ); + items_level = 0; + } + for (int i = gx1; i <= gx2; i++) for (int j = gy1; j <= gy2; j++) { @@ -226,7 +235,7 @@ static void _generate_area(int gx1, int gy1, int gx2, int gy2, { grd[i][j] = DNGN_FLOOR; - if (items_placed < 150 && one_chance_in(200)) + if (items_placed < num_items && one_chance_in(200)) { if (!placed_abyssal_rune && abyssal_rune_roll != -1 && you.char_direction != GDT_GAME_START @@ -241,19 +250,8 @@ static void _generate_area(int gx1, int gy1, int gx2, int gy2, } else { - if (you.char_direction == GDT_GAME_START) - { - // Number and level of items as that on level 1. - const int num_items = 3 + roll_dice( 3, 11 ); - const int items_level = 0; - thing_created = items(1, OBJ_RANDOM, OBJ_RANDOM, - true, items_level, num_items); - } - else - { - thing_created = items(1, OBJ_RANDOM, OBJ_RANDOM, - true, 51, 250); - } + thing_created = items(1, OBJ_RANDOM, OBJ_RANDOM, + true, items_level, 250); } move_item_to_grid( &thing_created, i, j ); |