diff options
-rw-r--r-- | crawl-ref/source/command.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/itemprop.cc | 5 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/transfor.cc | 15 |
4 files changed, 13 insertions, 15 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 4da934aadb..635c1f7cb1 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -560,7 +560,7 @@ void list_armour() : "unknown") << " : "; - if (!you_can_wear(i,true)) + if (!you_can_wear(i, true)) estr << " (unavailable)"; else if (armour_id != -1 && !you_tran_can_wear(you.inv[armour_id]) || !you_tran_can_wear(i)) diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc index e5107c9f1a..cbfb90505d 100644 --- a/crawl-ref/source/itemprop.cc +++ b/crawl-ref/source/itemprop.cc @@ -817,8 +817,7 @@ void set_equip_desc( item_def &item, unsigned long flags ) // short get_helmet_desc( const item_def &item ) { - ASSERT( item.base_type == OBJ_ARMOUR - && get_armour_slot( item ) == EQ_HELMET ); + ASSERT( is_helmet(item) ); return item.plus2; } @@ -835,7 +834,7 @@ void set_helmet_desc( item_def &item, helmet_desc_type type ) bool is_helmet(const item_def& item) { - return item.base_type == OBJ_ARMOUR && get_armour_slot(item) == EQ_HELMET; + return (item.base_type == OBJ_ARMOUR && get_armour_slot(item) == EQ_HELMET); } bool is_hard_helmet(const item_def &item) diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 29f729f580..409869af51 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7107,15 +7107,15 @@ int player::has_claws(bool allow_tran) const && attribute[ATTR_TRANSFORMATION] != TRAN_STATUE && attribute[ATTR_TRANSFORMATION] != TRAN_LICH) { - return 0; + return (0); } } // these are the only other sources for claws if (species == SP_TROLL || species == SP_GHOUL) - return 3; + return (3); - return player_mutation_level(MUT_CLAWS); + return (player_mutation_level(MUT_CLAWS)); } bool player::has_usable_claws(bool allow_tran) const diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 8b8cc1d82b..3d20c0a8b7 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -180,28 +180,27 @@ static void _remove_equipment(const std::set<equipment_type>& removed, // FIXME: merge this with you_can_wear(), can_wear_armour(), etc. bool _mutations_prevent_wearing(const item_def& item) { - if (item.base_type == OBJ_JEWELLERY) - return (false); - const equipment_type eqslot = get_armour_slot(item); if (is_hard_helmet(item) - && (you.mutation[MUT_HORNS] || you.mutation[MUT_BEAK])) + && (player_mutation_level(MUT_HORNS) + || player_mutation_level(MUT_BEAK))) { return (true); } - if (item.sub_type == ARM_BOOTS // barding excepted! - && (you.mutation[MUT_HOOVES] || you.mutation[MUT_TALONS])) + // Barding is excepted here. + if (item.sub_type == ARM_BOOTS + && (player_mutation_level(MUT_HOOVES) + || player_mutation_level(MUT_TALONS))) { return (true); } - if (eqslot == EQ_GLOVES && you.mutation[MUT_CLAWS] >= 2) + if (eqslot == EQ_GLOVES && player_mutation_level(MUT_CLAWS) >= 3) return (true); return (false); - } static void _rewear_equipment_slot(equipment_type e) |