diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-29 12:24:38 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-29 12:24:38 +0000 |
commit | b69356ae0558ebc5431444fce3c9b0636e2812b5 (patch) | |
tree | 520c24c25f726bf435d6b5988b60175917273d54 /crawl-ref/source | |
parent | 0cba8a69f3ec226c95957572b7904245e31024a6 (diff) | |
download | crawl-ref-b69356ae0558ebc5431444fce3c9b0636e2812b5.tar.gz crawl-ref-b69356ae0558ebc5431444fce3c9b0636e2812b5.zip |
Make distortion weapons unmarked, restore old chances of generation (well,
spears and staves now have a slightly lower chance of distort, but I will live
with that).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@727 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 8fee78bc50..6a137810a9 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -180,8 +180,7 @@ static bool got_curare_roll(const int item_level) static bool got_distortion_roll(const int item_level) { - return (item_level < 25? random2(600) <= item_level - : one_chance_in(25)); + return (one_chance_in(25)); } static void place_altars() @@ -452,6 +451,24 @@ void init_rod_mp(item_def &item) item.plus = item.plus2; } +static bool weapon_is_visibly_special(const item_def &item) +{ + const int brand = get_weapon_brand(item); + const bool visibly_branded = + brand != SPWPN_NORMAL && brand != SPWPN_DISTORTION; + + return (((is_random_artefact(item) || visibly_branded) + && !one_chance_in(10)) + || ((item.plus != 0 || item.plus2 != 0) + && one_chance_in(3) + && brand != SPWPN_DISTORTION)) + && item.sub_type != WPN_CLUB + && item.sub_type != WPN_GIANT_CLUB + && item.sub_type != WPN_GIANT_SPIKED_CLUB + && get_equip_desc(item) == 0 + && get_equip_race(item) == 0; +} + // Returns item slot or NON_ITEM if it fails int items( int allow_uniques, // not just true-false, // because of BCR acquirement hack @@ -1289,16 +1306,7 @@ int items( int allow_uniques, // not just true-false, } } - if ((((is_random_artefact( mitm[p] ) - || get_weapon_brand( mitm[p] ) != SPWPN_NORMAL) - && !one_chance_in(10)) - || ((mitm[p].plus != 0 || mitm[p].plus2 != 0) - && one_chance_in(3))) - && mitm[p].sub_type != WPN_CLUB - && mitm[p].sub_type != WPN_GIANT_CLUB - && mitm[p].sub_type != WPN_GIANT_SPIKED_CLUB - && get_equip_desc(mitm[p]) == 0 - && get_equip_race(mitm[p]) == 0) + if (weapon_is_visibly_special(mitm[p])) { set_equip_desc( mitm[p], (coinflip() ? ISFLAG_GLOWING : ISFLAG_RUNED) ); |