diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-26 09:29:10 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-01-26 09:29:10 +0000 |
commit | 679ebce76f05e63cdee291f530247ac738dce313 (patch) | |
tree | 91a843ca66d5efb1e8117c5adf144998a60c8a5c /crawl-ref | |
parent | aa300c86ccbb1cffa03ee8f6e0dca0e6ef48cef6 (diff) | |
download | crawl-ref-679ebce76f05e63cdee291f530247ac738dce313.tar.gz crawl-ref-679ebce76f05e63cdee291f530247ac738dce313.zip |
[1880145] Fixed poison susceptible monsters resisting curare.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3339 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-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); } |