diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2013-06-24 19:50:35 +0100 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2013-06-24 19:50:35 +0100 |
commit | c8a6649471bc1c71c630233da3b3973b05b6ed95 (patch) | |
tree | 3888b5e34bdc08c38ac330340c2865f4e81ec594 /crawl-ref | |
parent | 8bcbd070613ce64a7d334ee15a80ab3f8cc87abe (diff) | |
download | crawl-ref-c8a6649471bc1c71c630233da3b3973b05b6ed95.tar.gz crawl-ref-c8a6649471bc1c71c630233da3b3973b05b6ed95.zip |
Revert "Don't mark invisibility as useless while corona'd"
Obsoleted by 07cc2af46d34f27.
This reverts commit 8523f043be4ce9606a3e27ecfa50fd1a2033e9d4.
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/actor.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/itemname.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/monster.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/monster.h | 2 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/player.h | 2 |
6 files changed, 10 insertions, 16 deletions
diff --git a/crawl-ref/source/actor.h b/crawl-ref/source/actor.h index 59b0973212..28d0667a44 100644 --- a/crawl-ref/source/actor.h +++ b/crawl-ref/source/actor.h @@ -343,8 +343,7 @@ public: // halo you're not affected by others' halos for this // purpose) virtual bool backlit(bool check_haloed = true, - bool self_halo = true, - bool check_corona = true) const = 0; + bool self_halo = true) const = 0; virtual bool umbra(bool check_haloed = true, bool self_halo = true) const = 0; // Within any actor's halo? diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index 6eabcdade9..5cf8d1f907 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -3085,7 +3085,8 @@ bool is_dangerous_item(const item_def &item, bool temp) static bool _invisibility_is_useless(const bool temp) { - return (temp ? you.backlit(true, true, false) + // If you're Corona'd or a TSO-ite, this is always useless. + return (temp ? you.backlit(true) : you.haloed() && you.religion == GOD_SHINING_ONE); } diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index 8922d8e754..20b00addab 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -3218,14 +3218,10 @@ bool monster::asleep() const return (behaviour == BEH_SLEEP); } -bool monster::backlit(bool check_haloed, bool self_halo, bool check_corona) const +bool monster::backlit(bool check_haloed, bool self_halo) const { - if (check_corona && has_ench(ENCH_CORONA) - || has_ench(ENCH_SILVER_CORONA) - || has_ench(ENCH_STICKY_FLAME)) - { + if (has_ench(ENCH_CORONA) || has_ench(ENCH_STICKY_FLAME) || has_ench(ENCH_SILVER_CORONA)) return true; - } if (check_haloed) return (!umbraed() && haloed() && (self_halo || halo_radius2() == -1)); diff --git a/crawl-ref/source/monster.h b/crawl-ref/source/monster.h index 183a821d09..e08644d18c 100644 --- a/crawl-ref/source/monster.h +++ b/crawl-ref/source/monster.h @@ -371,7 +371,7 @@ public: bool confused_by_you() const; bool caught() const; bool asleep() const; - bool backlit(bool check_haloed = true, bool self_halo = true, bool check_corona = true) const; + bool backlit(bool check_haloed = true, bool self_halo = true) const; bool umbra(bool check_haloed = true, bool self_halo = true) const; int halo_radius2() const; int silence_radius2() const; diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 4cfd3241e4..78ab8903cf 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -7400,12 +7400,10 @@ bool player::visible_to(const actor *looker) const || (!mon->has_ench(ENCH_BLIND) && (!invisible() || mon->can_see_invisible())); } -bool player::backlit(bool check_haloed, bool self_halo, bool check_corona) const +bool player::backlit(bool check_haloed, bool self_halo) const { - if (get_contamination_level() > 1 - || check_corona && duration[DUR_CORONA] - || duration[DUR_LIQUID_FLAMES] - || duration[DUR_QUAD_DAMAGE]) + if (get_contamination_level() > 1 || duration[DUR_CORONA] + || duration[DUR_LIQUID_FLAMES] || duration[DUR_QUAD_DAMAGE]) { return true; } diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h index b90a7b51bb..fedcd7d9b5 100644 --- a/crawl-ref/source/player.h +++ b/crawl-ref/source/player.h @@ -651,7 +651,7 @@ public: bool cannot_act() const; bool confused() const; bool caught() const; - bool backlit(bool check_haloed = true, bool self_halo = true, bool check_corona = true) const; + bool backlit(bool check_haloed = true, bool self_halo = true) const; bool umbra(bool check_haloed = true, bool self_halo = true) const; int halo_radius2() const; int silence_radius2() const; |