diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-13 03:09:47 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-12-13 03:09:47 +0000 |
commit | 7abec6bdf8be434d2635fb6a32278488e6925064 (patch) | |
tree | 038b935cd90714c3a5b79cde36f145a226d7575a /crawl-ref/source/item_use.cc | |
parent | daffe68811f8666a4aaf25fa882fd0bfe196015f (diff) | |
download | crawl-ref-7abec6bdf8be434d2635fb6a32278488e6925064.tar.gz crawl-ref-7abec6bdf8be434d2635fb6a32278488e6925064.zip |
When trying to wear a hard helmet as a kenku, display "That helmet does
not fit your head!" instead of "You can't wear that in your present
form."
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3050 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r-- | crawl-ref/source/item_use.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 5c20371fe0..baa5c2f833 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -766,11 +766,11 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary) return (false); } - + bool can_wear = true; const int sub_type = item.sub_type; const equipment_type slot = get_armour_slot(item); - + if (sub_type == ARM_NAGA_BARDING) can_wear = (you.species == SP_NAGA); @@ -817,7 +817,7 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary) mpr("Boots don't fit your paws!"); return (false); } - + if (you.species == SP_NAGA) { if (verbose) @@ -848,10 +848,20 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary) // it fits return (true); } - else if (slot == EQ_HELMET && !is_hard_helmet( item )) + else if (slot == EQ_HELMET) { // soft helmets (caps and wizard hats) always fit - return (true); + if (!is_hard_helmet( item )) + return (true); + + if (you.species == SP_KENKU + && (ignore_temporary || !player_is_shapechanged())) + { + if (verbose) + mpr("That helmet does not fit your head!"); + + return (false); + } } else if (!can_equip( slot, ignore_temporary )) { |