diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-10 03:07:45 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-10 03:07:45 +0000 |
commit | eea08588eb6a15371f171082d30bf18f1ae869df (patch) | |
tree | e16ec0a0d62d70d979f89b74b66778e7f9f366c8 /crawl-ref/source | |
parent | fbc73ad608c9adaeb4cfe7dc4faba72ed06b5460 (diff) | |
download | crawl-ref-eea08588eb6a15371f171082d30bf18f1ae869df.tar.gz crawl-ref-eea08588eb6a15371f171082d30bf18f1ae869df.zip |
Add more consistency fixes for equipment. Disallow dwarven needles and
blowguns in set_equip_race(), as the former are useless without the
latter, and dwarves don't make the former. Also, disallow racial naga
and centaur bardings, as they aren't generated randomly, and are useless
to anyone but nagas and centaurs. Finally, allow orcish robes and
shields to be generated randomly; among monsters, orc wizards already
get orcish robes, and, among players, orc fighters already start with
orcish shields, and orcs are good with shields anyway.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3032 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/makeitem.cc | 16 |
2 files changed, 15 insertions, 9 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index 2ec3b99dfc..1bbb7861a4 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -697,8 +697,11 @@ void set_equip_race( item_def &item, unsigned long flags ) switch (item.base_type) { case OBJ_WEAPONS: - if (weapon_skill(item) == SK_POLEARMS) + if (weapon_skill(item) == SK_POLEARMS + || item.sub_type == WPN_BLOWGUN) + { return; + } break; case OBJ_ARMOUR: if (item.sub_type == ARM_ROBE @@ -709,7 +712,8 @@ void set_equip_race( item_def &item, unsigned long flags ) } break; case OBJ_MISSILES: - if (item.sub_type == MI_ARROW + if (item.sub_type == MI_NEEDLE + || item.sub_type == MI_ARROW || item.sub_type == MI_JAVELIN) { return; diff --git a/crawl-ref/source/makeitem.cc b/crawl-ref/source/makeitem.cc index 0ac50bf823..2604f4b612 100644 --- a/crawl-ref/source/makeitem.cc +++ b/crawl-ref/source/makeitem.cc @@ -1850,23 +1850,25 @@ static item_status_flag_type determine_armour_race(const item_def& item, rc = ISFLAG_ELVEN; break; - case MAKE_ITEM_DWARVEN: + case MAKE_ITEM_DWARVEN: rc = ISFLAG_DWARVEN; break; - case MAKE_ITEM_ORCISH: + case MAKE_ITEM_ORCISH: rc = ISFLAG_ORCISH; break; - + case MAKE_ITEM_RANDOM_RACE: if ( coinflip() ) break; - + switch (item.sub_type) { case ARM_SHIELD: case ARM_BUCKLER: - case ARM_LARGE_SHIELD: + case ARM_LARGE_SHIELD: + if (one_chance_in(4)) + rc = ISFLAG_ORCISH; if (one_chance_in(4)) rc = ISFLAG_ELVEN; if (one_chance_in(3)) @@ -1887,8 +1889,6 @@ static item_status_flag_type determine_armour_race(const item_def& item, rc = ISFLAG_ELVEN; break; - case ARM_NAGA_BARDING: - case ARM_CENTAUR_BARDING: case ARM_BOOTS: if (one_chance_in(4)) rc = ISFLAG_ORCISH; @@ -1916,6 +1916,8 @@ static item_status_flag_type determine_armour_race(const item_def& item, break; case ARM_ROBE: + if (one_chance_in(6)) + rc = ISFLAG_ORCISH; if (one_chance_in(4)) rc = ISFLAG_ELVEN; break; |