diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-01-27 15:07:07 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-01-27 15:07:07 +0000 |
commit | 78c738241ffd14b14ea6f7579bb827a617c2187e (patch) | |
tree | a7db588a67d6462fa302a71e2f96206c5e4e75a8 /crawl-ref/source/effects.cc | |
parent | c6e44918d2d662a753265e7852a3cb538b034300 (diff) | |
download | crawl-ref-78c738241ffd14b14ea6f7579bb827a617c2187e.tar.gz crawl-ref-78c738241ffd14b14ea6f7579bb827a617c2187e.zip |
Beam-cycling in direction().
You can use SPACE to cycle between beams, ':' to hide the beam.
Will probably need a future rewrite...getting this in for testing.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@893 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index ea4230b60a..1f304faa06 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -597,20 +597,13 @@ bool acquirement(unsigned char force_class, int agent) continue; // Adding a small constant allows for the occasional - // weapon in an untrained skill. Since the game - // doesn't allow for much in the way of good launchers, - // we'll lower their weight. + // weapon in an untrained skill. - int weight = 0; + const int weight = you.skills[i] + 1; + count += weight; - weight = you.skills[i] + 1; - if (weight) - { - count += weight; - - if (random2(count) < weight) - skill = i; - } + if (random2(count) < weight) + skill = i; } if (skill == SK_STAVES) |