From 7abec6bdf8be434d2635fb6a32278488e6925064 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 13 Dec 2007 03:09:47 +0000 Subject: 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 --- crawl-ref/source/item_use.cc | 20 +++++++++++++++----- crawl-ref/source/itemprop.cc | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source') 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 )) { diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index dc2fca1156..0cb5aa643e 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1122,7 +1122,7 @@ bool check_armour_shape( const item_def &item, bool quiet ) return (false); } - + switch (you.species) { case SP_NAGA: -- cgit v1.2.3-54-g00ecf