diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-26 10:39:39 +0000 |
commit | 61cae4a761c2f72cda44ae269c7007b37a0c14a7 (patch) | |
tree | fec8ec71ca7ca6eebd9d48881bc5ee3fe27d04c1 /crawl-ref/source/effects.cc | |
parent | d4acdf4a6a4b73607d58714a66efd372674adb56 (diff) | |
download | crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.tar.gz crawl-ref-61cae4a761c2f72cda44ae269c7007b37a0c14a7.zip |
Misc. minor cleanups. (Yes, a huge amount of them but still...)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6146 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index d680b97445..10ad2a1cb9 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -414,7 +414,7 @@ void banished(dungeon_feature_type gate_type, const std::string &who) if (!crawl_state.is_god_acting()) you.entry_cause_god = GOD_NO_GOD; - if (cast_into != "" && you.entry_cause != EC_SELF_EXPLICIT) + if (!cast_into.empty() && you.entry_cause != EC_SELF_EXPLICIT) { const std::string what = "Cast into " + cast_into + _who_banished(who); take_note(Note(NOTE_MESSAGE, 0, 0, what.c_str()), true); @@ -2253,38 +2253,36 @@ static void _hell_effects() create_monster(mg); for (int i = 0; i < 4; ++i) - { if (one_chance_in(3)) create_monster(mg); - } } } static bool _food_item_needs_time_check(item_def &item) { if (!is_valid_item(item)) - return false; + return (false); if (item.base_type != OBJ_CORPSES && item.base_type != OBJ_FOOD && item.base_type != OBJ_POTIONS) { - return false; + return (false); } if (item.base_type == OBJ_CORPSES && item.sub_type > CORPSE_SKELETON) { - return false; + return (false); } if (item.base_type == OBJ_FOOD && item.sub_type != FOOD_CHUNK) - return false; + return (false); if (item.base_type == OBJ_POTIONS && !is_blood_potion(item)) - return false; + return (false); - return true; + return (true); } static void _rot_inventory_food(long time_delta) |