diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-11 21:39:34 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-03-11 21:39:34 +0000 |
commit | 3f1f5c2f776026f09ff0603c3ea2d1d1e74a2135 (patch) | |
tree | 50fbcb2d26d82fe6a5f66654cbe55df4d1a1ed88 /crawl-ref/source | |
parent | da2c6835866fc0ef70b5defdbea6c12dfa7611f8 (diff) | |
download | crawl-ref-3f1f5c2f776026f09ff0603c3ea2d1d1e74a2135.tar.gz crawl-ref-3f1f5c2f776026f09ff0603c3ea2d1d1e74a2135.zip |
Since Poison Weapon won't work on crushing-type weapons, don't allow
randart crushing-type weapons to have the venom brand either.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9415 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/makeitem.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/randart.cc | 18 | ||||
-rw-r--r-- | crawl-ref/source/spells2.cc | 9 |
3 files changed, 17 insertions, 12 deletions
diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index f6ca660c82..a25f960a9a 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -1272,7 +1272,6 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) if (one_chance_in(4) && (rc == SPWPN_NORMAL || one_chance_in(3))) rc = SPWPN_VORPAL; - break; case WPN_WAR_AXE: @@ -1309,7 +1308,6 @@ static brand_type _determine_weapon_brand(const item_def& item, int item_level) if (one_chance_in(12)) rc = SPWPN_VENOM; - break; case WPN_WHIP: diff --git a/crawl-ref/source/randart.cc b/crawl-ref/source/randart.cc index ce912f8ed7..6f22c01433 100644 --- a/crawl-ref/source/randart.cc +++ b/crawl-ref/source/randart.cc @@ -675,7 +675,7 @@ void static _get_randart_properties(const item_def &item, proprt.init(0); - if (aclass == OBJ_WEAPONS) // Only weapons get brands, of course + if (aclass == OBJ_WEAPONS) // only weapons get brands, of course { proprt[RAP_BRAND] = SPWPN_FLAMING + random2(15); // brand @@ -688,7 +688,13 @@ void static _get_randart_properties(const item_def &item, if (proprt[RAP_BRAND] == SPWPN_DRAGON_SLAYING && weapon_skill(item) != SK_POLEARMS) { - proprt[RAP_BRAND] = 0; // missile wpns + proprt[RAP_BRAND] = SPWPN_NORMAL; + } + + if (proprt[RAP_BRAND] == SPWPN_VENOM + && get_vorpal_type(item) == DVORP_CRUSHING) + { + proprt[RAP_BRAND] = SPWPN_NORMAL; } if (one_chance_in(6)) @@ -697,13 +703,13 @@ void static _get_randart_properties(const item_def &item, if (proprt[RAP_BRAND] == SPWPN_FLAME || proprt[RAP_BRAND] == SPWPN_FROST) { - proprt[RAP_BRAND] = 0; // missile wpns + proprt[RAP_BRAND] = SPWPN_NORMAL; // missile wpns } if (proprt[RAP_BRAND] == SPWPN_PROTECTION) - proprt[RAP_BRAND] = 0; // no protection + proprt[RAP_BRAND] = SPWPN_NORMAL; // no protection - // if this happens, things might get broken -- bwr + // if this happens, things might get broken - bwr if (proprt[RAP_BRAND] == SPWPN_SPEED && atype == WPN_QUICK_BLADE) proprt[RAP_BRAND] = SPWPN_NORMAL; @@ -2217,7 +2223,7 @@ bool make_item_unrandart( item_def &item, int unrand_index ) item.flags |= ISFLAG_UNRANDART; _init_randart_properties(item); - item.special = unrand->prpty[ RAP_BRAND ]; + item.special = unrand->prpty[RAP_BRAND]; if (item.special != 0) { do_curse_item( item ); diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc index 9c8ab0459b..e730a7a7a8 100644 --- a/crawl-ref/source/spells2.cc +++ b/crawl-ref/source/spells2.cc @@ -348,22 +348,23 @@ bool brand_weapon(brand_type which_brand, int power) msg += " glows silver and feels heavier."; duration_affected = 7; break; + default: break; } - if ( !temp_brand ) + if (!temp_brand) { - set_item_ego_type( weapon, OBJ_WEAPONS, which_brand ); + set_item_ego_type(weapon, OBJ_WEAPONS, which_brand); you.wield_change = true; } - if ( emit_special_message ) + if (emit_special_message) mpr(msg.c_str()); else mprf("%s flashes.", weapon.name(DESC_CAP_YOUR).c_str()); - const int dur_change = duration_affected + roll_dice( 2, power ); + const int dur_change = duration_affected + roll_dice(2, power); you.duration[DUR_WEAPON_BRAND] += dur_change; |