diff options
-rw-r--r-- | crawl-ref/source/beam.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/crawl-ref/source/beam.cc b/crawl-ref/source/beam.cc index d5f18dd275..c7850e95e7 100644 --- a/crawl-ref/source/beam.cc +++ b/crawl-ref/source/beam.cc @@ -2178,7 +2178,7 @@ bool curare_hits_monster( const bolt &beam, kill_category who, int levels ) { - const bool res_poison = mons_res_poison(monster); + const bool res_poison = mons_res_poison(monster) > 0; bool mondied = false; poison_monster(monster, who, levels, false); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 0f72ffe469..58c6c760fd 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -2764,7 +2764,8 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove) int prop_int = 0; // don't warn when putting on an unknown item - if (item.base_type == OBJ_JEWELLERY && item_ident( item, ISFLAG_KNOW_PLUSES )) + if (item.base_type == OBJ_JEWELLERY + && item_ident( item, ISFLAG_KNOW_PLUSES )) { switch (item.sub_type) { @@ -2794,10 +2795,11 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove) if (remove) { - std::string prompt = item.base_type == OBJ_WEAPONS ? "Unwield" : "Remov"; - prompt += "ing this item could be fatal. "; - prompt += item.base_type == OBJ_WEAPONS ? "Unwield" : "Remove"; - prompt += " anyway? "; + std::string prompt = + item.base_type == OBJ_WEAPONS ? "Unwield" : "Remov"; + prompt += "ing this item could be fatal. "; + prompt += item.base_type == OBJ_WEAPONS ? "Unwield" : "Remove"; + prompt += " anyway? "; if ((prop_str >= you.strength || prop_int >= you.intel || prop_dex >= you.dex) @@ -2808,10 +2810,11 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove) } else // put on { - std::string prompt = item.base_type == OBJ_WEAPONS ? "Wield" : "Wear"; - prompt += "ing this item could be fatal. "; - prompt += item.base_type == OBJ_WEAPONS ? "Wield" : "Put on"; - prompt += " anyway? "; + std::string prompt = + item.base_type == OBJ_WEAPONS ? "Wield" : "Wear"; + prompt += "ing this item could be fatal. "; + prompt += item.base_type == OBJ_WEAPONS ? "Wield" : "Put on"; + prompt += " anyway? "; if ((-prop_str >= you.strength || -prop_int >= you.intel || -prop_dex >= you.dex) @@ -2821,7 +2824,6 @@ bool safe_to_remove_or_wear(const item_def &item, bool remove) } } - return (true); } |