diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-09-24 06:44:22 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-09-24 06:44:22 +0000 |
commit | fff610fdac4103fd634f7cd74d3ec0ca06136b1f (patch) | |
tree | 3997bee4acfdd191667b2cb119a7519768505b52 | |
parent | e64018ae71e39de8db326ceaf32eea44c73363c1 (diff) | |
download | crawl-ref-fff610fdac4103fd634f7cd74d3ec0ca06136b1f.tar.gz crawl-ref-fff610fdac4103fd634f7cd74d3ec0ca06136b1f.zip |
Reworked wand prices slightly per discussion with Erik.
Tweaked debug_make_shop to allow creating representative shops for easy price
comparisons.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@97 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r-- | crawl-ref/source/debug.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/shopping.cc | 8 |
4 files changed, 22 insertions, 5 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc index 3bdde02b1a..ba806a9ed0 100644 --- a/crawl-ref/source/debug.cc +++ b/crawl-ref/source/debug.cc @@ -2203,6 +2203,7 @@ void debug_make_shop() int gridch = grd[you.x_pos][you.y_pos]; bool have_shop_slots = false; int new_shop_type = SHOP_UNASSIGNED; + bool representative = false; if (gridch != DNGN_FLOOR) { @@ -2246,7 +2247,10 @@ void debug_make_shop() return; } - place_spec_shop(you.your_level, you.x_pos, you.y_pos, new_shop_type); + representative = !!strchr(requested_shop, '*'); + + place_spec_shop(you.your_level, you.x_pos, you.y_pos, + new_shop_type, representative); link_items(); mprf("Done."); } diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index e9c6cb690b..7f8e43116d 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -6688,7 +6688,7 @@ static void place_shops(int level_number) void place_spec_shop( int level_number, unsigned char shop_x, unsigned char shop_y, - unsigned char force_s_type ) + unsigned char force_s_type, bool representative ) { int orb = 0; int i = 0; @@ -6733,6 +6733,8 @@ void place_spec_shop( int level_number, } int plojy = 5 + random2avg(12, 3); + if (representative) + plojy = env.shop[i].type == SHOP_WAND? NUM_WANDS : 16; for (j = 0; j < plojy; j++) { @@ -6754,7 +6756,8 @@ void place_spec_shop( int level_number, // General Stores (see item_in_shop() below) (GDL) while(true) { - orb = items( 1, item_in_shop(env.shop[i].type), OBJ_RANDOM, true, + const int subtype = representative? j : OBJ_RANDOM; + orb = items( 1, item_in_shop(env.shop[i].type), subtype, true, item_level, 250 ); if (orb != NON_ITEM @@ -6777,6 +6780,9 @@ void place_spec_shop( int level_number, if (orb == NON_ITEM) break; + if (representative && mitm[orb].base_type == OBJ_WANDS) + mitm[orb].plus = 7; + // set object 'position' (gah!) & ID status mitm[orb].x = 0; mitm[orb].y = 5 + i; diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h index 15e1938065..34d824ba68 100644 --- a/crawl-ref/source/dungeon.h +++ b/crawl-ref/source/dungeon.h @@ -54,6 +54,7 @@ bool place_specific_trap(unsigned char spec_x, unsigned char spec_y, unsigned char spec_type); void place_spec_shop(int level_number, unsigned char shop_x, - unsigned char shop_y, unsigned char force_s_type); + unsigned char shop_y, unsigned char force_s_type, + bool representative = false ); #endif diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 05f316dfd3..dc621460d6 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -1106,12 +1106,15 @@ unsigned int item_value( item_def item, id_arr id, bool ident ) break; case WAND_INVISIBILITY: - case WAND_DISINTEGRATION: case WAND_DRAINING: case WAND_LIGHTNING: valued += 175; break; + case WAND_DISINTEGRATION: + valued += 120; + break; + case WAND_DIGGING: valued += 100; break; @@ -1124,6 +1127,9 @@ unsigned int item_value( item_def item, id_arr id, bool ident ) case WAND_ENSLAVEMENT: case WAND_POLYMORPH_OTHER: + valued += 63; + break; + case WAND_SLOWING: valued += 50; break; |