diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-30 15:41:40 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-06-30 15:41:40 +0000 |
commit | e732b7ba119a0d15a9222e4e20ed9179fffc466f (patch) | |
tree | a4a00f41787af072fa601d52d99bbddfd0222502 /crawl-ref | |
parent | c401e8dc8e7a63ae1e869a304e5bb45058a9126b (diff) | |
download | crawl-ref-e732b7ba119a0d15a9222e4e20ed9179fffc466f.tar.gz crawl-ref-e732b7ba119a0d15a9222e4e20ed9179fffc466f.zip |
Fix bad logic where the address of coinflip() was used instead of the
return value of coinflip(), making the result always true.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10080 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index d2e96ec587..48023b0dd0 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1058,7 +1058,7 @@ void setup_mons_cast(monsters *monster, bolt &pbolt, if (targ->type != hog_type && mons_atts_aligned(monster->attitude, targ->attitude) && mons_power(hog_type) + random2(4) >= mons_power(targ->type) - && (!mons_class_flag(targ->type, M_SPELLCASTER) || coinflip) + && (!mons_class_flag(targ->type, M_SPELLCASTER) || coinflip()) && one_chance_in(++count)) { target = i; |