diff options
author | Chris Campbell <chriscampbell89@gmail.com> | 2013-11-08 19:04:13 +0000 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-11-11 03:54:06 +0100 |
commit | 723b4fa0c231dc452cc1ff30a01780d71ac83882 (patch) | |
tree | bb422b699919251ff2d60ac7fe0a150de183a38d /crawl-ref/source/areas.cc | |
parent | d12a4ba87f98e8d1ac6495ea9190b97d9c0129bc (diff) | |
download | crawl-ref-723b4fa0c231dc452cc1ff30a01780d71ac83882.tar.gz crawl-ref-723b4fa0c231dc452cc1ff30a01780d71ac83882.zip |
Remove moths of suppression
Suppression is a hugely complicated and inconsistent mechanic. Its
original purpose was to be a way of overriding rPois in Spider but
there are now plenty of monsters that do this effectively (and much more
simply).
[1KB: I moved this to trunk, as it made an already extremely hard to review
branch massively more so. There's nothing but a single enum to preserve,
so compat break doesn't make this removal any easier or harder.]
Diffstat (limited to 'crawl-ref/source/areas.cc')
-rw-r--r-- | crawl-ref/source/areas.cc | 56 |
1 files changed, 5 insertions, 51 deletions
diff --git a/crawl-ref/source/areas.cc b/crawl-ref/source/areas.cc index 14da70165e..3b1769810b 100644 --- a/crawl-ref/source/areas.cc +++ b/crawl-ref/source/areas.cc @@ -40,11 +40,10 @@ enum areaprop_flag APROP_ACTUAL_LIQUID = (1 << 5), APROP_ORB = (1 << 6), APROP_UMBRA = (1 << 7), - APROP_SUPPRESSION = (1 << 8), - APROP_QUAD = (1 << 9), - APROP_DISJUNCTION = (1 << 10), - APROP_SOUL_AURA = (1 << 11), - APROP_HOT = (1 << 12), + APROP_QUAD = (1 << 8), + APROP_DISJUNCTION = (1 << 9), + APROP_SOUL_AURA = (1 << 10), + APROP_HOT = (1 << 11), }; struct area_centre @@ -87,7 +86,7 @@ void areas_actor_moved(const actor* act, const coord_def& oldpos) (you.entering_level || act->halo_radius2() > -1 || act->silence_radius2() > -1 || act->liquefying_radius2() > -1 || act->umbra_radius2() > -1 - || act->suppression_radius2() > -1 || act->heat_radius2() > -1)) + || act->heat_radius2() > -1)) { // Not necessarily new, but certainly potentially interesting. invalidate_agrid(true); @@ -107,16 +106,6 @@ static void _actor_areas(actor *a) no_areas = false; } - // Just like silence, suppression goes through walls - if ((r = a->suppression_radius2()) >= 0) - { - _agrid_centres.push_back(area_centre(AREA_SUPPRESSION, a->pos(), r)); - - for (radius_iterator ri(a->pos(), r, C_CIRCLE); ri; ++ri) - _set_agrid_flag(*ri, APROP_SUPPRESSION); - no_areas = false; - } - if ((r = a->halo_radius2()) >= 0) { _agrid_centres.push_back(area_centre(AREA_HALO, a->pos(), r)); @@ -240,8 +229,6 @@ static area_centre_type _get_first_area(const coord_def& f) return AREA_HALO; if (a & APROP_UMBRA) return AREA_UMBRA; - if (a & APROP_SUPPRESSION) - return AREA_SUPPRESSION; // liquid is always applied; actual_liquid is on top // of this. If we find the first, we don't care about // the second. @@ -582,8 +569,6 @@ int player::halo_radius2() const size = min(LOS_RADIUS*LOS_RADIUS, r * r / 400); } - // Can't check suppression because this function is called from - // _update_agrid()---we'd get an infinite recursion. if (player_equip_unrand(UNRAND_BRILLIANCE)) size = max(size, 9); @@ -751,37 +736,6 @@ int monster::umbra_radius2() const } ///////////// -// Suppression - -bool suppressed(const coord_def& p) -{ - if (!map_bounds(p)) - return false; - if (!_agrid_valid) - _update_agrid(); - - return _check_agrid_flag(p, APROP_SUPPRESSION); -} - -int monster::suppression_radius2() const -{ - if (type == MONS_MOTH_OF_SUPPRESSION) - return 150; - else - return -1; -} - -bool actor::suppressed() const -{ - return ::suppressed(pos()); -} - -int player::suppression_radius2() const -{ - return -1; -} - -///////////// // Heat aura (lava orcs). // Player radius |