diff options
author | Ben Striegel <ben.striegel@gmail.com> | 2012-03-24 18:14:32 -0400 |
---|---|---|
committer | Neil Moore <neil@s-z.org> | 2012-04-04 23:39:24 -0400 |
commit | dc9d3093db02a2d532a0bd922c1078890420d4d1 (patch) | |
tree | f2bfebd3823503cf6792f89878192491ca332a26 /crawl-ref/source/mon-project.cc | |
parent | 0959c5a00c77311000b942db603ec965b153efd3 (diff) | |
download | crawl-ref-dc9d3093db02a2d532a0bd922c1078890420d4d1.tar.gz crawl-ref-dc9d3093db02a2d532a0bd922c1078890420d4d1.zip |
Item effect -> player effect abstraction, part 1
There are a whole bunch of places in the code where effects on the player are determined by directly checking for whether a single item is equipped. For example, `wearing_amulet(AMU_STASIS)`. This commit abstracts all of these checks into actual effects, such as `player_effect_stasis()`, to more easily jive with checking for suppression. For some effects, especially resist mutation, more work still needs to be done to unify effect checking... but this suffices for the moment.
Diffstat (limited to 'crawl-ref/source/mon-project.cc')
-rw-r--r-- | crawl-ref/source/mon-project.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mon-project.cc b/crawl-ref/source/mon-project.cc index 302eadc69f..df76091c1e 100644 --- a/crawl-ref/source/mon-project.cc +++ b/crawl-ref/source/mon-project.cc @@ -165,7 +165,7 @@ static void _fuzz_direction(monster& mon, int pow) const float off = (coinflip() ? -1 : 1) * 0.25; float tan = (random2(31) - 15) * 0.019; // approx from degrees tan *= 75.0 / pow; - if (!you.suppressed() && wearing_amulet(AMU_INACCURACY)) + if (player_effect_inaccuracy()) tan *= 2; // Cast either from left or right hand. |