diff options
author | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-08 14:37:48 +0300 |
---|---|---|
committer | Vsevolod Kozlov <zaba@thorium.homeunix.org> | 2009-11-08 14:38:30 +0300 |
commit | 53585ee588425a47f6536bd0fc051f33ff6485b1 (patch) | |
tree | b1380a67102f150493e2e24e1cecd7fbbc128197 /crawl-ref/source/itemprop.cc | |
parent | ef0e98055ffed6b33f3dc02b17717304feade071 (diff) | |
download | crawl-ref-53585ee588425a47f6536bd0fc051f33ff6485b1.tar.gz crawl-ref-53585ee588425a47f6536bd0fc051f33ff6485b1.zip |
Remove unused check_armour_shape.
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r-- | crawl-ref/source/itemprop.cc | 139 |
1 files changed, 0 insertions, 139 deletions
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index db3517ec3a..7a7647cec5 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -1162,145 +1162,6 @@ bool check_armour_size( const item_def &item, size_type size ) return (fit_armour_size( item, size ) == 0); } -// Note that this function is used to check validity of equipment -// coming out of transformations... so it shouldn't contain any -// wield/unwield only checks like two-handed weapons and shield. -bool check_armour_shape( const item_def &item, bool quiet ) -{ - ASSERT( item.base_type == OBJ_ARMOUR ); - - const int slot = get_armour_slot( item ); - - if (!player_is_shapechanged()) - { - switch (slot) - { - case EQ_BOOTS: - - if (player_mutation_level(MUT_HOOVES)) - { - if (!quiet) - mpr("You can't wear boots with hooves!"); - - return (false); - } - - if (player_mutation_level(MUT_TALONS)) - { - if (!quiet) - mpr("Boots don't fit your talons!"); - - return (false); - } - - switch (you.species) - { - case SP_NAGA: - if (item.sub_type != ARM_NAGA_BARDING) - { - if (!quiet) - mpr("You can't wear that!"); - - return (false); - } - break; - - case SP_CENTAUR: - if (item.sub_type != ARM_CENTAUR_BARDING) - { - if (!quiet) - mpr("You can't wear that!"); - - return (false); - } - break; - - case SP_MERFOLK: - if (you.in_water() && item.sub_type == ARM_BOOTS) - { - if (!quiet) - mpr("You don't currently have feet!"); - - return (false); - } - // intentional fall-through - default: - if (item.sub_type == ARM_NAGA_BARDING - || item.sub_type == ARM_CENTAUR_BARDING) - { - if (!quiet) - mpr("You can't wear barding!"); - - return (false); - } - break; - } - break; - - case EQ_HELMET: - if (!is_hard_helmet(item)) - break; - - if (player_mutation_level(MUT_HORNS)) - { - if (!quiet) - mpr("You can't wear that with your horns!"); - - return (false); - } - - if (player_mutation_level(MUT_BEAK)) - { - if (!quiet) - mpr("You can't wear that with your beak!"); - - return (false); - } - break; - - case EQ_GLOVES: - if (you.has_claws(false) >= 3) - { - if (!quiet) - mpr("You can't wear gloves with your huge claws!"); - - return (false); - } - break; - - case EQ_BODY_ARMOUR: - // Draconians are human-sized, but have wings that cause problems - // with most body armours (only very flexible fit allowed). - if (player_genus( GENPC_DRACONIAN ) - && !check_armour_size( item, SIZE_BIG )) - { - if (!quiet) - mpr("That armour doesn't fit your wings."); - - return (false); - } - break; - - default: - break; - } - } - else - { - // Note: Some transformations include all of the above as well. - if (item.sub_type == ARM_NAGA_BARDING - || item.sub_type == ARM_CENTAUR_BARDING) - { - if (!quiet) - mpr("You can't wear barding in your current form!"); - - return (false); - } - } - - return (true); -} - // Returns whether a wand or rod can be charged, or a weapon of electrocution // enchanted. // If hide_charged is true, wands known to be full will return false. |